How do you get a confidence or uncertainty signal out of an LLM?
Quick-fire answer from the Awesome Generative AI Guide (MIT)
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
There is no calibrated probability of correctness built in, so you approximate it. Token log-probabilities (where the API exposes them) give a rough per-token confidence you can aggregate, though fluent-but-wrong text often scores high. Self-consistency (sample several times and check agreement) surfaces instability, and an explicit "rate your confidence and say if you are unsure" prompt gives a coarse signal you must calibrate against real outcomes. Verbalized confidence and logprobs both need validation on your data before you gate anything on them, and for RAG the retrieval score is often a more honest uncertainty signal than anything the generator reports.
Full worked answer
There is no calibrated probability of correctness built in, so you approximate it. Token log-probabilities (where the API exposes them) give a rough per-token confidence you can aggregate, though fluent-but-wrong text often scores high. Self-consistency (sample several times and check agreement) surfaces instability, and an explicit "rate your confidence and say if you are unsure" prompt gives a coarse signal you must calibrate against real outcomes. Verbalized confidence and logprobs both need validation on your data before you gate anything on them, and for RAG the retrieval score is often a more honest uncertainty signal than anything the generator reports.
Learn more: Foundations topic
What a good answer covers
- There is no calibrated probability of correctness built in, so you approximate it
- Token log-probabilities (where the API exposes them) give a rough per-token confidence you can…
- Self-consistency (sample several times and check agreement) surfaces instability, and an explicit "rate…
- Verbalized confidence and logprobs both need validation on your data before you gate anything on them,…
Key terms: Learn more
In the glossary: Self-consistency · Logprobs · RAG
Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep