UQLM
FreeUQLM: Uncertainty Quantification for Language Models, is a Python library for LLM hallucination detection using state-of-the-art uncertainty quantification techniques 
About UQLM
UQLM (Uncertainty Quantification for Language Models) is an open-source Python library developed by CVS Health for detecting hallucinations in Large Language Model (LLM) outputs. It provides a comprehensive suite of response-level scorers that quantify uncertainty, returning a confidence score between 0 and 1 where higher scores indicate lower likelihood of errors or hallucinations. The library supports multiple scorer types: black-box (consistency-based), white-box (token probability based), LLM-as-a-Judge, ensemble, and long-text scorers. It is compatible with any LLM through LangChain and offers easy installation via pip. UQLM is designed to help developers build more reliable LLM applications by identifying uncertain or hallucinated responses.
Key Features
Pros & Cons
- Open-source and free to use
- Comprehensive suite of UQ techniques in one library
- Works with any LLM through LangChain integration
- Easy installation via pip
- Offers both low-latency (white-box) and high-accuracy (black-box) options
- Includes mitigation strategies to reduce hallucination impact
- Well-documented with examples and demos
- Black-box and long-text scorers require multiple LLM calls, increasing cost and latency
- White-box scorers limited to models that expose token probabilities
- LLM-as-a-Judge scorers add extra latency and may incur additional API costs
- Requires LangChain as a dependency (may add complexity for some projects)
- Primarily focused on detection, not prevention of hallucinations