Joel Stevick

Episode 1 of 3 · 11:54

RAG Debugging: Retrieval, Reranking or Generation?

What this episode covers

Your RAG app gave a wrong answer: which stage failed? On a real pipeline and its real eval harness: the three stages a passage passes through (retrieval into a pool of 48, re-ranking into a context of 12 widened by neighbours, generation checked sentence by sentence), a golden set with the exact passages that hold each answer, and the three columns that say which stage dropped a passage. Three real misses from the runs: a retrieval miss fixed by a bigger pool, a reranker miss, and a generation miss in the answer check itself. Then why search needs a second pass: BM25 and vector search, cosine similarity, reciprocal rank fusion, a language-model reranker (Claude Haiku, its reasoning tokens and output limit), and cross-encoders against bi-encoders. And a fix that broke a case.

At the end: you can tell from three columns of an eval run whether retrieval, re-ranking or generation lost the passage that holds the answer.