Skip to content

Advanced RAG: query rewriting, reranking, agentic RAG, long context vs RAG

  • RAG
  • Asked often
  • About 1 h 40 min to learn
  • 4 vetted resources
Build a plan that includes this

What this topic covers

Naive RAG (embed, top-k, stuff into prompt) is rarely good enough, and the interview question is always 'what would you do next?'. The standard upgrades are: fix the query before retrieval (rewriting, decomposition into sub-queries, routing to the right index), fix the candidates after retrieval (cross-encoder reranking, compression), and let the model drive retrieval in a loop (iterative or agentic RAG, where the LLM decides whether, where and how to search again). The newer framing is context engineering: with million-token windows, when do you still retrieve, and why does stuffing everything in degrade quality? Be ready to defend a pipeline design with latency and cost numbers, and to say which upgrade you'd try first and how you'd know it helped.

You’re ready when you can

What interviewers check, from the resources below.

  • List the two limits of a single-shot RAG pipeline and how an agent loop removes each
  • Compare a single-agent router with a multi-agent retrieval setup and say when each is overkill
  • Explain where query rewriting and result validation sit in the agent loop
  • Name the latency and reliability costs of agentic RAG and one mitigation for each
  • Sort query expansion, HyDE-style transformation, routing, reranking and compression into pre- vs. post-retrieval
  • Explain what a cross-encoder reranker does that the first-stage retriever can't, and why it only runs on a small candidate set
  • Distinguish iterative, recursive and adaptive retrieval with one example use each
  • Give two reasons to keep RAG even with a long-context model
  • Explain context rot and why a bigger window doesn't remove the need for retrieval
  • Contrast pre-computed embedding retrieval with just-in-time, tool-driven retrieval on latency, freshness and precision

What to study, in order

Each link opened and checked by hand; the date says when.

  1. Start here

    What Is Agentic RAG? From LLM RAG to AI Agents (opens in a new tab)

    Weaviate Blog · Erika Shorten and Leonie Monigatti · 25 min · Free · checked 21 Oct 2026

    Why
    The most common 'how would you go beyond naive RAG' answer in 2025-26 interviews is routing plus iterative retrieval, and this is the clearest short explanation of what that adds and what it costs.
    What to read
    Read “What is Agentic RAG?” (with “How does Agentic RAG work?” and “Agentic RAG Architecture”), the comparison table in “Agentic RAG vs. (Vanilla) RAG”, and “Benefits of Agentic RAG” / “Limitations of Agentic RAG”. Skim “Language Models with Function Calling” for the routing code shape.
    What to skip
    “Fundamentals of Agentic RAG” if you've done the rag-retrieval and tool-calling topics, “Agent Frameworks”, and “Ready to start building?”.
  2. Free alternative

    Retrieval-Augmented Generation for Large Language Models: A Survey (opens in a new tab)

    arXiv · Yunfan Gao et al. · 50 min · Free · checked 21 Oct 2026

    Why
    Gives you the taxonomy (naive / advanced / modular; pre-retrieval vs. post-retrieval) that lets you organise an answer about query rewriting, reranking and iterative retrieval instead of listing tricks.
    What to read
    Read sections II-A to II-C (“Naive RAG”, “Advanced RAG”, “Modular RAG”), III-C “Query Optimization” (expansion, transformation, routing), IV-A “Context Curation” (reranking, compression), V “Augmentation process in RAG” (iterative / recursive / adaptive retrieval) and VII-A “RAG vs Long Context”.
    What to skip
    III-A, III-B, III-D/E (indexing and embedding fine-tuning, covered by rag-retrieval), VI (evaluation, covered by rag-evaluation) and VII-B onward.
  3. Go deeper

    Effective context engineering for AI agents (opens in a new tab)

    Anthropic Engineering · Prithvi Rajasekaran, Ethan Dixon, Carly Ryan, Jeremy Hadfield · 25 min · Free · checked 21 Oct 2026

    Why
    The 'long context vs RAG' question has shifted to 'when should the agent retrieve just-in-time instead of pre-loading', and this is the vendor-side argument interviewers now quote.
    What to read
    Read “Why context engineering is important to building capable agents” (context rot), “Context retrieval and agentic search” (pre-inference embedding retrieval vs. just-in-time loading, the hybrid) and “Context engineering for long-horizon tasks” (compaction, structured note-taking, sub-agents).
    What to skip
    “Context engineering vs. prompt engineering”, “The anatomy of effective context” (system-prompt and tool-design advice, not RAG) and the acknowledgements.
  4. Go deeper

    ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT (opens in a new tab)

    arXiv · Omar Khattab et al. · 35 min · Free · checked 22 Oct 2026

    Why
    Late interaction sits between bi-encoders and cross-encoders, and it’s the usual answer when an interviewer asks how to get reranker quality at retrieval speed.
    What to read
    Read §3.1 with Figure 2 (bi-encoder, cross-encoder and late interaction compared), §3.3 on the MaxSim operator and §3.4 on offline indexing. Then read §3.5–3.6 (re-ranking versus end-to-end retrieval) and the quality–cost trade-off in §4.2 with Figure 1.
    What to skip
    Skip §2 related work, §4.1 methodology and §4.4–4.5 ablations and index footprint beyond the storage takeaway.

Companies that test RAG most

Put Advanced RAG in your plan

Tell us your interview date and hours a day; it lands on the right day, in the right order.

Build my plan