PE-13 Retrieval-augmented analysis (RAG (retrieval-augmented generation); grounded question answering over a corpus)
Retrieve passages relevant to a question and have a model answer from them with citations, giving an answer with quoted passages and a claims register.
What it does
Retrieves passages relevant to a question and has a model answer from them, with citations. Artefact: an answer with quoted passages and references. Read the passages first and verify each cited claim.
When to use it
Use when you have a question that a few passages in a large corpus can answer and you need cited support.
When it does not fit
Fits questions that a few passages answer. Retrieval gives examples, not prevalence.
Result format
The result is an answer to the question made of cited claims, each with its quoted passage and reference. It lists the retrieved passages first and marks each cited claim as verified or not against its passage.
Requirements on the material
| Property | Requirement type | Requirement |
|---|---|---|
| Structure | Applies in some cases | requires=unstructured; requires=semi-structured |
| Content type | Always applies | requires=text |
| Unit of analysis | Always applies | requires=document; requires=topic |
| Appraises source credibility | Applies in some cases | no |
Not restricted on: Variable types, Time structure, How the sample was chosen, Level of detail available, Number of sources, Whether sources can be joined, Amount of material, Known data problems, Producer interest, Source dependence, Origin, Document genre, Language, Personal information, Security classification, Licence.
| Minimum material | none |
|---|---|
| Additional sources needed | none |
| Not for (rules) | none |
| Not for (text) | The question asks for prevalence or counts across the corpus, since retrieval returns examples and not frequencies. |
Choosing and ordering
| Kind of technique | Primary technique, runs in step 5.3 |
|---|---|
| Phase tag | analyse |
| Other phase tags | verify and prepare |
| Kind of finding | pattern |
| Question answered | what |
| Strongest statement it supports | describe |
| Needs as input |
|
| Makes as output |
|
| Must exist first | None |
| Loop target | proceed with limit stated |
Library checks by stakes
Each stakes level includes the checks of the level below it. Checks that need a person apply at high stakes only, so the process leaves them out at lower stakes (decision 38). Repeatability: judgement dependent.
| Stakes | Check | Person involved | Counts as a different method |
|---|---|---|---|
| exploratory | spot check | optional | no |
| decision-informing | spot check | optional | no |
| decision-informing | source-span citation | none | no |
| decision-informing | human review sample | needed; left out below high stakes | no |
| decision-informing | prompt variation | none | no |
| high-stakes | spot check | optional | no |
| high-stakes | source-span citation | none | no |
| high-stakes | human review sample | needed | no |
| high-stakes | prompt variation | none | no |
| high-stakes | independent review | needed | no |
| high-stakes | provenance log | none | no |
Failure modes and limits
| Model suitability | model plus code |
|---|---|
| Typical model failure | Attaches citations that do not support the sentence they follow, and treats retrieved examples as typical of the corpus. |
| Error sources | input data; language model |
| Certainty limits | Certainty drops because sentences are often not fully supported by their citations (risk of bias) and retrieval may miss relevant passages (reporting bias). |
Related techniques
- pairs with CK-21 Reference-free grounding metrics for retrieval-augmented answers (Ragas; faithfulness, answer relevance and context relevance scoring): reference-free grounding metrics score retrieval and faithfulness
- pairs with CK-17 Source-span and quotation check by code (quote-and-verify; extractive grounding; citation verification): a source-span check by code confirms each quoted passage exists
Evidence and tag basis
Tested. In generative search engines only 51.5 per cent of sentences were fully supported by their citations and 74.5 per cent of citations supported their sentence (2023). The original retrieval-augmented generator paper calls provenance for outputs an open problem. (Liu et al. 2023, verifiability in generative search engines; Lewis et al. 2020, arXiv 2005.11401)
Tag basis: input profile inference; selection inference; sequencing inference; robustness inference. All tag values are inference unless a source is named.