RAG Doctor

Interview question: "Your chatbot gives wrong answers — troubleshoot it." A RAG (Retrieval-Augmented Generation) pipeline has many failure points. Toggle each stage between healthy and broken and watch the query flow break down in 3D, then read the fix.

Query: "What's our refund policy?" — click a stage to break it and watch the answer degrade.

PIPELINE STAGES · click to toggle

1 · Chunkinghealthy
2 · Embeddinghealthy
3 · Retrievalhealthy
4 · Context windowhealthy
5 · Prompt qualityhealthy
ANSWER ACCURACY
96%
All stages healthy. The model retrieves the right chunk and answers correctly.

Chunking strategy

Documents are split into chunks before embedding. Chunks too large dilute relevance; too small lose context. Break this and the right passage never fits cleanly into one retrievable unit — answers get vague.

Embedding quality

Text becomes vectors. A weak or mismatched embedding model maps "refund" and "return" far apart in vector space, so semantically-relevant chunks score low. Garbage vectors → garbage retrieval.

Retrieval & context

Even with good vectors, top-k retrieval can miss the answer if k is too small or a reranker is absent. And if retrieved text overflows the context window, the model silently drops the part that mattered.

Prompt quality

The final prompt must instruct the model to answer only from context and say "I don't know" otherwise. A loose prompt lets the model ignore retrieved docs and hallucinate from training data — the classic wrong-answer bug.
Enjoy this tool? Build your own with Super