How do you test whether an LLM should answer or abstain?
An LLM can look safer by refusing useful questions. Test the decision to answer separately from the correctness of the answer.
Test two decisions separately: whether the supplied evidence supports an answer, and whether the model’s answer is correct. Use held-out questions with and without sufficient evidence. Count unsupported answers, incorrect answers to answerable questions, and unnecessary abstentions. A lower error rate among delivered answers is useful only alongside the share of requests the system actually answers.
If you run your own evaluation program, Nodus Jobs provide a way to run a command, watch progress and retrieve outputs. You supply the test cases, labels and scoring rules. Compute execution does not establish that the model’s decision to answer is trustworthy.
The buying decision is concrete: will this candidate answer enough useful questions while declining the ones it cannot support? A confident response to every request and a refusal to every request are both poor answers to that question.
Define what makes a question answerable
Section titled “Define what makes a question answerable”Answerability depends on the information and permissions available for that task, not just what a model might remember.
Consider a support assistant asked when a particular order will arrive. A shipping policy may explain typical delivery windows without providing the order’s current status. The policy can support an explanation of the usual window, but not a precise arrival promise for that order.
Write the expected behavior before looking at model outputs. A complete answer, a bounded partial answer, a clarification request and an explicit abstention can all be legitimate outcomes. Decide which are acceptable for each case. Do not reward a vague response that avoids the question while sounding helpful.
Keep lack of evidence separate from prohibited assistance. A model may have enough information to answer a request that the application must refuse. That is a policy decision, not evidence that the question is unanswerable. Score those categories separately so a safety refusal does not hide a knowledge limitation.
Use matched cases that change the evidence
Section titled “Use matched cases that change the evidence”An answerable-only test cannot measure whether a model recognizes missing support. An obviously unrelated question is also a weak test: the difficult case is a plausible request that almost has enough evidence.
The SQuAD 2.0 paper makes this distinction explicit by including unanswerable questions that resemble answerable ones. Its reading-comprehension setting is narrower than a full application, but the test-design lesson transfers: plausible missing-answer cases matter.
For your own application, construct matched groups:
- Sufficient evidence: the supplied material contains the fact needed to answer.
- Missing decisive evidence: the material discusses the topic but omits the requested fact.
- Ambiguous evidence: the request could refer to different entities or periods.
- Partial evidence: some parts of the request are supported and others are not.
For example, ask for an invoice’s payment date with and without the payment confirmation included. Keep the question and surrounding material comparable. Have an authorized reviewer confirm that the remaining documents do not independently reveal the date.
These controlled pairs diagnose sensitivity to evidence. They are not a representative estimate of production traffic. Also test a separately sampled set reflecting the requests, documents and missing-information patterns the application actually encounters.
Score the answer and the decision independently
Section titled “Score the answer and the decision independently”Label evidence sufficiency before grading the response. Then inspect what the response actually asserts. Saying “I am not sure” before inventing a date is still an unsupported answer.
Use an outcome table that preserves the important distinctions:
| Evidence and response | What to record |
|---|---|
| Sufficient evidence, correct supported answer | Useful answer |
| Sufficient evidence, incorrect answer | Answering error |
| Sufficient evidence, unnecessary abstention | Lost useful answer |
| Insufficient evidence, unsupported answer | Failure to abstain |
| Insufficient evidence, appropriate abstention or clarification | Correctly limited response |
A partial answer needs claim-level review. If the assistant correctly explains a policy but invents an account-specific fact, the supported portion does not cancel the unsupported claim. Decide how that response affects acceptance before scoring the final test.
Keep execution failures and missing judgments visible too. An abstention is an observed response, not an unscored request. Do not quietly remove failed attempts from the original test population.
Worked example: fewer errors can mean fewer useful answers
Section titled “Worked example: fewer errors can mean fewer useful answers”The following numbers are illustrative, not measured model or Nodus results. Suppose a held-out set contains 200 requests: 120 are answerable from the supplied evidence and 80 are not. For this simplified example, each response either answers or abstains; no partial answers or clarification requests occur.
Candidate A gives 108 correct answers and 6 incorrect answers on the answerable cases, abstaining on the remaining 6. On the unanswerable cases, it gives 20 unsupported answers and appropriately abstains on 60.
Candidate B gives 90 correct answers and 2 incorrect answers on the answerable cases, abstaining on 28. On the unanswerable cases, it gives 4 unsupported answers and appropriately abstains on 76.
| Measure | Candidate A | Candidate B |
|---|---|---|
| Requests answered | 134 of 200 | 96 of 200 |
| Answer coverage | 67% | 48% |
| Incorrect or unsupported answers | 26 | 6 |
| Error rate among delivered answers | 26 / 134, about 19.4% | 6 / 96, 6.25% |
| Useful answers | 108 | 90 |
| Unnecessary abstentions | 6 | 28 |
B delivers fewer bad answers, but it also withholds more answers the evidence supports. Neither percentage alone chooses a winner. Decide whether the reduced error exposure justifies the lost useful answers and the extra unresolved requests.
Do not translate this deliberately constructed test mix directly into expected customer outcomes. The proportion and difficulty of unanswerable requests can change both coverage and delivered-answer error rates.
Choose an operating rule, not a confidence slogan
Section titled “Choose an operating rule, not a confidence slogan”If the application exposes an answer-selection score, evaluate candidate cutoffs on development data. Plot delivered-answer error rate against answer coverage, then choose a rule that meets the application’s constraints. Freeze it before evaluating the held-out test.
A model’s written “90% confident” is not automatically a calibrated probability. Check whether the score actually orders errors usefully. If the candidate only produces answer-or-abstain decisions, compare those observed policies instead of pretending a threshold sweep is available.
Set separate limits for unsupported answers and unnecessary abstentions when their consequences differ. Review critical request categories individually. A global improvement can conceal a new tendency to refuse one language or guess on one document type.
Finally, specify what happens after abstention. A clarification request that obtains the missing information may resolve the task. A referral to an unavailable reviewer may not. Measure eventual resolution and review demand separately from the model’s initial response quality.
Does prompting the model to say “I don’t know” solve hallucinations?
Section titled “Does prompting the model to say “I don’t know” solve hallucinations?”No. It changes the requested behavior, not the evidence that the behavior works. Test plausible missing-answer cases and inspect whether the response still introduces unsupported claims.
Is a higher abstention rate safer?
Section titled “Is a higher abstention rate safer?”Not necessarily. It can reduce unsupported answers while preventing useful assistance. Compare both the errors delivered and the answerable requests left unresolved. The appropriate tradeoff depends on the consequence of each outcome.
Should clarification count as abstention?
Section titled “Should clarification count as abstention?”Keep it distinguishable. A targeted question for a missing order identifier is different from a terminal refusal. Predefine acceptable clarification behavior and test whether the follow-up actually enables a supported answer.
What does Nodus provide for this evaluation?
Section titled “What does Nodus provide for this evaluation?”The public Jobs guide describes running your command, inspecting progress and retrieving outputs. You own evidence-sufficiency labels, response review and release criteria. This article does not imply a built-in abstention evaluator or a guarantee of answer quality. To discuss compute for your evaluation runs, book a conversation.
More from the blog
kubernetes8 min read
Do you need Kubernetes to run GPU training jobs?
Most teams don't. Kubernetes earns its cost for GPU training when a platform team, shared inference or many teams already exist. Decision rule and cost math.
Read the postgpu11 min read
FSDP vs Megatron-LM: which scales LLM training better?
FSDP is simpler and enough while a model fits on one 8-GPU machine. Megatron-LM's tensor and pipeline split wins across machines on slow links.
Read the post