Artificial intelligence · lesson 2 of 4
Retrieval-augmented generation and evidence grounding
Retrieval-augmented generation first retrieves relevant source material, then conditions generation on selected context. It does not automatically make every answer correct.
Learn the ideas
Prerequisites: Embeddings, search and language-model basics.
Pipeline
Retrieval-augmented generation first retrieves relevant source material, then conditions generation on selected context. It does not automatically make every answer correct.
Index
Chunking, document metadata and retrieval ranking influence what evidence reaches the model. Access controls must be applied before unauthorized material is retrieved.
Evidence
A useful citation points to a passage that actually supports the claim. Retrieval relevance and answer faithfulness should be evaluated separately.
Untrusted text
Retrieved documents are data, not instructions with authority over the application. Prompt injection risks require boundaries beyond just wording a prompt carefully.
Worked examples
What does retrieval add to a generation pipeline?
Retrieved context can provide evidence but still needs correct use.
Selected external context
When should document permissions be enforced?
Retrieval must not bypass access control.
Before unauthorized content is retrieved or exposed
Check your understanding
8 questionsDecimals or fractions are accepted for numeric answers. Proofs and written responses use sample answers and require human marking. This is practice, not a protected examination.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.