You are designing a retrieval-augmented generation (RAG) system where the prompt must cite sources from documents stored in an AWS account. Which design most directly enforces that citations come from retrieved context rather than hallucinated content?

Answer

Use a retriever to supply only the top-k passages as context, and constrain the generation to use that context for answers

Explanation

RAG systems that force the model to ground outputs in retrieved passages reduce unsupported claims. Constraining generation to use provided context makes citations more reliable than free-form generation.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list