Latent docs
How Latent scores each answer your model writes for hallucinations, how it learns your traffic, and where it runs.
Latent labels every answer your model gives, in milliseconds and with no human labelers, so you can post-train it on your own traffic. On hosted plans, Latent's own reader model reads each finished answer. When Latent runs in your environment beside an open-weight model on vLLM, it reads your model as it writes. To get started, start free, or see the plans.
Start in two minutes
Install the SDK, set two environment variables and add one line at startup. Every OpenAI, Anthropic and Google GenAI call in the process is scored from then on.
pip install runlatent
export LATENT_API_URL=https://app.runlatent.ai
export LATENT_API_KEY=lk_...
# then, once at the start of your app
import runlatent
runlatent.auto_instrument()
How Latent works
Scored answersWhat Latent returns for each finished LLM response (risk score, verdict, cut and audit event), where the riskiest sentence is marked, and how to send answers in-band or through the reader.Failure standardsThe rules Latent's calibration judge applies to decide which of your answers count as hallucinations, the one hosted plans use, and how to choose and set one in your environment.CalibrationHow Latent calibrates on your own answers: the schedule on each hosted plan, what a run does, how many answers it needs, and running one yourself in your environment.Data and retentionWhat Latent keeps on each hosted plan and for how long, and when it runs in your environment, how to set retention and redaction and exactly what leaves it.Streaming and complete answersHow Latent scores a streamed answer and a complete one, and what can act on the verdict in each case, hosted and in your environment.Act on a flagged answerWhat can happen to a flagged answer after Latent scores it, where each action runs (the gateway, the plugin, your code), how to set it on the Policy page, and which setup fits your deployment.
Integrations
IntegrationsEvery way to send answers to Latent and every place Latent sends alerts, with the plans that include each one.Alerts and integrationsThe rules that decide when Latent alerts, and how to send alerts to Slack, PagerDuty, email or your own webhook.
Where Latent runs
Was this page helpful?