Don't ask an LLM for a confidence score
TL;DR Highlight
Adding a confidence field to LLM JSON output is a comfort trick with no validity, argues the author.
Who Should Read
A backend developer who adds a 0-100 confidence field to LLM JSON output and shows it to users as a trust signal.
Core Mechanics
- A confidence field is a comfort trick
- The author argues LLM self-reported confidence scores are nearly useless.
- They make output feel more trustworthy without making it more trustworthy.
- Evidence for self-knowledge is weak
- Anthropic's introspection research itself notes the ability is highly unreliable and context-dependent.
- A DeepMind paper found performance often degrades when models self-correct without external feedback.
- Nobody defines what confidence means
- Correctness, coherence, and attempting the goal are three different questions.
- One 0-100 number flattens all three.
- The 0-100 scale is especially bad
- The Rescaling Confidence paper found over 78% of responses landed on just three values across six models.
- One model said exactly 100 on 68% of instances, and coarser scales beat the 0-100 baseline on metacognitive sensitivity.
- Making it work takes real calibration
- You must define categorical labels and verify them on a large enough sample.
- Tian et al. cut expected calibration error by more than half with prompting plus temperature scaling.
- That isn't what you get by adding a field to a Pydantic model.
- If the model knows it's wrong, make it fix it
- It should find a source in its tool loop or drop the claim.
- Shipping it with a warning sticker is pointless.
- If it can't tell, the score measures nothing.
- The real work is search
- In RAG, confidence is usually a proxy for correctness, so improve retrieval and document selection.
- The author cites ChatGPT returning a 2024 deadline with a source for a BBQ competition.
Community Reactions
- Line-number citations beat confidence scores
- One commenter extracting structured data from transcripts had the model cite transcript line numbers instead of confidence, which cut hallucination dramatically.
- Opus itself reportedly admitted a confidence number wouldn't be meaningful.
- Numbers didn't help clinicians
- A commenter in healthcare said nurses facing 200+ question forms can't interpret the gap between 90% and 70%.
- '60% sure the patient is allergic to nuts' meant nothing to them.
- The claim is called too strong
- A commenter says it contradicts the Tian et al. and Anthropic results cited later in the post.
- They report stated confidence works with a rubric and takes less work and data than training a classifier.
- Log-probs and calibration can work
- Commenters suggest conformal inference on raw log-probs to control false-positive or recall rates.
- Another suggests bucketing 1-5 scores on a known-answer corpus to map them to real probabilities.
How to Apply
- Audit where confidence is used
- Find the branches and UI that read the confidence value in your code today.
- Remove the field if no decision uses it.
- Require citations instead of numbers
- In extraction or RAG prompts, require a line number or doc ID citation for each value.
- Drop or re-retrieve any value without a citation.
- If you must, calibrate categorical labels
- Define three levels such as high/medium/low with explicit criteria.
- Run known-answer samples and measure actual accuracy per label.
- Let the model fix what it knows is wrong
- Add a step in the tool loop that checks ungrounded claims and finds a source or deletes them.
Try It
# Paste into Claude or ChatGPT: simplified version of the post's idea (require citations instead of a confidence number)
Answer {{question}} using the {{document}} below.
Rules:
1. Attach the source line numbers as citations to every value.
2. Do not write claims you cannot cite; mark them as "no evidence".
3. Never output a confidence number.
Output JSON: {"answer": ..., "citations": [line numbers...], "ungrounded": [uncited items...]}
Document:
{{document}}
Question:
{{question}}
Next, try: run 20 samples with known answers and count the error rate of items with empty citations.Terminology
Related Papers
Gemini 4 Neon is the new #1 on the Models Engineering Index
Gemini 4 Neon ranks first on the Models Engineering Index with 68.0, combining multiple benchmarks.
LLMs can read and write executables byte by byte from a hex dump
Given only a hex dump and no tools, an LLM analyzed, patched and wrote working executables.
Claude was trained on protein sequences at scale
Next-amino-acid tests on obscure proteins show only the latest Claude models predict them
Remembered as Brief: Stored Preferences SilentlyRemove Decision-Critical Information
A stored 'keep it short' preference silently drops warnings; listing must-know points first restores content.
All AI-generated code should be Open Source
A blog argues AI-generated code should be open source; most HN commenters disagreed.
What thousands of conversations look like inside a language model
Mapping Qwen3-1.7B states showed Chinese sitting apart from English, while German and Croatian overlapped it.
AI, activity, and outcomes in software engineering
AI sped up writing code, but shipping speed did not rise as much, says a talk
LLMs Play Zachtronics' TIS-100
16 LLMs played TIS-100 and set 133 new Pareto frontier points across 18 puzzles