Free courses in AI, Data Science & Machine Learning Written lessons · Quizzes · Final exams
Future Data Academy
Log inGet started ↗
← Retrieval-Augmented Generation (RAG)
FREE LESSON PREVIEW

Retrieval diagnosis and access control

The decision

A document assistant retrieves evidence before generating. A failure may come from an absent source, indexing, retrieval or an answer that ignores the evidence. Diagnose the stages separately and enforce permissions before restricted content enters context.

Synthetic case data

case,evidence_retrieved,answer_supported
1,1,1
2,1,0
3,0,0
4,1,1
5,0,0

Work it through

Before reading the worked analysis, identify the unit of observation, required quantities and missing information. Write your own answer, including units and a limitation.

Worked analysis

Retrieval coverage is 3/5=60%. Support among retrieved cases is 2/3≈66.7%, while end-to-end support is 2/5=40%. Case 2 calls for grounding review; cases 3 and 5 need collection and retrieval diagnosis. A citation must identify the actual supporting passage and version, not merely a similar title. Retrieved instructions requesting secrets remain untrusted. Conflicting policy versions need a declared authority rule or explicit uncertainty. Missing permitted evidence does not prove a proposition false.

Independent challenge

Build a five-document synthetic collection with version dates and access labels. Write ten questions covering answerable, absent, conflicting and restricted evidence. Record expected and retrieved passages, answer support and one targeted fix per failure type.

Acceptance checks

Restricted passages must never enter an unauthorised context. Preserve source versions. Report collection coverage separately from generation faithfulness and retest using the same rubric.

Further reading

Official reference. This original academy exercise uses synthetic data; the reference provides background and does not endorse the academy.

Explore the full course →