When RAG, and when not
For engineers
Choosing between retrieval, long context, fine-tuning, tools and plain prompting for a knowledge problem, based on corpus size, freshness, cost and accuracy needs
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
A 50,000-token policy document gets about 15 questions a day. Which approach is the best first version?
Check yourself · 2 of 5
Support answers quote last quarter's price list. Which gap is this?
Check yourself · 3 of 5
A user asks, "How many support tickets are open right now?" Which design fits?
Check yourself · 4 of 5
What belongs in the review-trigger line of an architecture decision?
Check yourself · 5 of 5
A pricing table was split in the middle, so no chunk holds the full table. Which stage is at fault?
Topics
- Retrieval versus stuffing the context window4 min read · When a corpus fits in a million-token window with prompt caching, and when size, cost, latency and lost-in-the-middle effects make retrieval the better choice
- Fine-tuning teaches behaviour, retrieval supplies facts4 min read · Why fine-tuning is poor at adding fresh or citable knowledge, and where it still helps with format, tone and domain vocabulary
- Live tool calls versus a prebuilt index4 min read · Calling an API, SQL query or web search at question time instead of indexing a copy, for data that changes by the minute or needs exact lookups
- Choosing a knowledge strategy for a product5 min read · A decision path through corpus size, update rate, access rules, citation needs and budget that ends in one architecture
- Anatomy of a retrieval pipeline end to end5 min read · The stages from ingestion and chunking through indexing, query handling, retrieval, reranking, generation and citation, and what fails at each
Start here
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (opens in a new tab)PaperFree
The paper that named RAG: a model that reads retrieved passages instead of relying on memory alone.
- Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approach (opens in a new tab)PaperFree
Measures long context against RAG on the same tasks and shows the cost gap that a hybrid router exploits.
- Optimizing LLM accuracy (OpenAI) (opens in a new tab)DocsFree
Frames the choice as context problems versus behaviour problems: RAG for the first, fine-tuning for the second.
Helps to know first
110 questions · last verified 2026-12