Ask this site how RAG works and you get a full mechanism walkthrough; ask what the surrounding vocabulary means and you land here. This seventh glossary lesson collects the RAG terms that fill vendor docs, product notes, and our own RAG writing practices on AWS, from grounding to lost in the middle. Each entry gets a sentence or two in plain language, plus a link where the site already teaches the mechanism in depth.
The pattern that gives a model fresh facts
Three terms for the idea itself, before any pipeline detail.
- Retrieval-augmented generation: The recipe of fetching documents related to the question and handing them to the model inside the prompt, so the answer draws on material the model never memorized. The model still writes the answer; retrieval only decides what it gets to read.
- Grounding: The property that an answer is tied to specific retrieved evidence rather than to the model’s internal memory alone. A grounded answer can still be wrong when its source is wrong, but it is wrong in a traceable way, which is what auditability buys you.
- Citation and attribution: The practice of showing which retrieved passage backs each claim in the answer. Systems that do this well attach sources inline, so a reader can check the chain from question to evidence to sentence without trusting anyone’s word.
The pipeline behind a grounded answer
Four RAG terms for the conveyor belt that turns raw documents into retrieved context.
- Ingestion pipeline: Everything that happens before a question arrives: loading sources, cleaning them, splitting, embedding, and indexing the results. When RAG disappoints, the cause is usually here, in stale or badly prepared documents, not in the model.
- Chunking: Splitting long documents into passages small enough to embed and return. Fixed-size cuts are the baseline; semantic chunking instead splits where the topic shifts, trading preprocessing effort for retrieval units that each mean one thing.
- Top-k retrieval: Returning the k passages most similar to the query, with k usually set between three and ten. The value is a real tradeoff: raising k improves the odds that the needed fact was fetched while diluting the context with passages that only look related.
- Lost in the middle: The measured tendency of language models to lean on the beginning and end of a long context and neglect what sits between them. This is why stacking more retrieved passages stops helping, and why ordering and reranking earn their keep.
Retrieval upgrades you will hear named
Four techniques that improve what top-k returns; each has a paper behind it and a vendor feature named after it.
- Query rewriting: Restating or expanding what the user typed before searching, because a person’s phrasing rarely matches the wording inside the index. HyDE takes this the furthest, drafting a hypothetical answer first and searching with that text instead.
- Contextual retrieval: Prepending a short, position-aware summary to every chunk at index time so the chunk can stand alone outside its document. One cheap model pass per chunk measurably cuts failed retrievals, because passages stop losing their referents.
- Parent-document retrieval: Indexing small, precise passages but returning their larger parent section for generation. The search matches sharply while the model still answers with the surrounding context; you will also hear this called small-to-big retrieval.
- Multi-hop retrieval: Searching repeatedly, letting each result shape the next query, because the answer needs facts chained across documents. GraphRAG extends the same instinct by indexing entities and the relationships between them instead of passages alone.
RAG that directs itself and checks itself
Two newer entries: one lets the model drive the retrieval, the other grades the result.
- Agentic RAG: A setup in which the model decides when to search, what to search for, and whether the results justify another pass, instead of following a fixed retrieve-then-generate sequence. It is the bridge from this lesson into the agent vocabulary of the next one.
- RAG evaluation: Scoring the pipeline by its own steps: whether the fetched context was relevant, whether the answer stayed faithful to that context, and whether anything essential went missing. Faithfulness, context precision, and context recall are the three names you will meet in tooling.
Common confusions
Three pairings that get mixed up in planning meetings more than anywhere else.
- RAG vs fine-tuning: RAG changes what the model reads; fine-tuning changes what the model is. Fresh, changing, or citable facts belong in retrieval; stable behavior, format, and tone belong in weights. Most complaints that a model does not know something are retrieval problems wearing a training costume.
- Long context vs RAG: A large context window can hold a whole document dump, and for one small corpus that is genuinely enough. Retrieval still wins when the corpus outgrows any window, when you need citations per claim, or when reprocessing the entire pile for every question would cost too much.
- Grounding vs citation: Grounding means the answer actually conditions on retrieved evidence; citation means showing the reader that it did. An answer can display sources it never used, which is exactly why the two words are not interchangeable.
Further reading
Three primary sources behind the entries above:
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, the 2020 paper that gave the pattern its name.
- Lost in the Middle, the study that measured where models actually look inside long contexts.
- Contextual Retrieval, Anthropic’s writeup of chunk-context summaries and the retrieval gains they measured.
This is lesson 07 of the AI glossary. Lesson 06 pinned down the embedding and vector search terms every pipeline in this lesson depends on, and the RAG course in our learning picks turns this vocabulary into hands-on practice. The next lesson hands the model the steering wheel: agents, tools, and protocols for both.