Debug a RAG pipeline
Finds whether bad answers come from retrieval, chunking, ranking or generation, with tests for each.
Use it when
Your AI search or chat gives wrong or vague answers.
What you fill in
- pipeline How documents are chunked, embedded, retrieved and passed to the model
- failures Example questions with the bad answers and what was retrieved
The prompt
Diagnose this retrieval-augmented generation pipeline. Pipeline: pipeline Failures (question, retrieved chunks, answer): failures For each failure, classify the cause: the answer is not in the corpus, retrieval missed it, ranking buried it, chunking split it, or the model ignored or misread it. Show the reasoning. Then propose fixes per cause (hybrid search, re-ranking, chunk size and overlap, query rewriting, citations required in the answer) and a small eval to measure each. Before you answer, check your draft against every instruction above and fix anything that misses.
Why it works
- Separates retrieval failures from generation failures.
- Classifies every failure before fixing.
- Measures each fix.