LLM-based agents now write code, summarize papers, plan trips, and fill forms. Many agent designers also ask these models for confidence scores — a probability that the answer is correct. The models comply, spitting out numbers like 0.85 or 0.92. But there is no good reason to trust those numbers. This article explains why LLM-generated confidence scores are fundamentally untrustworthy and shows how to build a reliable alternative.
What confidence actually means
Consider a weather forecaster who says "I am 70 percent confident it will rain tomorrow." The forecaster predicts rain. The 70 percent expresses how sure they are about that prediction. Tomorrow it either rains or it does not. Their certainty today depends on what they know: current conditions like air pressure, humidity, wind, and radar clouds, plus historical records showing how often rain followed similar patterns. More information, and a stronger signal from that information, pushes confidence toward 100 percent or zero percent.
In theory, turning information into confidence is a calculation, not an opinion. Given the same information and a correct rule, two forecasters must produce the same confidence. Disagreement means different information or a misapplied rule.
Now suppose the forecaster is asked about a day two weeks out. No current data exists yet — only the historical base rate. If rain falls on 30 percent of days this time of year, the honest answer is "30 percent confident." As the day approaches, real-time data arrives and confidence moves toward certainty or impossibility.
How we measure whether a confidence score is accurate
A single prediction cannot be verified — it either happens or it does not. Accuracy only emerges over many predictions. Take every day the forecaster said "70 percent." If rain fell on roughly 70 percent of those days, the score is accurate. If rain fell on 40 percent, the forecaster was overconfident. If rain fell on 90 percent, they were underconfident.
A real forecaster's yearly record might look like this:
| They said | Days | Days it rained | Rate |
|-----------|------|----------------|------|
| 10% | 120 | 13 | 11% |
| 30% | 90 | 26 | 29% |
| 70% | 80 | 57 | 71% |
| 90% | 75 | 67 | 89% |
At every level the actual rate matches the stated confidence. This is calibration. But calibration alone is insufficient. A forecaster who ignores tomorrow's weather and always says "30 percent" is also calibrated — it will rain on 30 percent of their 30-percent days. Their predictions carry zero information because they never used the current conditions. The forecaster in the table is better because most predictions cluster near 10 percent or 90 percent. They use the information and stay calibrated.
One more requirement, often missed: someone must record every forecast and the outcome. Without that log, verification is impossible. A trustworthy confidence score therefore needs two properties: it reflects the amount of information behind the prediction, and it has been validated against outcomes on the same type of question.
Why LLM confidence scores fail both requirements
An LLM produces text one token at a time. Each token depends on the tokens before it — this is autoregressive generation. When asked "How confident are you?" the answer "0.85" is not read from an internal gauge. The model writes it token by token, just like any other text. "0.85" is a plausible continuation of the conversation. It measures nothing.
In the terms above, the number has neither required property. It does not reflect how much information the model had, because it is a text continuation, not a summary of evidence. And it was never calibrated on accuracy. Pretraining calibrates the model on "what token comes next?" It was never scored on whether the confidence it outputs matches how often it is actually correct. The model learned what confidence scores look like in text. It did not learn to make its scores match its accuracy.
The consequences are observable:
- Ask the same question twice and the number changes — 0.85 one time, 0.7 the next. The information did not change. If the model were applying a rule, the confidence would not change either.
- Rephrase the question — "Are you sure?" — and the score shifts, even though nothing about the problem changed. Different wording is not new information.
- The preceding text determines the number. If the model just wrote "This is clearly the right answer," a high score is the natural continuation. The score follows the words, not the evidence.
The model will always produce a number. It looks precise. An incorrect number looks identical to a correct one. The only way to discover whether the numbers are trustworthy is to grade many of them against a known answer key. Most people who ask LLMs for confidence scores never do this.
Building a reliable confidence rule from observable data
If we cannot ask the LLM for its confidence, we must do what the forecaster does: construct a rule that turns observable information into a confidence score, then continuously validate it against outcomes. The LLM still performs the task — writing the answer — but the confidence comes from the rule, not the model.
Consider a customer-support agent that searches a help center and drafts a reply. We need a confidence score for each reply so low-confidence items route to a human before sending.
- Choose the information. List observable signals without asking the LLM how it feels. Did the search find a relevant article? How many? Has this question type appeared before? If we run the agent twice on the same question, do the replies agree? These are the agent's equivalents of air pressure, humidity, and wind.
- Start with the base rate. Before any other data, the best estimate is the historical accuracy rate. If humans reviewed 200 past replies and 150 were correct, every new reply starts at 75 percent — just like the two-week forecast using the seasonal base rate.
- Record every reply and its outcome. For each reply, save the signals from step one, the rule's confidence, and whether the reply was actually correct. A reply counts as correct if a reviewer approved it or the customer did not follow up. This log is the record the previous sections demanded.
- Update the rule from the record. Group past replies by their signals and measure how often each group was correct. If replies with a matching article and two consistent runs were correct 95 percent of the time, the rule outputs 95 percent for the next such case. If replies with no matching article were correct only 40 percent of the time, the rule outputs 40 percent. Early groups are small and the rule is rough. More data grows the groups and lets the rule use more signals.
- Keep checking calibration. Every week, build the same table used for the forecaster: for each confidence level, how often was the reply actually correct? If the 90-percent replies were correct only 70 percent of the time, the rule is overconfident, and the new records show how to correct it.
A rule built this way has the properties an LLM's number lacks. The same information always yields the same confidence. The confidence depends on the information, not the wording. It is calibrated on the actual question type because it was built from your own records. And it improves with use because every reply adds to the log.
The rule is only as good as the record. If no one verifies whether replies were correct, there is nothing to learn from, and you are back to a number that nobody has measured.