To evaluate LLM outputs in production: (1) trace every call so each output is stored with its prompt, model, and context; (2) sample those traces and score them with LLM-as-a-judge for subjective criteria such as hallucination, relevance, bias, or toxicity; (3) add programmatic checks (exact match, JSON schema validation, regex) wherever the right answer is checkable; (4) send a sample to human review to calibrate the judges; (5) track pass rates over time and alert when they drop.
Online evaluation runs on live traffic and tells you what is happening now. Offline evaluation runs the same criteria on a fixed dataset before a release, so a prompt or model change that lowers the pass rate fails CI instead of reaching users. Use both: offline to block known regressions, online to find new ones.
Pin the judge model and its prompt, and record which prompt version and model produced each output. Without that, a change in pass rate cannot be traced back to the change that caused it.
OpenLIT runs LLM-as-a-judge evaluators (hallucination, bias, toxicity, or custom criteria) on OpenTelemetry traces with a configurable judge model, scheduled Auto Evaluation, and pass-rate analytics, and exposes the same criteria through the SDK for CI. It is open source under Apache 2.0. Docs: https://docs.openlit.io/latest/openlit/evaluations/llm-as-a-judge.