An engineer at a Lisbon software company asks the internal HR assistant whether she can work from Brazil for three months next spring. The assistant answers confidently, citing the remote work policy, and says yes, with manager approval. The policy says nothing about working abroad. It covers home working inside Portugal. The paragraph the assistant cited was about equipment allowances, retrieved because it contained the words "remote" and "approval".
That answer should never have been generated. The retriever found nothing relevant, the model filled the gap, and no part of the pipeline was allowed to say "I do not know". Adding an abstention rule is easy. Choosing where to put its threshold, and proving the choice is right, is the part most teams skip.
Five terms to fix before any threshold
An abstention threshold is a cutoff on some confidence signal: below it the system declines to answer and routes the question elsewhere. Evaluating it needs vocabulary that ordinary RAG metrics do not supply, because accuracy on its own hides the trade-off.
Abstention: a deliberate refusal to answer, with a useful fallback such as "this is not covered in the policies I can see; HR can answer at this address". A refusal with no fallback is a dead end and users stop asking.
Coverage: the share of all questions the system answers. A system that answers 300 of 400 questions has 75 percent coverage.
Selective accuracy: accuracy measured only on the questions the system chose to answer. This is the number users experience when they get a reply.
False abstention: a refusal on a question the corpus could have answered. It costs a human's time and some trust.
Unanswerable question: a question whose answer is not in the corpus, including near misses that share vocabulary with real documents. These are the questions that produce confident wrong answers.
The research version of this idea is older than RAG. Selective classification, studied for neural networks by Yonatan Geifman and Ran El-Yaniv in 2017, plots risk against coverage, and the same picture applies here: every threshold is a point on a curve, and the job is to pick the point whose errors you can afford. Reading comprehension benchmarks took the hint too. SQuAD 2.0, released in 2018, added more than 50,000 unanswerable questions written to look answerable, because models trained only on answerable ones learned to guess.
Which signal to threshold
Before choosing a number, choose what the number measures. The options differ in cost, in how well they separate good answers from bad ones, and in how they fail.
| Signal | What it measures | Extra cost per query | Typical failure |
|---|---|---|---|
| Top-1 embedding similarity | How close the best chunk is to the query vector | None | Scores shift when you change embedding models; keyword overlap looks relevant |
| Cross-encoder reranker score | How well query and chunk match when read together | One reranker pass, tens of milliseconds | Needs per-language checks; scores vary across models |
| Model judges answerability | The LLM decides whether the context contains the answer | One extra call or a structured field | Overconfident on near misses; drifts with prompt edits |
| Groundedness check on the draft | Whether each claim in the answer is supported by the retrieved text | One extra call or an NLI model | Catches invented details, misses wrong but supported answers |
| Combined rule | Reranker cutoff plus a groundedness check | Both | More moving parts to recalibrate |
Raw embedding similarity is the tempting default because it is free, and it is the weakest. Cosine scores from different embedding models live on different scales, and within one model a chunk that shares the words "remote" and "approval" can score as high as one that answers the question.
A cross-encoder reranker, such as the open BAAI bge-reranker models or a hosted service like Cohere Rerank, reads query and chunk together and separates relevant from merely similar far better. For most teams, a reranker score plus a groundedness check on the final answer is the practical combination. Tools such as Ragas implement a faithfulness metric of this kind, which you can reuse for offline evaluation even if production uses a cheaper check.
Running the evaluation in five steps
The method below fits a team with a few days and an existing RAG system. The numbers in the worked sweep are illustrative, from an HR policy assistant with a mixed Portuguese and English corpus.
- Build a labelled set of at least 400 questions. Take 300 answerable questions from real logs or from people who know the documents, each with the passage that answers it. Write 100 unanswerable ones: half clearly out of scope, half near misses that reuse document vocabulary, like the working abroad question.
- Run the whole pipeline on every question and log the candidate signal, here the top reranker score, together with the generated answer. Have a person or a carefully checked judge model label each answer correct or wrong.
- Sweep the threshold. For each candidate cutoff, compute coverage, selective accuracy, wrong answers and false abstentions.
- Price the errors. Agree, with the people who own the risk, how much worse a wrong answer is than a refusal.
- Pick the cutoff with the lowest expected cost, then confirm it on a fresh set of at least 100 questions the team has not looked at.
Here is the sweep for three cutoffs on the reranker score.
| Cutoff | Answered | Wrong answers | Coverage | Selective accuracy | False abstentions |
|---|---|---|---|---|---|
| 0.30 | 352 | 91 | 88.0% | 74.1% | 10 of 300 |
| 0.50 | 283 | 36 | 70.8% | 87.3% | 38 of 300 |
| 0.70 | 205 | 9 | 51.2% | 95.6% | 99 of 300 |
At 0.30, the system answers 62 of the 100 unanswerable questions, every one of them wrongly. At 0.70 it answers only 4, but refuses a third of the questions it could have handled. If a wrong answer costs ten times a refusal, the expected costs are 920, 398 and 189 units, and 0.70 wins. If a wrong answer only costs twice a refusal, they become 192, 110 and 117, and 0.50 is the better cutoff. The threshold follows from the price of errors, not from the score distribution.
A decision tree for the cutoff and its review
The sweep tells you where the curve is. These questions tell you which point to stand on and how often to move.
- Can a wrong answer cause harm, such as a pay, contract, legal or health consequence? If yes, price wrong answers at least ten times a refusal and go to question 3. If no, go to question 2.
- Will users simply ask a colleague when the assistant refuses? If yes, a cost ratio near 2 to 1 is reasonable. If no, because the assistant is the only channel, raise the ratio and make the refusal message point somewhere useful.
- Does the corpus mix languages, for example Portuguese policies and English questions? If yes, run the sweep separately per language pair; reranker scores often sit lower across languages, and one global cutoff will over-refuse in one of them. If no, one cutoff is usually enough.
- Has the corpus, the embedding model, the reranker or the prompt changed since the last sweep? If yes, rerun steps 2 and 3 before the change ships. If no, rerun at least once a quarter on fresh logged questions.
- Does the confirmed selective accuracy on the fresh set fall more than 3 points below the sweep? If yes, the eval set is not representative; add questions from real logs and repeat. If no, ship the cutoff.
Keep the review cheap or it will not happen. Logging the reranker score next to every production answer costs a few bytes per query, and a monthly sample of 50 refusals and 50 answers, read by one person in about an hour, catches most drift before users report it.
Mistakes that make the threshold look better than it is
- Leaving unanswerable questions out of the set. Without them, every threshold looks safe and the lowest one looks best.
- Writing only obvious unanswerables. "What is the capital of Peru?" is easy to refuse; the near miss with document vocabulary is the one that slips through.
- Tuning and reporting on the same questions. The confirmed number on a fresh set is the only honest one.
- Copying a cosine cutoff from a blog post. A 0.8 similarity means different things for different embedding models.
- Measuring only selective accuracy. A system that answers 10 percent of questions can be 99 percent accurate and useless.
- Treating refusals as free. Each false abstention sends someone to HR or to a colleague; count them.
- Ignoring what users do after a refusal. If most people rephrase and get an answer on the second try, the cutoff is fine and the retriever needs better query handling, not a lower threshold.
- Letting the judge model grade itself. If the same model generates and grades, check a sample of at least 50 grades by hand.
The verdict is a trade-off you cannot avoid, only choose. A high threshold buys accuracy with coverage, and users will feel the refusals before they notice the missing mistakes. A low one keeps the assistant chatty and lets it invent a remote work policy now and then. For anything touching contracts, pay or the law, take the higher cutoff, make every refusal point to a person, and accept a coverage number that looks modest on a dashboard.