Abstract
Large Language Models (LLMs) have exhibited remarkable performance across various downstream tasks, but they may generate inaccurate or false information with a confident tone. One of the possible solutions is to empower the LLM confidence expression capability, in which the confidence expressed can be well-aligned with the true probability of the generated answer being correct. However, leveraging the intrinsic ability of LLMs or the signals from the output logits of answers proves challenging in accurately capturing the response uncertainty in LLMs. Therefore, drawing inspiration from cognitive diagnostics, we propose a method of Learning from Past experience (LePe) to enhance the capability for confidence expression. Specifically, we first identify three key problems: (1) How to capture the inherent confidence of the LLM? (2) How to teach the LLM to express confidence? (3) How to evaluate the confidence expression of the LLM? Then we devise three stages in LePe to deal with these problems. Besides, to accurately capture the confidence of an LLM when constructing the training data, we design a complete pipeline including question preparation and answer sampling. We also conduct experiments using the Llama family of LLMs to verify the effectiveness of our proposed method on four datasets.
Introduction
Large Language Models (LLMs) are notoriously overconfident, often presenting hallucinations with the same authoritative tone as factual truths. This mismatch between expressed confidence and actual accuracy poses significant risks in safety-critical applications and human-AI collaboration. Existing solutions generally fall into two categories: logit-based methods, which analyze token probabilities, and verbalized prompting, which asks the model to state its certainty. However, logits often fail to capture the uncertainty of complex, multi-step reasoning, while simple prompting frequently results in models that are pathologically overconfident.
The LePe Framework
To address these issues, we propose LePe (Learning from Past Experience), a framework inspired by cognitive diagnostics used in education. LePe treats confidence expression as a "meta-capability" that can be explicitly taught through a three-stage process:
- Stage 1: Testing (Capturing Inherent Confidence): Instead of a single query, the LLM is presented with multiple "mutated" versions of a question. Mutations include rewriting the question stem, shuffling multiple-choice options, and adding "distractor" options (e.g., "None of the above"). Consistency across these variations serves as a proxy for internal certainty.
- Stage 3: Learning (Teaching Expression): A confidence score is derived from the model's consistency across mutations. The model is then fine-tuned using Instruction Fine-Tuning (IFT) to output its answer followed by this calculated confidence score (e.g., "My confidence is 60%"). To penalize overconfidence, incorrect answers are assigned a 0% confidence score during training.
- Stage 3: Predicting (Evaluation): The fine-tuned model is evaluated on unseen data to measure how well its verbalized confidence correlates with its actual performance (calibration).
Experimental Evaluation
The framework was evaluated using the Llama family (CuteGPT and LLaMA2-Chat) across benchmarks including C-Eval, XieZhi, GSM8K, and CommonsenseQA. Key findings include:
- High Calibration: LePe significantly reduced the Expected Calibration Error (ECE) compared to baselines like ChatGPT or standard logit-based methods.
- Strong Correlation: The Pearson correlation ($r$) between expressed confidence and actual accuracy reached as high as 0.98 on CommonsenseQA.
- Generalization: Models trained on one domain (e.g., XieZhi) showed improved calibration in out-of-domain tasks (e.g., M3KE), suggesting the model learns the general concept of uncertainty expression rather than just memorizing answers.
Conclusion
LePe demonstrates that confidence is a trainable skill. By learning from its own "past experience" through question mutation and consistency checks, an LLM can provide reliable verbalized confidence scores. This allows users to set "trust thresholds," where responses below a certain confidence level can be flagged for human review. Future work will explore extending this framework from closed-ended Question Answering to open-ended generation tasks like coding or essay writing.
Summary updated