RAG revision
Practice this questionWANT TO UNDERSTAND THE CONCEPT FIRST?Learn RAG revision
Ingestion: approved source → secure parse/OCR → coherent chunks + metadata → embeddings → complete published index.
Answer: identity → eligible retrieval → rerank/context budget → grounded model → validated citations → answer/abstain.
| Advanced pattern | Purpose | Main risk |
|---|---|---|
| Rewrite | Resolve conversational/search wording | Changing intent or identifiers |
| Multi-query | Search alternative phrasings | Fan-out cost and duplication |
| Decomposition | Split compound questions | Losing how subanswers connect |
| Parent-child | Search precise pieces, provide full relevant section | Oversized context or mismatched permissions |
| Multi-hop | Follow dependent evidence | Compounding errors and latency |
| Agentic RAG | Let bounded agent choose retrieval steps | Loops and excess autonomy |
| Corrective/self-reflective | Check evidence/answer and apply bounded correction | Uncalibrated self-approval |
| Graph RAG | Retrieve through entity relationships | Incorrect extracted links and maintenance cost |
| Compression | Keep only useful evidence | Lost exceptions, numbers, or provenance |
RAG versus fine-tuning: retrieval supplies current external knowledge; training changes learned behavior. RAG versus long context: search a large changing corpus versus supply a known bounded document set. RAG versus search: generation adds explanation; returning sources can be sufficient.
Adapted from 13_AI.MD · “RAG revision”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.