Python package for LLM hallucination detection using uncertainty quantification
Top 44.1% on sourcepulse
UQLM is a Python library designed for detecting hallucinations in Large Language Models (LLMs) by employing uncertainty quantification (UQ) techniques. It offers a flexible framework for developers and researchers to assess the reliability of LLM outputs, providing confidence scores to identify potential errors or fabricated information.
How It Works
UQLM categorizes UQ scorers into four types: Black-Box (consistency-based), White-Box (token-probability-based), LLM-as-a-Judge, and Ensemble. Black-box methods measure response consistency across multiple generations, offering universal compatibility but higher latency and cost. White-box methods leverage internal token probabilities for efficiency but require model access. LLM-as-a-Judge uses other LLMs for evaluation, allowing customization. Ensemble scorers combine multiple methods for robust estimation, with options for off-the-shelf use or fine-tuning.
Quick Start & Requirements
pip install uqlm
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
1 day ago
Inactive