AI Security Atlas › All entries › RAG & Knowledge Retrieval Security

GuardrailFixes critical risks

Output Filtering & PII Anonymization

Post-generation filters redact PII, secrets, and out-of-policy content before the response is delivered.

Open in the interactive atlas →

Impact

Provides a last line of defense when retrieval or generation still surfaces sensitive spans.

Why this severity

Guardrails take the highest severity of the risks they mitigate: Unauthorized Document Exfiltration (High), Indirect Prompt Injection via Documents (Critical).

Method: OWASP Risk Rating Methodology

Related

Mitigates

Remediation

  1. Run deterministic PII/secret detectors on every completion.
  2. Replace matches with typed placeholders and log redaction counts.
  3. Block responses that fail policy classifiers above threshold.

How to verify

Pattern

return redact(completion, { pii: true, secrets: true });

Framework mapping

OWASP Top 10 for LLM Applications 2025

MITRE ATLAS

NIST AI RMF 1.0