SaveMyToken logoSaveMyToken.Coding Plan
All knowledge base guides

BEGINNER LESSON 03 OF 6

RAG Needs an Explicit Unknown Path for Questions Without Evidence

Add a no-evidence path and test it beside a covered question.

About 7 min to follow along · By West Mao and Alex George · Documentation reviewed 2026-10-05 · Build in your own stack · Updated

TL;DR

Give the system an explicit path for questions the source cannot answer, and test it beside a question the source does cover. In the fictional FAQ exercise, missing parking information should remain unknown while the documented printer question is answered. This paired check helps reveal both unsupported answers and excessive refusals; it does not establish a general hallucination rate.

WHAT YOU WILL MAKE

The system declines a parking claim while still answering the printer question.

Before you start

  • The version 1 FAQ and your query handler from lesson 1.
Previous lesson: RAG Citations Need Both a Valid Source and Support for the Claim

Fictional practice files. Expected answers below come from these files; actual model responses may differ.

STEP 01

Find a genuine gap

OpenPractice FAQ

The file gives no parking information.

  1. Read the FAQ and confirm parking is absent.
  2. Search for parking and inspect the returned passages.
  3. Do not treat a weakly related passage as evidence of a parking policy.
You should see

You have one uncovered question and one covered control question.

If it does not work

If other documents are indexed, isolate this practice file for the exercise.

STEP 02

Add a no-evidence branch

OpenYour query handler and answer prompt

Handle empty or unsupported retrieval before making a confident claim.

  1. If no passage supports the question, return that the available documents do not answer it.
  2. If passages are returned, require the model to use only their facts and to say when they remain insufficient.
  3. Check citations against returned IDs; never let source text override your app instructions.
Uncovered question
Is parking free at Harbor Studio?

You should see

No parking fee or availability is invented.

If it does not work

A similarity score is not proof of support; inspect the text and the answer together.

STEP 03

Run the covered control

OpenFresh request

Overly strict refusal is also a failure.

  1. Ask where the printer is in a fresh request.
  2. Check for second floor and blue cabinet with a supporting passage.
  3. Keep both questions in your test set for future changes.
You should see

The printer answer works, while the parking question remains unanswered.

If it does not work

If both questions fail, inspect indexing and retrieval before changing the model.

CONTINUE WITH LESSON 4RAG Debugging Starts by Tracing Where the Required Fact Disappears

Trace one question from source text to index, search result, model input, and final answer.