AI Help

How do I test whether retrieval or answer generation is causing my RAG chatbot’s mistakes?

Test retrieval and generation separately using questions with known supporting passages. This reveals where the answer pipeline first fails.

Steps to follow

  1. Build a small reviewed question set with the expected document and passage for each question.
  2. Measure whether retrieval returns the required evidence. Then give the generator the correct passage directly and score its answer.
  3. Classify failures by missing evidence, misread evidence or unsupported additions. Fix and retest the affected stage.

Example in practice

Illustrative example. If the generator answers correctly with the known paragraph but retrieval never returns it, prioritize retrieval changes.

Related AI help

Official guidance

OpenAI documentation