A customer support agent stores conversation context in session memory to handle multi-turn interactions. A privacy audit reveals that PII (customer names, email addresses, case numbers) is being retained in memory and included in logged context artifacts. The organization must remediate this before the next compliance review. Which approach BEST addresses both the data minimization and audit logging concerns?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Think of PII in memory like mud on your boots — don't track it into the house in the first place. Option B is correct: filter PII before it ever enters the memory store or logs, and scope memory to the session so it self-destructs when the conversation ends. You solve both the retention problem and the artifact contamination at the source.
Full explanation below image
Full Explanation
The correct answer is B. The audit revealed two distinct problems: (1) PII is being retained beyond its useful life, and (2) PII is leaking into logged artifacts. Option B addresses both at the architectural level. Session-scoped memory with automatic expiration ensures that customer PII is not carried forward to subsequent sessions — it exists only for the duration of the interaction that needs it. The PII filter applied before any memory content reaches durable artifacts (logs, audit trails, knowledge bases) ensures the second problem is solved at the write path. Redacting or hashing values like email addresses and case numbers allows logs to remain useful for debugging without containing raw PII.
Option A is wrong because disabling memory entirely breaks the agent's core function — it cannot handle multi-turn conversations without context. Trading compliance for capability is not a valid remediation strategy when targeted controls exist.
Option C is wrong because encryption at rest protects against unauthorized access but does not address the retention violation. If PII is stored longer than permitted by data minimization principles or a deletion obligation (e.g., GDPR right to erasure), it is still non-compliant regardless of whether it is encrypted. Encryption and data minimization are orthogonal controls.
Option D is wrong because human-in-the-loop approval for every memory log entry is operationally unscalable for a high-volume customer support agent. More importantly, it shifts the compliance burden to a human reviewer rather than engineering the PII problem out at the system level. Humans are also error-prone and will miss PII under time pressure — automated filtering is more reliable.