Split the pipeline and test each stage on this one query; do not tune the prompt first.
Was it ingested? Check parsing (tables, scanned PDFs), chunk boundaries cutting the answer in half, and metadata filters excluding it.
Was it retrieved? Look at the top-k for that query. If missing, try query rewriting, hybrid search, a better embedding model, or different chunk sizes.
Was it ranked too low? If the chunk sits at rank 30, add a reranker or retrieve more candidates before reranking.
Did the LLM ignore it? If the chunk is in the prompt but the answer is still wrong: shorten the context, reorder chunks, strengthen the grounding instruction, and check for conflicting chunks.
Fix the class of failure: add the query to a regression eval set and re-run all evals before shipping.
Loading…