ADR-001: Use Presidio Analyze for PII detection
Presidio's Analyze API identifies email addresses, phone numbers, and credit-card information in feedback before it reaches the model.
Context
The Rating AgentAgentv1.0.0Rating AgentRead-only review intelligence specialist that summarizes customer feedback over A2A gRPC and map-reduce workflows while ...PublishesAnalyzeText, AnonymizeTextOwnercatalog-experience-teamDiagramRepositoryOpen docs and the conversational agents process customer feedback and user-provided text that may contain personally identifiable information. Sending that text directly to a model risks exposing values that are not needed for summarization or conversation.
Presidio APIServicev1.0.0Presidio APIExternal HTTP sidecar API for detecting PII in text and anonymizing detected
entities in the Chat and Rating AI agent pi...SubscribesAnalyzeText, AnonymizeText +3APIsOpenAPIOwnerplatform-engineering-teamDiagramOpen docs exposes POST /analyze to identify entities in text,
returning entity types, text offsets, and confidence scores. Detection depends
on the deployed recognizers, supported language, and request configuration;
Presidio’s ability to recognize an entity does not mean that entity is enabled
in the BookWorm integration.
Decision
Use Presidio’s Analyze API in the Reviews and Chat PII middleware to inspect non-empty text before it reaches a model and before text is returned. The documented detection scope is email addresses, phone numbers, and credit-card information. Pass the analysis results to the anonymization step when entities are detected.
Treat the deployed recognizers and request policy as the effective detection boundary. Do not treat a successful analysis as proof that text contains no other sensitive information, and do not log submitted text or detection results.
Consequences
- Analysis provides entity types, offsets, and confidence scores for the anonymization step; the exact results depend on recognizer and request configuration.
- Detection is limited to the configured scope and can miss sensitive values or identify non-sensitive text. It is a risk-reduction control, not a guarantee that all PII is found.
- Reviews and Chat depend on the configured Analyzer endpoint and its availability. Keep endpoint configuration distinct from upstream example servers, and monitor failures without retaining sensitive payloads.
- Changes to enabled entity types or detection policy require review of both recognizer configuration and the downstream anonymization behavior.