Quantifying Uncertainty in Answers from any Language Model via Intrinsic and Extrinsic Confidence Assessment
Preprint
Abstract
We introduce BSDetector, a method for detecting bad and speculative answers from a pretrained Large Language Model by estimating a numeric confidence score for any output it generated. Our uncertainty quantification technique works for any LLM accessible only via a black-box API, and combines intrinsic and extrinsic assessments of confidence into a single trustworthiness estimate for any LLM response to a given prompt. Our method is extremely general and can applied to all of the best LLMs available today (whose training data remains unknown). By expending a bit of extra computation, users of any LLM API can now get the same response as they would ordinarily, as well as a confidence estimate that caution when not to trust this response. Experiments on both closed and open-form Question-Answer benchmarks reveal that BSDetector more accurately identifies incorrect LLM responses than alternative uncertainty estimation procedures (for both GPT-3 and ChatGPT). By sampling multiple responses from the LLM and considering the one with the highest confidence score, we can additionally obtain more accurate responses from the same LLM, without any extra training steps.Keywords
All Related Versions
This publication has 7 references indexed in Scilit:
- Survey of Hallucination in Natural Language GenerationACM Computing Surveys, 2023
- Just Ask for Calibration: Strategies for Eliciting Calibrated Confidence Scores from Language Models Fine-Tuned with Human Feedback2023
- SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models2023
- Are NLP Models really able to Solve Simple Math Word Problems?2021
- CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledge2019
- TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehension2017
- Confidence estimation methods for neural networks: a practical comparisonIEEE Transactions on Neural Networks, 2001