Reading notes from 2024; revised November 17, 2026. Reported architecture and scale refer to the source period.
Retrieval can happen without retraining the generator
The original RAG paper studies a trained formulation combining parametric and retrieved information. Many application pipelines instead retrieve documents at inference time and place them into a prompt for an existing model. Joint training is not a requirement for every system called RAG.
Ingest before answering
Parse documents, split them into useful units, attach provenance and access metadata, then index them. Dense embeddings are one retrieval method; keyword/sparse and hybrid methods can also be appropriate. A query and document need compatible representations, not simply any model named BERT or GPT.
A small example
Imagine a support question about a cancellation window. Retrieve the relevant policy revision, optionally rerank candidate passages, and provide the selected text with its source to the generator. Ask for an answer that cites the supporting passage and abstains when evidence is missing.
The retrieval path should enforce the caller’s access rights before content reaches the model. A citation does not repair disclosure of a document the caller was not authorized to read.
Evaluate the stages independently
| Stage | Check |
|---|---|
| Parsing/chunking | Does the relevant condition stay attached to its exception? |
| Retrieval | Is the right revision found among the candidates? |
| Reranking | Does a more expensive stage improve useful ordering? |
| Generation | Is the answer supported, complete, and properly qualified? |
| Operations | Can stale or deleted documents be removed promptly? |
Use held-out questions, including ambiguous and unanswerable ones. A fluent answer is not evidence of a successful retrieval pipeline.
A runnable retrieval-only exercise is in Haystack; Bedrock Knowledge Bases covers a managed boundary.
Conceptual illustration; labels describe responsibilities, not a deployment specification.