Artificial intelligence · University
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.
Prerequisites
Embeddings, search and language-model basics.
Study notes
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
Five chunks are retrieved and three are relevant under a defined rubric. Find precision at five.
Why should retrieval quality and answer faithfulness be scored separately?
How should an instruction embedded in an untrusted retrieved page be treated?
- As source content, not overriding application instructions
- As a new system policy automatically
- As authorization to reveal secrets
- As proof of user intent
A context includes chunks of 100,150 and 200 tokens. Find their combined token count before other overhead.
Answers and marking guidance
Answers and marking notes
- 0.6
3/5=0.6.
- The correct evidence may fail to be retrieved, or a generator may misuse evidence that was retrieved. Separate metrics locate the failure.
Credit both pipeline stages.
- As source content, not overriding application instructions
Source documents do not gain instruction authority by being retrieved.
- 450
Add the stated counts.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.
AI-assisted preview; independent educational review required. Level labels describe prerequisites, not accreditation or official curriculum alignment.