Pega Platform enables secure AI interactions through its GenAI Connect rule, where sensitive data masking is applied as an integral part of the execution pipeline:
When masking is enabled, Pega automatically applies the default configuration of the pyGenAIPIIdetector text analyzer rule, defined at the @baseclass level
The rule leverages Pega’s text analyzer rule, where underlying detection models and configurations are managed within Prediction Studio, allowing governance over how sensitive entities are identified
The analyzer scans the outgoing prompt to detect sensitive entities such as names, email addresses, phone numbers, account-related information
Each identified value is replaced with a structured masked token using angle bracket notation: <EMAIL_1> ,<PHONE_1>,<NAME_1>
The masked prompt preserves the original structure and context, allowing the AI model to generate meaningful responses without accessing real sensitive data.
The masked prompt is sent to the AI model, ensuring that no actual sensitive data is exposed externally.
The entire process is handled transparently within the platform.
As you mention, the PII masking relies on a Text Analyzer rule, essentially an NLP Machine Learning model (not GenAI). When you want to use this, I recommend assessing if the OOTB model needs additional training for specific PII instances you want to recognize for your organization. Think of non-standard address notations or client IDs specific to your organization.
It is good to be aware that the option to switch on PII masking, is available for GenAI Connect rules. For features like Coach and Agents, this is not available in the same way.
In general, I believe we should aim for GenAI solutions that are inherently secure, also without optional PII masking. This starts with using GenAI solutions through the Pega GenAI Gateway, so models are used in a stateless way, the RBAC settings on your application are respected, and all communication between your application and your chosen LLM model is fully secured and encrypted.
@Tim_Straatsma Thanks for the feedback, Tim. Absolutely, and as mentioned in the article, this should be seen only as a starting point. In practice, not every entity that requires masking or pseudonymization will be covered by a machine learning model alone, exactly as you pointed out.
Hi All, How does property mapping work for Entity Types in a Text Analyzer rule? If I create a property in a Work or Data class, is it automatically available for entity mapping, or is additional configuration required? Does the property need to be defined in the base class, or can it reside in the specific Work/Data class? Are there any restrictions or prerequisites for successful mapping?
If there is any attachments sent via the gen ai connect rule, in that scenario how is pega masking PII data present in the content?
In that scenario we are not passing any parameter in the prompt to be used by Text Analyser for masking the same in pyUserPrompt.
I have noticed, for attachment also, pyGenAIPIIdetector is getting called if masking is enabled in the GenAI rule, but could not find the exact prompt being sent to Generative AI provider.
Recently, we’ve enquired about PII redaction when user uploads the attachment containing the personal info.
However this functionality is not supported today in Pega 25.1.3 and suggested to look at customization. For example an integration with 3rd party OCR/IDP service, your own tooling or workflows to address the use case.
Appreciate any guidance / inputs on how to address this behavior in this regard.
A very interesting topic was discussed. When an attachment is submitted for entity extraction or summarization, the Frontier Model must access the file to extract the relevant fields and map them to case data.
If masking sensitive information is a strict requirement, a customized pre-processing step can be implemented to extract plain text from the file before it is sent to the model, for example by leveraging the pyTextExtract activity. However, this should be treated as an edge case and carefully evaluated, as it introduces additional complexity and may impact the quality or completeness of the extracted information.