Most wrong answers from a RAG system are retrieval failures in fluent prose, and this roadmap teaches you to catch them where they start: in parsing, chunking and search.
By the editors of the AI Agentic HandbookUpdated · 5 min read · Free, no sign-up
In brief
To become a RAG engineer, learn embeddings and vector search, then document ingestion and chunking, hybrid search with reranking, grounded generation with citations, retrieval evaluation, and finally production concerns like freshness, permissions and cost. At 10–12 hours a week this takes about four months.
A support team asks its new assistant how long customers have to return a damaged item. It answers thirty days, cites the returns policy, and is wrong. The policy does say thirty days, and then, in a table two pages later, fourteen for electrical goods. The parser flattened that table into a line of loose numbers, the chunker cut the exception away from the rule, and the model did exactly what it was asked with the evidence it was given. Every part of the failure happened before the model was called.
That is the RAG engineer's territory. The job is search engineering with a language model at the end of the pipe. Your days go on unglamorous questions: why a scanned contract came out of the parser in the wrong reading order, whether a part number is better found by keyword than by meaning, which of fifty candidates deserve the five places in the prompt, and how a document deleted on Tuesday is still being quoted on Thursday. You are answerable for one thing above all, that the right evidence reached the model, and you prove it with numbers.
The chapters follow the path a document takes. Embeddings and vector indexes come first, because every later trade-off is between recall and speed. Then ingestion, where most quality is won or lost, then hybrid search and reranking, then the prompt that turns evidence into a cited answer. Evaluation comes fifth, once there is a pipeline worth measuring. Production comes last, because freshness, permissions and cost only bite when documents keep changing and users are not all allowed to see the same things.
Each chapter ends with a project on a corpus you choose, ideally an ugly one with PDFs, tables and duplicates; clean Markdown teaches little. Keep one golden set of questions with the evidence marked and carry it through every chapter. If the "already there?" line describes you, skip the chapter and put the hours into the project.
Work through the chapters in order. Tick each step when you've done it; your progress stays in this browser. Use the filters to see only articles, concepts or interview practice, and skip any chapter you already know.
Chapter 1 · Weeks 1–3
How meaning becomes searchable
An embedding model turns a passage into a few hundred numbers, and a vector index finds the ones nearest a query in a few milliseconds. Both steps are approximate. The model decides what counts as similar, often not the way your users would, and the index skips most of the corpus to stay fast, giving up a little recall for speed you can tune.
The usual mistake is to read the similarity score as a measure of relevance. It measures closeness in one model's geometry, nothing more. A score of 0.82 means different things on different corpora, and a question about something your documents never mention still returns its nearest neighbours, neatly ranked. Learn what the numbers mean before you build anything on them.
By the end of this chapter You can embed text, search it by similarity and explain what the scores do and don't tell you.
Most RAG quality is decided before any search runs. A PDF stores characters and their positions, not paragraphs, so a naive extractor reads a two-column page straight across, folds the footer into the body and turns a price table into a row of orphaned numbers. Whatever comes out of the parser is all the retriever will ever see.
Chunking is where the second set of failures lives. Cut too small and a question whose answer spans two chunks finds only half of it: the rule in one, the exception in the next. Cut too large and the right sentence is diluted by everything around it. People choose 512 tokens because a tutorial did. Choose yours by measuring recall on questions with the evidence marked.
By the end of this chapter You can turn PDFs, tables and web pages into clean, well-sized chunks, and pick the chunk size by measurement.
Already there? You've chosen a chunking strategy by comparing recall across options on your own documents.
Vector search and keyword search fail in opposite ways. Embeddings handle paraphrase but blur exact strings, so an error code or a part number lands near its neighbours rather than on itself. BM25 matches the string exactly and has no idea that "cancel" and "terminate" mean the same thing. Run both, merge the two lists by rank, and each covers most of the other's misses.
A reranker then reads the question and each candidate together and puts the best few on top. The common mistake is adding one to a candidate pool that never contained the answer. Measure recall at fifty before recall at five. If the right chunk isn't among the candidates, no amount of reordering will produce it.
By the end of this chapter You can combine keyword and vector search, rerank the results and show the gain at each stage in numbers.
Already there? You've shipped hybrid search with a reranker and know your recall at each stage.
Retrieval hands you six good passages. The prompt still has to turn them into an answer a user can check. That means dropping near-duplicates, fitting a token budget, putting the strongest evidence where the model reads most carefully, and labelling every passage so each claim can point back to one.
Two failures dominate this chapter. The first is a fluent answer stitched partly from the passages and partly from the model's memory, with citations that look right and aren't. The second is a system that never says "I don't know", because nobody built a path for it. Treat abstention as a feature with its own test questions, and count refusals in your logs as carefully as you count answers.
By the end of this chapter You can assemble context so the model answers only from evidence, cites it, and abstains when the evidence isn't there.
Already there? Your RAG answers cite sources and refuse correctly on out-of-scope questions.
A RAG system can fail in two places, and they need different fixes. If the right passage never reached the prompt, the problem is retrieval, and no prompt change will help. If it was there and the answer still went wrong, the problem is generation. Score the two separately or you will spend a week tuning the wrong half.
The common error is handing everything to a model judge and trusting the dashboard. A judge that passes nearly everything looks, on a chart, just like a system that works. Label a sample yourself, check how often the judge agrees with you on the failures specifically, and read the traces before you decide which number to chase.
By the end of this chapter You can measure retrieval and generation separately and say where each failure comes from.
Already there? You report recall@k and faithfulness for your system and track them over time.
A demo index is built once. A real one changes every hour: documents are edited, retitled, deleted and re-permissioned in the systems they come from, and each change has to reach the index before someone asks about it. The worst production bugs are quiet. A policy withdrawn last week is still quoted because its chunks were never removed. An intern's question surfaces a passage from a board paper because permissions were checked after the search, or not at all.
So this chapter is plumbing: incremental ingestion keyed on content hashes, deletes that propagate everywhere, access control applied inside the retrieval query, and a cost per question you can explain line by line. Senior interviews probe this ground hardest.
By the end of this chapter You can keep the index fresh, enforce permissions at retrieval time and control cost at scale.
Already there? You've run a RAG system with incremental updates and per-user access control.
The plumbing that lets a pipeline survive restarts and reruns: pinned versions, sensible retries, content-hash ids. Port your own project alongside it.
The rule to take away: check permissions inside the search, never after it. Filtering afterwards leaks through bugs and leaves narrow users with empty answers.
If the right chunk never reaches the model, no prompt fixes it. Check recall on the failing question before you edit a single instruction.
Picking chunk size by habit
512 tokens with 10% overlap is where tutorials start, not an answer. Sweep a few sizes against evidence-span labels and take the smallest that scores near the best.
Vector-only search
Embeddings blur error codes, SKUs and names that keyword search finds at once. Run BM25 alongside and merge the lists with RRF.
Forgetting deletes
A document removed from the source but still in the index will keep being quoted, which is a compliance problem as much as a quality one. Propagate tombstones and test that a deleted file stops appearing.
A last word
By the end you will have a retrieval pipeline you can explain stage by stage, a golden set with the evidence marked, and a scoreboard showing what each layer added and what it cost. Your opinions about chunk sizes and rerankers will come from your own numbers, which is what makes them worth hearing in an interview.
The roadmaps below take the same retrieval layer in other directions: into agents that search as one tool among several, into the platform that runs evaluations and deployments, or back out to the broader AI engineering role. Your golden set travels with you to all three.
Take this roadmap with you
Copy every step as a Markdown checklist for Notion, GitHub Issues or your notes, or send someone the link.
A RAG engineer builds the retrieval layer behind AI answers — parsing and chunking documents, indexing them, combining keyword and vector search, reranking, and measuring retrieval quality so answers are grounded and cited.
Is RAG still relevant with long context windows?
Yes. Long context helps, but retrieval is still cheaper, faster, easier to keep fresh and easier to permission than putting everything in the prompt, and models still reason less reliably over very long inputs.
Do I need a vector database?
Not at first. Postgres with pgvector handles many production workloads. Move to a dedicated vector database when scale or filtering needs demand it.
What metrics should a RAG engineer track?
Recall@k and nDCG for retrieval, faithfulness and answer correctness for generation, plus latency and cost per query.
How long does this roadmap take?
About four months at 10–12 hours a week if you can already write Python.
Is this roadmap free?
Yes. Every step is a free handbook page or free official documentation.