Domain-Shift-Aware Conformal Prediction for Large Language Models
Preprint
Abstract
Large language models have achieved impressive performance across diverse tasks. However, their tendency to produce overconfident and factually incorrect outputs, known as hallucinations, poses risks in real world applications. Conformal prediction provides finite-sample, distribution-free coverage guarantees, but standard conformal prediction breaks down under domain shift, often leading to under-coverage and unreliable prediction sets. We propose a new framework called Domain-Shift-Aware Conformal Prediction (DS-CP). Our framework adapts conformal prediction to large language models under domain shift, by systematically reweighting calibration samples based on their proximity to the test prompt, thereby preserving validity while enhancing adaptivity. Our theoretical analysis and experiments on the MMLU benchmark demonstrate that the proposed method delivers more reliable coverage than standard conformal prediction, especially under substantial distribution shifts, while maintaining efficiency. This provides a practical step toward trustworthy uncertainty quantification for large language models in real-world deployment.Keywords
All Related Versions
This publication has 14 references indexed in Scilit:
- A Survey on Uncertainty Quantification of Large Language Models: Taxonomy, Open Research Challenges, and Future DirectionsACM Computing Surveys, 2025
- On regression-adjusted imputation estimators of average treatment effectsJournal of Econometrics, 2025
- A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open QuestionsACM Transactions on Information Systems, 2025
- On Rosenbaum’s rank-based matching estimatorBiometrika, 2024
- A survey of uncertainty in deep neural networksArtificial Intelligence Review, 2023
- Conformal prediction beyond exchangeabilityThe Annals of Statistics, 2023
- Survey of Hallucination in Natural Language GenerationACM Computing Surveys, 2023
- Algorithmic Learning in a Random World2022
- Distribution-Free Predictive Inference for RegressionJournal of the American Statistical Association, 2018
- A unifying view on dataset shift in classificationPattern Recognition, 2012