Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKGet startedIntroductionInstallationQuickstartLangChain Expression LanguageInterfaceHow toCookbookLangChain Expression Language (LCEL)Why use LCEL?ModulesModel I/‚ÄãORetrievalChainsMemoryAgentsCallbacksModulesSecurityGuidesAdaptersDebuggingDeploymentEvaluationFallbacksLangSmithRun LLMs locallyModel comparisonPrivacyData anonymization with Microsoft PresidioReversible anonymizationMulti-language anonymizationQA with private data protectionPydantic compatibilitySafetyMoreGuidesPrivacyData anonymization with Microsoft PresidioReversible anonymizationOn this pageReversible anonymizationReversible data anonymization with Microsoft PresidioUse case‚ÄãWe have already written about the importance of anonymizing sensitive data in the previous section. Reversible Anonymization is an equally essential technology while sharing information with language models, as it balances data protection with data usability. This technique involves masking sensitive personally identifiable information (PII), yet it can be reversed and original data can be restored when authorized users need it. Its main advantage lies in the fact that while it conceals individual identities to prevent misuse, it also allows the concealed data to be accurately unmasked should it be necessary for legal or compliance purposes. Overview‚ÄãWe implemented the PresidioReversibleAnonymizer, which consists of two parts:anonymization - it works the same way as PresidioAnonymizer, plus the object itself stores a mapping of made-up values to original ones, for example:    {        "PERSON": {            "<anonymized>": "<original>",            "John Doe": "Slim Shady"        },        "PHONE_NUMBER": {            "111-111-1111": "555-555-5555"        }        ...    }deanonymization - using the mapping described above, it matches fake data with original data and then substitutes it.Between
Open In Colab
Open In Colab ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKGet startedIntroductionInstallationQuickstartLangChain Expression LanguageInterfaceHow toCookbookLangChain Expression Language (LCEL)Why use LCEL?ModulesModel I/‚ÄãORetrievalChainsMemoryAgentsCallbacksModulesSecurityGuidesAdaptersDebuggingDeploymentEvaluationFallbacksLangSmithRun LLMs locallyModel comparisonPrivacyData anonymization with Microsoft PresidioReversible anonymizationMulti-language anonymizationQA with private data protectionPydantic compatibilitySafetyMoreGuidesPrivacyData anonymization with Microsoft PresidioReversible anonymizationOn this pageReversible anonymizationReversible data anonymization with Microsoft PresidioUse case‚ÄãWe have already written about the importance of anonymizing sensitive data in the previous section. Reversible Anonymization is an equally essential technology while sharing information with language models, as it balances data protection with data usability. This technique involves masking sensitive personally identifiable information (PII), yet it can be reversed and original data can be restored when authorized users need it. Its main advantage lies in the fact that while it conceals individual identities to prevent misuse, it also allows the concealed data to be accurately unmasked should it be necessary for legal or compliance purposes. Overview‚ÄãWe implemented the PresidioReversibleAnonymizer, which consists of two parts:anonymization - it works the same way as PresidioAnonymizer, plus the object itself stores a mapping of made-up values to original ones, for example:    {        "PERSON": {            "<anonymized>": "<original>",            "John Doe": "Slim Shady"        },        "PHONE_NUMBER": {            "111-111-1111": "555-555-5555"        }        ...    }deanonymization - using the mapping described above, it matches fake data with original data and then substitutes it.Between