NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Calibrating Large Language Models with Sample Consistency

Qing Lyu, Kumar Shridhar, Chaitanya Malaviya, Li Zhang, Yanai Elazar, Niket Tandon, Marianna Apidianaki, Mrinmaya Sachan, Chris Callison-Burch

TL;DR

Large Language Models (LLMs) are notoriously overconfident, making it hard to know when to trust their outputs. This paper demonstrates that sample consistency—measuring how much a model agrees with itself across multiple random generations—is a highly effective, post-hoc way to calibrate confidence without needing internal model weights or extra training data.

What Problem Does This Paper Address?

Calibration is the degree to which a model’s predicted confidence aligns with its actual probability of being correct. Ideally, if a model says it is 80% confident, it should be right 80% of the time. Unfortunately, modern LLMs are poorly calibrated "off-the-shelf."

Traditional calibration methods often require access to internal probability scores (logits) or require retraining the model, which is impossible for proprietary models like GPT-4. While some researchers have tried asking models to "verbalize" their confidence (e.g., "How sure are you?"), LLMs are prone to sycophancy and overconfidence in these self-evaluations. This paper explores whether the internal consistency of a model's various attempts at a problem can serve as a better proxy for true confidence.

Methods

The authors propose generating $n$ candidate outputs (e.g., 40 samples) for a single query using a non-zero temperature ($T=0.4$) to introduce variety. They then extract the final answer from each sample and calculate confidence using three metrics:

  1. Agreement-based: The percentage of samples that match the most frequent (majority) answer.
  2. Entropy-based: A measure of the "disorder" in the distribution of answers. High entropy means the model is scattered across many different answers (low confidence); low entropy means it's focused (high confidence).
  3. First-Second-Distance (FSD): The difference in frequency between the top two most-voted answers. This helps identify cases where a model is "split" between two likely options, a nuance simple agreement might miss.
Figure 1: Comparison of the three consistency measures. Higher consistency generally correlates with a higher likelihood of correctness.

These methods are compared against baselines like raw logits, asking the model if its answer is "True," and asking the model to verbalize a confidence percentage.

Datasets

The researchers evaluated their approach across nine datasets covering four diverse reasoning domains:

  • Math Word Problems: GSM8K, SVAMP, MultiArith, and ASDiv.
  • Multi-hop QA: StrategyQA, Date Understanding, and Sports Understanding.
  • Planning: SayCan (robotic task planning).
  • Relational Reasoning: CLUTRR (inferring family relationships).

They tested these on both open-source models (LLaMA, Mistral) and closed-source models (Codex, GPT-3.5-turbo, GPT-4).

Key Insights and Ideas

  • Explanations are Calibration Boosters: One of the most significant findings is that prompting a model to provide a reasoning chain (like Chain-of-Thought or Program-of-Thought) significantly improves its calibration. When a model "thinks" before answering, its consistency becomes a much more reliable signal of its accuracy.
  • The Instruction-Tuning Penalty: Surprisingly, instruction-tuned models (like Mistral-7B-instruct) often show worse calibration than their base versions. They tend to become more overconfident, likely a side effect of the RLHF (Reinforcement Learning from Human Feedback) process which encourages models to be definitive and helpful.
  • Scaling Helps: As models get larger (e.g., moving from LLaMA 7B to 70B), their consistency-based calibration naturally improves.
  • FSD as a Robust Default: While "Agreement" is popular, the authors find that FSD is a more robust default, especially for closed-source models, as it better captures the model's uncertainty when it is torn between two competing answers.
Figure 2: The five prompting strategies studied, ranging from standard direct answers to structured "Program-of-Thought" reasoning.

Key Results

  • Superiority over Baselines: Consistency-based methods consistently achieved lower Brier Scores (a measure of calibration error where lower is better) than verbalized confidence or raw logits. For example, on GPT-4, consistency metrics reached Brier scores around 0.11, significantly outperforming verbalized confidence (0.15 - 0.18).
  • Performance Gains: The authors showed that by identifying the "most uncertain" predictions via consistency and correcting them with an oracle, they could dramatically improve final task accuracy.
  • Efficiency: While 40 samples were used for the main study, the authors found that calibration benefits begin to saturate after 15–20 samples, and even as few as 3–5 samples provide a significant improvement over no calibration at all.

Limitations and Future Work

The primary limitation is computational cost; sampling a model 40 times for every query is expensive and slow. The authors also note that no single consistency metric is "best" for every model; the optimal choice depends on whether the model has undergone RLHF or instruction tuning.

Future work could look into measuring consistency at the intermediate reasoning steps rather than just the final answer, potentially catching errors earlier in the "thought" process. Additionally, the study focused on reasoning tasks; how these metrics perform on creative writing or open-ended summarization remains an open question.

Summary updated

BibTeX
@inproceedings{lyu2025calibrating,
  author = {Qing Lyu and Kumar Shridhar and Chaitanya Malaviya and Li Zhang and Yanai Elazar and Niket Tandon and Marianna Apidianaki and Mrinmaya Sachan and Chris Callison-Burch},
  title = {{Calibrating Large Language Models with Sample Consistency}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i18.34120},
}
Figure