1:1 mentoring with Big Tech AI engineers
RAG & MCP

RAG Best Practices

A cost-ordered ladder of fixes that says what each rung forces you to redo, how to ship a query-time change and cut over an index you can roll back, launch gates written as tests, and the levers that cut latency and cost.

Last updated

Production9 min readFirst readRAG EvaluationRAG Monitoring

After this section you can

  • Choose the rung that fixes the gate which lost the chunk, cheapest first
  • Ship a query-time change behind a flag, with a canary and a rollback
  • Write each launch gate as a test, and price a change at list prices
16

RAG Best Practices

When answers are wrong, which fix to try first, how to ship it safely, which tests must pass before launch, and what the bill and the latency depend on.

Key idea

A wrong answer has a gate that lost the right chunk, one of five checks in RAG Architecture. Climb the fix ladder from the cheapest rung that gate allows, ship one rung per release behind a flag, and ship nothing until its launch gates pass as tests.

Climb from the cheapest rung, and prove each one before it ships
THE FIX LADDER · CHEAPEST AT THE BOTTOMPROVE IT, THEN SHIP 5 · New model4 · Contextual chunks3 · Index2 · Query time1 · Confignew vector space, never mixedan LLM pass per chunkparsing, keyword leg, re-chunkingrewrite, reranker, fusion weightsN, k, prompt, abstain cutoff more reworkre-embed everythingone corpus passre-embed changed docsnothing storednothing stored Logged gate rankswhich gate lostthe gold chunk gate 1gate 2 or 3try one rungfails: climb a rungpassall pass Golden setEight launch gatesShip one rung per release real questions, gold chunk idspass at the 95% lower boundpermission, delete, freshness …each a test with a pass linerungs 1–2: behind a flagrungs 3–5: build beside, cut over

Wider than your screen? Scroll sideways.

Related

More in RAG & MCP

Get full access to all 149 sections with code examples, diagrams, and interactive animations.

Unlock Premium