{"id":64688,"date":"2024-07-18T11:41:32","date_gmt":"2024-07-18T09:41:32","guid":{"rendered":"https:\/\/www.makingscience.com\/?p=64688"},"modified":"2024-07-18T11:41:32","modified_gmt":"2024-07-18T09:41:32","slug":"protecting-customer-privacy-how-to-remove-pii-from-call-center-transcripts","status":"publish","type":"post","link":"https:\/\/www.makingscience.com\/us\/blog\/protecting-customer-privacy-how-to-remove-pii-from-call-center-transcripts\/","title":{"rendered":"Protecting Customer Privacy: How to Remove PII from Call Center Transcripts"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">In our <\/span><a href=\"https:\/\/www.makingscience.com\/blog\/what-is-the-best-speech-to-text-foundational-model\/\"><span style=\"font-weight: 400;\">previous blog note<\/span><\/a><span style=\"font-weight: 400;\">, we discussed a methodical approach to converting call center audio recordings into text on an industrial scale. This capability is a game changer for companies in many different industries since it allows them to obtain relevant customer data (customer satisfaction, churn reason, etc.) that only a few years ago was inaccessible and used to take a lot of human effort and resources to unlock.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">One of the key points to be compliant with current regulations is the importance of removing sensitive information about the users from the datasets used with analytical proposes. This sensitive information is what we call PII (Personal Identifiable Information). If this data is not properly handled or removed from the datasets used to extract users\u2019 insights, it may result in costly lawsuits against businesses. This article will discuss different techniques to remove PII data from audio conversations previously converted to text \u201cdialogs.\u201d<\/span><\/p>\n<h3><strong>Different techniques to remove PII information<\/strong><\/h3>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">Plenty of tools are available on the market to remove PII information. All these tools perform the same function but with different techniques under the hood, varied results, and varied costs. The core functionality is to take a text input that \u201ccontains\u201d sensitive information and return an anonymized text. These tools also allow the user to define which PII attributes should be considered in the scope for anonymization (first names, surnames, phone numbers, emails, IP, etc.). <\/span><i><span style=\"font-weight: 400;\">Figure 1<\/span><\/i><span style=\"font-weight: 400;\"> shows a graphical representation of how a PII removal tool should work.<img fetchpriority=\"high\" decoding=\"async\" class=\" wp-image-64695 aligncenter\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/unnamed-18-300x88.png\" alt=\"\" width=\"883\" height=\"259\" \/> <\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"font-weight: 400;\"><em>Figure 1: an example of how a PII removal tool works.<\/em><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Until recently the best practice was to utilize a rules-based system to look for PII attributes, tag\/treat those attributes as early as possible in the data ingestion processes that moved data into the Enterprise for processing. All of this is to protect customers&#8217; confidentiality and reduce other types of business risks.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Before modern machine learning systems, rule-based systems were the standard way to anonymize data. These systems use a set of rules to define if a word belongs to a certain entity type (in this case, these entities can be names, email addresses, phone numbers, etc.) and mask the input text based on these rules. However, this kind of solution implementation has limitations and maintenance costs as new attributes come into the business:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Rigidness: the rule-based systems will catch only the entities&#8217; values that the rules defined by the user comprehend. In other words, they are rigid. Because of that, if a new entity value doesn\u2019t fulfill one of the predefined rules it won\u2019t be caught by the system. For example, if the user tries to catch names by using a rule (a fixed list of names), if an example with a name that isn\u2019t included in the rule\u2019s list, then the system won\u2019t mask that new value as a name.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Contextual limitations: some names can have another meaning (being a noun or an adjective) depending on the context. For example, <\/span><i><span style=\"font-weight: 400;\">Rose is cleaning the vase.<\/span><\/i><span style=\"font-weight: 400;\"> Depending on the context, a Rose can be a name or a noun (the flower). These kinds of cases take a lot of work to catch for rule-based systems.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">As Large Language Models are becoming more widely available and affordable to use, modern AI-based PII systems tackle these problems by taking into account the labels that may accompany the PII attribute and even the context where the PII attribute(s) are embedded. Because of that, their accuracy in finding and mapping these PII entities is much more accurate than the old-fashioned systems.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this article, we will evaluate two different approaches to finding PII fields: classic entity recognition systems and LLM-based systems. The entity recognition systems look at a word context to define whether that world is a PII field or not. In this case, the tool used was Google DLP (Data Loss Prevention). This tool has an entity recognition model that recognizes up to 150 different types of fields with sensitive information. On the other hand, the LLM-based systems use an LLM and a prompt designed for the PII recognition task and mask the PII values detected in the piece of text given as input. One of the key advantages of this approach is that it allows the user to define custom PII fields to be masked (outside, for example, the 150 default ones available in Google DLP) by simply modifying the prompt used for this task. Customization is the key advantage of this approach.<\/span><\/p>\n<h3><strong>The benchmark<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">For this benchmark, we used the <\/span><a href=\"https:\/\/huggingface.co\/datasets\/ai4privacy\/pii-masking-200k\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">pii-masking-200k<\/span><\/a><span style=\"font-weight: 400;\"> dataset. This is a public dataset that contains 200,000 pieces of text with PII data labeled. This dataset contains up to 54 different PII categories and the pieces of text are in four different languages (English, French, German, and Italian). It provides a comprehensive source of truth for model comparison since it contains many different PII categories in many languages.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For this particular benchmark, we focused on five PII categories: first name, last name, email address, phone number, and address. This constraint reduced the sample size to 3826 elements. For each estimator and each PII category, we quantified the number of times when that category was correctly and incorrectly found. We considered that a piece of text is incorrectly labeled when the model doesn\u2019t assign the expected label and when the model assigns an incorrect label (i.e.: an estimator masks Mouri\u00f1o Street as [LAST_NAME] Street).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">As we mentioned before, we used Google DLP, Data Loss Prevention, to represent the classical entity recognition models. For the LLM-based approach, we tested many different models using the same prompt. These models are GPT 3.5, GPT 4, GPT 4o (OpenAI), Anthropic Claude v2 (AWS), Gemini 1.5 Flash, and text-unicorn@001 (Google Cloud). Since some improvement can be obtained by customizing the prompt for each model, the idea behind this experiment is to separate the poor-performing LLMs from the high-performers. The obtained results are displayed in <\/span><i><span style=\"font-weight: 400;\">Table 1<\/span><\/i><span style=\"font-weight: 400;\">. The detailed results by each category can be found in <\/span><i><span style=\"font-weight: 400;\">Table 2 to Table 8 (see the appendix)<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><img decoding=\"async\" class=\" wp-image-64702 aligncenter\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/Screenshot-2024-07-18-131215-300x288.png\" alt=\"\" width=\"695\" height=\"667\" \/><\/p>\n<p style=\"text-align: center;\"><em><span style=\"font-weight: 400;\">Table 1 &#8211; benchmark results summary. The cost data was updated on <\/span><span style=\"font-weight: 400;\" data-rich-links=\"{&quot;dat_df&quot;:{&quot;fres_frt&quot;:1,&quot;dfie_ts&quot;:{&quot;tv&quot;:{&quot;tv_s&quot;:1719403200,&quot;tv_n&quot;:0}},&quot;dfie_l&quot;:&quot;en&quot;,&quot;dfie_p&quot;:{&quot;fres_frt&quot;:0,&quot;tres_tv&quot;:&quot;yyyy-MM-dd&quot;},&quot;dfie_dt&quot;:&quot;2024-06-26&quot;,&quot;dfie_pt&quot;:4,&quot;dfie_tpt&quot;:0,&quot;dfie_tzi&quot;:&quot;&quot;},&quot;type&quot;:&quot;date&quot;}\">2024-06-26<\/span><span style=\"font-weight: 400;\">. OpenAI and AWS models&#8217; costs are expressed per 1K tokens whereas for Google models are per 1K characters<\/span><\/em><\/p>\n<p><span style=\"font-weight: 400;\">The main takeaways from this benchmark are:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The estimator with the best performance is the GPT-4-based system, and the one with the worst performance is Google DLP.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">If we take into account the price, the system with the best price-performance trade-off is the Gemini 1.5 Flash-based system. This is because it costs 10 times less than the GPT-4-based one and it has a performance only 6% lower if we consider the overall accuracy.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">For Google DLP, it\u2019s particularly surprising that it is unable to catch any address value. By doing a deep dive into the examples, we found out that it tends to confuse surnames as addresses (i.e.: Johnson Street is anonymized as [SURNAME] Street).<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">All the systems have a great performance for email address (the model with the worst performance, GPT-3.5, has a 94.13% accuracy for this label) recognition.<\/span><\/li>\n<\/ol>\n<h3>Choosing the Right PII Removal Method<\/h3>\n<p><span style=\"font-weight: 400;\">In this article, we compared several estimators to find PII attributes in text and to remove them. This is a crucial step in any call center analytics system (and, in general, in any system that works with text data with sensitive information) since it allows the removal of users&#8217; personal information.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We observed an important variability in the performance of the two solution approaches and across the different LLMs.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If we look only at the overall accuracy, the best performer estimator is the GPT-4-based system (OpenAI), and the worst performer is Google DLP (Google Cloud). However, if we include the cost in the equation, the <\/span><b>best option by far is the Gemini 1.5 Flash-based system (Google Cloud Platform)<\/b><span style=\"font-weight: 400;\">. This anonymization system has an overall accuracy comparable to the GPT-4-based system but for a fraction of the cost (10 times less).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">PII identification, tagging, and treatment <\/span><b>performance<\/b><span style=\"font-weight: 400;\"> should not be forgotten about. Cloud and service accounts require that quotas be adjusted according to performance demands for the given use cases and volumetrics being targeted.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For each particular use case, it is important to take into account the specific requirements for it. Because of that, it is important to assess the required accuracy to be compliant with the product requirements, the cost that this accuracy implies, and accepted latency (if the system will be a stream system, then the latency will be an important factor in choosing the best-suited estimator for the use case).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The latest relevant aspect to point out is that there is no perfect model. This idea is crucial for PII remotion use cases because, in some situations, very demanding standards regarding data anonymization must be fulfilled. Because of that, to be fully sure that the system does its trick in the way it should, from Making Science we always recommend keeping the human in the loop. The presence of human validation of the output generated by the LLM-based system will ensure that the solution fulfills the minimum requirements regarding PII entities&#8217; remotion.<\/span><\/p>\n<h3><strong>Accuracy by label by model appendix<\/strong><\/h3>\n<h3><strong><img decoding=\"async\" class=\"alignnone wp-image-64710 aligncenter\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/1-1-300x102.png\" alt=\"\" width=\"614\" height=\"209\" \/><\/strong><\/h3>\n<p style=\"text-align: center;\"><em><span style=\"font-weight: 400;\">Table 2 &#8211; GPT-4 accuracy by PII field<\/span><\/em><\/p>\n<h3 style=\"text-align: center;\"><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-64716\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/2-1-300x101.png\" alt=\"\" width=\"612\" height=\"206\" \/><\/strong><\/h3>\n<p style=\"text-align: center;\"><em><span style=\"font-weight: 400;\">Table 3 &#8211; GPT-4o accuracy by PII field<\/span><\/em><\/p>\n<h3 style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-64722\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/3-1-300x103.png\" alt=\"\" width=\"603\" height=\"207\" \/><\/h3>\n<p style=\"text-align: center;\"><em><span style=\"font-weight: 400;\">Table 4 &#8211; GPT-3.5 accuracy by PII field<\/span><\/em><i><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/i><\/p>\n<h3 style=\"text-align: center;\"><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-64728\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/4-1-300x102.png\" alt=\"\" width=\"614\" height=\"209\" \/><\/strong><\/h3>\n<p style=\"text-align: center;\"><em><span style=\"font-weight: 400;\">Table 5 &#8211; Anthropics\u2019s Claude v2 accuracy by PII field<\/span><\/em><i><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/i><\/p>\n<h3 style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-64734\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/5-1-300x103.png\" alt=\"\" width=\"600\" height=\"206\" \/><\/h3>\n<p style=\"text-align: center;\"><em><span style=\"font-weight: 400;\">Table 6 &#8211; text-unicorn@001 accuracy by PII field<\/span><\/em><i><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/i><\/p>\n<h3 style=\"text-align: center;\"><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-64740\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/6-1-300x107.png\" alt=\"\" width=\"600\" height=\"214\" \/><\/strong><\/h3>\n<p style=\"text-align: center;\"><em><span style=\"font-weight: 400;\">Table 7 &#8211; Gemini Flash 1.5 accuracy by PII field<\/span><\/em><i><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/i><\/p>\n<h3 style=\"text-align: center;\"><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-64746\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/7-1-300x103.png\" alt=\"\" width=\"591\" height=\"203\" \/><\/strong><\/h3>\n<p style=\"text-align: center;\"><span style=\"font-weight: 400;\"><em>Table 8 &#8211; test-unicorn@001 accuracy by PII field<\/em><i><br \/>\n<\/i><\/span><\/p>\n<h3><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-64752 aligncenter\" src=\"https:\/\/www.makingscience.com\/wp-content\/uploads\/2024\/07\/8-1-300x109.png\" alt=\"\" width=\"611\" height=\"222\" \/><\/strong><\/h3>\n<p style=\"text-align: center;\"><em><span style=\"font-weight: 400;\">Table 9 &#8211; Google DLP accuracy by PII field<\/span><\/em><i><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/i><\/p>\n<h3><strong>Conclusion<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">This exploration into PII removal from call center transcripts reveals a critical takeaway for businesses: achieving both accuracy and cost-efficiency is possible. While the advanced capabilities of GPT-4 delivered accuracy, the cost factor cannot be ignored. This is where Gemini 1.5 Flash shines, providing top-notch performance at a significantly lower cost, making it a compelling solution for organizations of all sizes.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">At Making Science, we understand the importance of balancing powerful AI solutions with robust security measures. We are committed to helping businesses unlock the full potential of their call center data while upholding the highest ethical and security standards. Our team of experts can help you develop and implement a tailored PII removal strategy that leverages the latest technologies, including Gemini 1.5 Flash, while ensuring complete and reliable data anonymization. Contact us to learn how we can tailor a solution to your specific needs.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous blog note, we discussed a methodical approach to converting call center audio recordings into text on an industrial scale. This capability is a game changer for companies in many different industries since it allows them to obtain relevant customer data (customer satisfaction, churn reason, etc.) that only a few years ago was [&hellip;]<\/p>\n","protected":false},"author":30,"featured_media":64689,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[699,976,998,555,34],"tags":[],"class_list":["post-64688","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-cybersecurity","category-data-analytics-and-bi","category-it-solutions","category-technology-ai"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/posts\/64688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/comments?post=64688"}],"version-history":[{"count":0,"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/posts\/64688\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/media\/64689"}],"wp:attachment":[{"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/media?parent=64688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/categories?post=64688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.makingscience.com\/us\/wp-json\/wp\/v2\/tags?post=64688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}