FDE Times dataFDE jobs open 932▼14 Change in open roles over 7 days, like-for-like: roles from companies we started tracking this week are left outNew in 7 days 62Companies hiring 202Remote-friendly 24%Median US pay $201kTop hirer Databricks 92
中文VI

The newspaper of the Forward Deployed Engineer

Guides

Don't let an LLM's ‘95% sure’ decide when a human steps in

Models asked to state their confidence usually overstate it; true/false self-grading and a threshold measured on the client's real data are safer guides.

ShareLinkedInFacebookX

In brief

  • LLMs are usually overconfident when they state how certain they are. Don't use that number as a handoff threshold.
  • Have the model grade its answer as true or false (P(True)), check for bias with an empty input, then choose a threshold on the client's labeled data.
  • Confidence scores miss questions about values and questions with no answer, so a layer of rules needs to run before the model.
The top half is a flow diagram: a customer question passes through a rules layer. Questions involving legal issues, complaints, sensitive data or missing documentation go straight to a human. The LLM answers the rest, then the model scores itself with P(True), using an A/B question and logprobs. If the score meets the threshold, the bot replies; if not, the question goes to a human. The bottom half is a bar chart for 200 hypothetical questions: at a 0.7 threshold, 158 are correct, 17 wrong and 25 handed to humans; at 0.8, 140 correct, 10 wrong and 50 handed over; at 0.9, 107 correct, 3 wrong and 90 handed over.
The rules layer handles the cases a confidence score never catches. For the rest, the client picks the threshold: raising it lets fewer wrong answers through, but staff must handle dozens more tickets. The figures in the chart are a hypothetical example from the article.

In 2023, Xiong and colleagues tried many ways of prompting LLMs to state how confident they were, and found that the models were usually overconfident. When a model says “I’m 95% sure,” it does not follow that 95 out of 100 such answers are right.

That finding matters as soon as a head of customer support asks the question every FDE who deploys an LLM will eventually hear: “When does this bot know that it doesn’t know, so it can pass the customer to my staff?” Replying that “the model will say so when it isn’t sure” sounds fine in a meeting room. It will not survive the first week in production.

For an FDE, answering that question well decides whether a demo becomes a system the client dares to run for real. The handoff threshold determines how much work is automated and how many wrong answers get out. It has to be measured, because a guess will not hold.

A true/false question gets a more reliable answer

There is a better approach than asking “how sure are you?” LearnPrompting calls it self-evaluation: using an LLM to check its own output or that of another LLM. The simplest version is to ask the model a question, then ask it to check the answer it just gave. The loop can be repeated several times.

In 2022, Kadavath and colleagues at Anthropic studied a measurable form of self-grading called P(True). The model proposes an answer, then estimates the probability that the answer is correct.

Everything hinges on the format of the question. The study found that the confidence of larger models tracks their actual accuracy fairly closely across many kinds of multiple-choice and true/false questions, provided the format is right.

So instead of reading a number the model writes out, turn the self-grading step into a true/false question and read the probability of the “True” token from the logprobs. The same paper also proposes P(IK): training a model to predict whether it knows the answer before any specific answer has been proposed.

In most FDE projects, prompted P(True) is the more practical starting point.

A worked example, from prompt to threshold

Take an assistant that answers questions about refund policy for an e-commerce company. The flow calls the model twice: once to answer, once to grade.

JUDGE_PROMPT = """Question: {q}
Documents: {ctx}
Proposed answer: {a}
Is the proposed answer correct and supported by the documents?
(A) True
(B) False
Reply with only A or B."""

def p_true(q, ctx, a):
    out = llm.complete(JUDGE_PROMPT.format(q=q, ctx=ctx, a=a),
                       max_tokens=1, logprobs=True)
    pa, pb = out.prob("A"), out.prob("B")
    return pa / (pa + pb)

def route(q, ctx, threshold):
    a = llm.answer(q, ctx)
    score = p_true(q, ctx, a)
    return ("auto", a) if score >= threshold else ("human", a)

The p_true function works only if the API returns token probabilities. Many do not. If yours doesn’t, resist going back to asking the model to write out a percentage.

There are two alternatives: call the grader several times with a temperature above 0 and use the share of “A” replies as the score, or use a self-hosted open-source model that returns logprobs for the grading step alone.

Before trusting p_true, check whether the grader itself is biased. LearnPrompting describes a technique called contextual calibration: given an input with no content, the model should assign a probability of about 0.5 to each label.

If the result is far from that, the model favors one label. This check corrects bias between labels, which is a separate problem from the confidence a model states in words.

In the refund example, put “N/A” in all three slots: question, documents and answer. If the grader still gives “A” about 0.7, it leans toward “True,” and every score you read afterward is inflated. In that case, fix the prompt, swap the order of the two labels, or allow for the bias when choosing the threshold.

The threshold is measured on the client’s data

A 2024 survey on abstention (a model declining to answer) describes a common method: estimate a confidence score and have the model abstain when the score falls below a threshold. The hard part is choosing that threshold, and it cannot be settled in a meeting room.

To continue the hypothetical case, you take 200 real questions from the ticket history and ask staff to label each of the bot’s answers as right or wrong.

Say that at a threshold of 0.8 the bot answers 150 questions itself, gets 140 right (about 93%) and passes 50 to humans. Raise the threshold to 0.9 and the bot answers only 110, but gets 107 right (about 97%) and passes 90 to humans.

Neither threshold is technically “correct.” The question to put to the head of support is whether 10 wrong answers out of 150 are acceptable, or whether they would rather have staff handle 40 more questions to cut the errors to 3.

Some questions a confidence score will never catch

Even a well-calibrated grader has limits. The abstention survey looks at declining to answer from three angles: the query, the model and human values. The authors point out that value-related concerns, and whether a question can be answered at all, are hard to capture through model confidence.

In the refund example, when a customer writes “I’m going to sue you,” the trouble is not a lack of knowledge. The model can reply with great confidence and still mishandle the situation.

Likewise, a question about an order that does not appear in the documents has no answer, though the model may still invent one that sounds certain.

The system therefore needs a layer of rules that runs before the model. Questions containing legal keywords, complaints or sensitive personal data, and those for which retrieval finds no document, go straight to a human. The confidence threshold handles only what remains.

Steps to take with the client, and common mistakes

Start by sitting down with the client to list the kinds of question that must always go to a human, and write them as rules. Next, build the true/false self-grader and check it for bias with an empty input.

Then gather a set of real, labeled questions, tabulate accuracy and automation rate at each threshold, and let the client choose the level they can accept. For the 200 questions above, add a 0.7 level so the client can also see what loosening the threshold does. The table you bring to the meeting might look like this:

Threshold Answered by bot Correct Accuracy Wrong answers let through Passed to humans
0.7 175 158 about 90% 17 25
0.8 150 140 about 93% 10 50
0.9 110 107 about 97% 3 90

“Wrong answers let through” and “Passed to humans” are the two columns the client actually pays for: one is risk with customers, the other is staff hours. Moving down the rows, each increase in the threshold removes a few wrong answers at the cost of several dozen more tickets for staff.

The most common mistake is trusting the number the model reports about itself, which Xiong’s research warned against. The second is choosing a threshold by feel instead of from labeled data.

The third is using a single threshold for every kind of question. In practice, a question about a refund amount may need a higher threshold than one about delivery time. Many teams also forget to measure again after changing the model or editing the prompt, which is when the distribution of scores shifts.

If you are preparing to apply for FDE roles, put this calculation in your résumé or portfolio. For example: “designed a human handoff mechanism based on self-evaluation, chose the threshold on N labeled questions, and reached X% automation at Y% accuracy.”

The topic also merits preparation before an interview. Practice explaining your own threshold table in a few minutes, from how the answers were labeled to why you chose a particular row.

The next time a client asks whether the bot knows when it doesn’t know, skip the promise. Bring the threshold table and let them choose the row that suits them.

Was this article useful?

Use with your AI assistantAsk Claude ↗Ask ChatGPT ↗
6 sources
Read next on the roadmap · Stage 6: MeasurementYour green pipeline may be feeding clients the wrong numbersChecks on freshness, row counts and schema, plus a safety net for jobs that never run, let you catch bad data before the client does.