Back to directory

uqlm: Uncertainty Quantification for Language Models

A Python library that detects likely hallucinations in large language model outputs using uncertainty quantification techniques, scoring each response's confidence between 0 and 1.

uqlm: Uncertainty Quantification for Language Models

UQLM is a Python library for detecting hallucinations in large language model outputs using uncertainty quantification. It provides a suite of response-level scorers, each returning a confidence score between 0 and 1, where a higher score indicates a lower likelihood of errors or hallucinations.

Scorers are grouped into black-box scorers that measure the consistency of multiple generations from the same prompt and work with any LLM; white-box scorers that use token probabilities already returned by the model, at minimal extra cost; LLM-as-a-judge scorers that use another LLM to judge a response; ensemble scorers that combine other scorer types; and long-text scorers for claim-level comparisons across longer outputs.

It installs from PyPI with pip and is documented in the accompanying paper published in JMLR 2026.

More in AI evals

See all 269
  • Provenance gate

    github.com

    A deterministic authorization gateway that sits between an AI agent and its tools, tracing where each parameter of a side-effect call came from, and blocking the call or asking a human when the source does not check out.

  • JevBench

    benchmarkheaven.com

    A reproducible benchmark from Benchmark Heaven that ranks Jev-class typed decision models on intelligence, calibration, speed, and cost, with a published harness, scoring rules, and results.

  • A co-evolutionary adversarial red-teaming tool for AI agents that uses quality-diversity evolutionary search to autonomously breed edge-case scenarios, testing whether an agent with tool access can be made to hallucinate, deadlock or leak funds.