Which of the following are augmentation sub-decisions in a production RAG pipeline? Select all that apply.
Augmentation is everything that happens between retrieval and generation: chunk ordering, grounding directives, and citation tagging. Reranking and query embedding are retrieval; fine-tuning changes the model.
Think of RAG as cooking dinner from a recipe box. Retrieval is fetching ingredients from the pantry: you embed the query and search the vector store. Generation is the chef cooking. Augmentation is everything in between: how you arrange the ingredients on the counter before the chef starts. You decide which order to lay them out so the most important one is not buried in the middle. You leave a sticky note saying 'only use what's on this counter, and label which item each dish came from.' That sticky note is your system prompt and your citation tags. Reranking is still pantry work: picking the best ingredients before they hit the counter. Fine-tuning is sending the chef to cooking school. None of those are arranging the counter, so none of them are augmentation.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: name the three stages, place each option on a stage boundary, then explain why ordering, directives, and citation tags are the augmentation levers and the rest are not.
# Stage boundaries in a RAG pipeline
# --- RETRIEVAL ---
qvec = embed(query) # query embedding (NOT augmentation)
cands = vector_store.search(qvec, k=20)
cands = reranker.rerank(query, cands)[:5] # reranking (NOT augmentation)
# --- AUGMENTATION ---
cands = order_for_attention(cands) # chunk ordering: best chunk at the edge
ctx = "\n".join(f"[{i+1}] {c.text}" for i, c in enumerate(cands)) # citation tagging
prompt = (
"Answer ONLY from the context. Cite chunks as [n]. "
"If context is insufficient, say you do not know.\n\n" # grounding directives
f"Context:\n{ctx}\n\nQuestion: {query}"
)
# --- GENERATION ---
answer = llm.generate(prompt)| Decision | Stage | Why |
|---|---|---|
| Chunk ordering in the prompt | Augmentation | Shapes the text the model reads; counters lost-in-the-middle |
| Grounding / refusal directives | Augmentation | System prompt governs how context is used |
| Citation tagging [1], [2] | Augmentation | Metadata in the prompt enabling attribution + eval |
| Cross-encoder reranking | Retrieval | Reorders candidates before the prompt is built |
| Query embedding | Retrieval | First step; triggers the vector lookup |
| Fine-tuning on grounded examples | Model training | Changes weights offline; orthogonal to the prompt |
Real products, models, and research that use this idea.
- Perplexity numbers its retrieved sources as inline citations and instructs the model to attribute each claim: citation tagging and grounding directives in action.
- Anthropic's Claude with the citations API tags document chunks so responses link claims back to source spans, an augmentation layer feature.
- LangChain and LlamaIndex expose chunk-ordering and prompt-template controls separately from their retriever and reranker components.
- Cohere Rerank 3.5 sits in the retrieval stage of production stacks, reordering candidates before the prompt-assembly step ever runs.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does chunk ordering in the prompt change answer quality even when the same chunks are present?
QHow would the citation tagging design connect to your RAG eval harness?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Lumping reranking and query embedding into augmentation. Both are retrieval-stage work that runs before the prompt is assembled, not decisions about how context is presented to the model.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.