Hallucination detection
LLM hallucination detection from inside the model.
Latent scores every answer your model writes for the risk that it is made up. It reads the activations behind the answer, so it flags a hallucination in milliseconds and can hold it before your users see it.
How Latent detects hallucinations
A language model computes layers of activations for every word it writes, and those internal states carry a signal of whether the answer is grounded. Latent reads that signal and turns it into a risk score for every answer. Why internal state covers the research behind it.
- Read
- A probe, a small classifier fit on labeled answers, reads the activations behind each answer. With an open-weight model on vLLM in your environment, Latent reads your model word by word as it writes. With a model behind an API, Latent's reader model re-reads the finished prompt and answer, and Latent scores the reader's activations.
- Score
- Each answer gets a risk score and a verdict against a cut set for your review budget. The riskiest sentence and the words that drove the score are marked, so a reviewer knows where to look.
- Act
- Deliver the answer and log it, hold it and send your fallback text, or ask a stronger model. A streamed answer can be cut at the first unsupported sentence. LLM guardrails covers each action.
- Calibrate
- A judge labels a sample of your own answers against your sources, and Latent tunes its read and its cut to them. When Latent hosts it, calibration runs for you.
Benchmarks
Every detection number below was read on answers held out of the fit. Each one names its data, its sample and who labeled it. The benchmarks page lists every number we quote, with a CSV.
of the answers Latent flags are real failures, when it flags 10% of other models' RAG answers.
RAGTruth held-out set: 3,498 answers to 583 prompts from GPT-4, GPT-3.5, Llama 2 7B, 13B and 70B, and Mistral 7B. Human span labels. Read by Latent's reader, Llama 3.1 8B Instruct. September 2026.as many real failures found as random review at the same 10% review budget, after calibrating on 10,000 human-labeled RAG answers.
RAGTruth, 2,700 held-out answers, split by prompt. Human span labels. September 2026.the failure rate of random review in Latent's top 10% on finance filings, after one calibration run on 1,000 of the model's own answers. Detection rose from AUROC 0.586 to 0.851, in 453 seconds for $6.88 of judge calls.
FinQA 10-K excerpts: 187 held-out answers about 24 companies the fit never saw. Labels from a strict Claude Opus judge. Llama 3.1 8B Instruct on vLLM. September 2026.median time for Latent's reader to check an answer on the same machine, and 150 to 170 ms over a network. Claude Opus as a judge took 3.1 to 3.4 seconds.
1,498 RAGTruth answers, every checker given the source document. September 2026. How we measuredper 1,000 answers for Latent's reader on a GPU you run, against $10.61 for Claude Opus judging every answer.
Claude Opus at its September 2026 list price. The reader on one A100.measurable serving overhead inside vLLM: 14.56 requests per second with Latent against 14.66 without it, and first tokens in 298 ms against 316 ms. The plugin adds 16 MiB of GPU memory at idle and at most 58 MiB at peak.
Nightly benchmark: A100 40 GB, Llama 3.1 8B Instruct, vLLM 0.19.1, CUDA graphs on, 32 requests at a time, three runs of 256 requests each way. September 2026.Latent and a judge model
A judge model reads each finished answer and writes out a verdict, which takes seconds and a frontier-model call for every answer. Latent reads activations and writes no text, so it can check every answer you serve.
Teams that keep a judge can send it only Latent's riskiest 10%. On the same 1,498 human-labeled RAGTruth answers, that cut the judge bill from $10.61 to $1.06 per 1,000 answers, and the share of flags that were really wrong rose from 82% to 93%. Latent also works alongside the guardrails and tracing you already run. Read the full comparison or see Latent as an LLM-as-a-judge alternative.
Use cases
Latent fits wherever a wrong answer costs more than a slow one. We have calibrated it on finance filings, medical questions and legal contracts.
Answers written from your documents, where the risk is a claim the source does not support. Latent marks the sentence and the passage the answer leaned on. RAG hallucination detection
Figures pulled from filings and statements, where one wrong number becomes an incident. Unsupported numbers are flagged for review.
Dosing, eligibility and clinical answers that should be checked before they reach a patient. Latent can run in your VPC, where nothing leaves it.
Contract terms and obligations, where an invented clause carries real risk.
Open-weight models on vLLM, where Latent reads your own model as it writes and adds no measurable serving cost.
Long-running agents that call tools. Latent can hold a tool call before it runs. Join the agents waitlist
Integration
Install the Python SDK and add one line at startup. Latent scores every answer from your OpenAI, Anthropic, Gemini and Ollama clients, and your calls go to your provider exactly as before.
pip install runlatent
export LATENT_API_URL=https://app.runlatent.ai
export LATENT_API_KEY=lk_...
import runlatent
from openai import OpenAI
runlatent.auto_instrument() # once at startup
client = OpenAI()
answer = client.chat.completions.create(
model="gpt-4.1",
messages=[{"role": "user", "content": "What is our refund window?"}],
)
# Latent scores the answer off-thread; flagged answers wait in your review queue
The quickstart walks through setup and the first scored answer. Serving your own model on vLLM? The Latent plugin reads it inside the engine: see hallucination detection in vLLM.
Questions
- What is LLM hallucination detection?
- Checking a language model's answers for claims that are made up or unsupported by the sources it was given, so they can be caught before they reach users. Latent does it by reading the model's internal activations as well as the text.
- Does it work with GPT, Claude and Gemini?
- Yes. For models behind an API, Latent's reader model re-reads each finished answer. For open-weight models on vLLM, Latent reads your own model as it writes.
- Does it slow my app down?
- No. The SDK sends each answer off-thread after the call returns, so your requests wait on Latent only when you choose to hold flagged answers. Inside vLLM, the nightly benchmark shows no measurable overhead.
- Where does my data go?
- Hosted by Latent, prompts and answers are scored in the United States under the retention you set. In your VPC, nothing leaves it. Security
- How do I start?
- Sign up free and add one line of Python. Pricing lists the plans.
Research
- Why internal state: four published results on what a model's activations reveal that its output does not.
- Latent against an LLM judge: the time and cost of checking every answer, measured.
- Latent catches two-neuron evil Qwen before it writes a word: 245 of 245 steered prompts flagged from the model's state.
- We rebuilt the OpenAI x Hugging Face incident and stopped it before it happened: 99% of cheating agents stopped before the command ran.