c3.9 Ground and validate responses against retrieved sources
Verify that generated responses are grounded in the approved knowledge base and validate output before use, so hallucinations or injected content do not reach users or downstream systems.
Implementation guidance
How to implement on AWS
Enable Bedrock Guardrails contextual grounding to check that responses are semantically consistent with the retrieved, sanctioned sources, and validate/redact output before downstream use. Treat retrieved content as untrusted input and re-apply input filtering.
Acceptance criteria
Responses are checked for grounding against retrieved sources; a fabricated or off-source answer is caught; retrieved context is treated as untrusted.
Practical implementation
How this control is implemented in each reference architecture:
Contextual grounding in the Generative AI account verifies each answer against the retrieved sanctioned sources, and retrieved context is re-filtered as untrusted input.
- Enable Bedrock Guardrails contextual grounding so responses are checked for semantic consistency with the retrieved, approved sources.
- Treat retrieved context as untrusted: re-apply input filtering to it before it reaches the model, since a poisoned document could carry injected instructions.
- Validate/redact the final output before returning it to the Application account for downstream use.
How to validate: Responses are grounding-checked against retrieved sources; a fabricated or off-source answer is caught; injected instructions in retrieved context are filtered out.
Avoid: Trusting retrieved documents because they came from 'your' knowledge base. A poisoned document is untrusted input; re-filter it and ground the answer.
Grounding checks and re-filtering of retrieved context in the generative AI tier keep hallucinated or injected content from reaching users.
- Enable contextual grounding checks so answers must be consistent with the retrieved approved sources.
- Re-apply input filtering to retrieved context before it reaches the model.
- Validate/redact the output before the application tier uses it.
How to validate: Answers are grounding-checked; an off-source answer is caught; retrieved context is treated as untrusted.
Avoid: Returning whatever the model says over retrieved text. Ground the answer and treat retrieved content as untrusted, especially for indirect injection.
Threats addressed
- Responses fabricated or not derivable from approved sources.
- Injected content in retrieved context influencing the answer.
AWS services
Framework mappings
OWASP GenAI/LLM Top 10 (2026)
- LLM07 Misinformation
- LLM08 Hidden Context Exposure
- LLM10 Improper Output Handling
NIST AI Risk Management Framework (AI 100-1)
- MEASURE.2 AI systems are evaluated for trustworthy characteristics
- MANAGE.1 AI risks are prioritized, responded to and managed
AWS Well-Architected Generative AI Lens (Security)
- GENSEC02-BP01 Implement guardrails to mitigate harmful or incorrect model responses
Learning resources
References
- AWS SRA for AI — Capability 3, Input and output validation
AI Security Maturity Model