> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Evaluations

> Score AI outputs automatically for hallucination, bias, toxicity, and more - or add your own human feedback

Automated AI evaluation to assess and monitor the quality, safety, and performance of your LLM outputs across development and production environments. Open **Monitor → Evaluations** for Analytics, Evaluators, and Configuration. For evaluation types and custom evaluators, see [Evaluators](https://docs.openlit.io/latest/openlit/evaluations/evaluators.md).

<video autoPlay muted loop controls src="https://mintcdn.com/openlit/aOfr98SoBuW0Qor7/images/evaluations-overview.mp4?fit=max&auto=format&n=aOfr98SoBuW0Qor7&q=85&s=bc3b17df7fb8a19746019d32616f009a" alt="Demo of OpenLIT's automated evaluation scoring" />

## Find the right feature

| If you want to... | Use this OpenLIT feature |
| - | - |
| Automatically score every production trace | [Configuration](https://docs.openlit.io/latest/openlit/evaluations/configuration.md) (Auto Evaluation) |
| Score one specific trace on demand | [LLM-as-a-Judge](https://docs.openlit.io/latest/openlit/evaluations/llm-as-a-judge.md) from that trace's Evaluation tab |
| Rate a trace yourself instead of an LLM judge | [Manual Feedback](https://docs.openlit.io/latest/openlit/evaluations/manual-feedback.md) - Good / Bad / Neutral plus a comment |
| Judge responses against your own ground truth, not just the model's knowledge | [Rule Engine](https://docs.openlit.io/latest/openlit/prompts-experiments/rule-engine/overview.md) + [Context](https://docs.openlit.io/latest/openlit/prompts-experiments/context/overview.md) |
| Evaluate on criteria beyond the 11 built-in types | [Custom evaluators](https://docs.openlit.io/latest/openlit/evaluations/evaluators.md#custom-evaluators) |
| Only run certain evaluators for certain models, providers, or environments | [Evaluators](https://docs.openlit.io/latest/openlit/evaluations/evaluators.md) + [Rule Engine](https://docs.openlit.io/latest/openlit/prompts-experiments/rule-engine/overview.md) |
| Test prompt or model changes before shipping | [Programmatic evaluations](https://docs.openlit.io/latest/sdk/quickstart-programmatic-evals.md) via the SDK |
| Block a deploy on a quality regression | [Programmatic evaluations](https://docs.openlit.io/latest/sdk/quickstart-programmatic-evals.md) in a CI/CD pipeline |
| See pass-rate trends across evaluators and time | [Analytics](https://docs.openlit.io/latest/openlit/evaluations/analytics.md) |

## Setup

> [tab] Online
>
> ```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
> flowchart LR;
>     A[LLM / Agent call] -->|creates| B[Trace in OpenLIT];
>     B -->|Auto Eval schedule or manual Run Evaluation| C[LLM Judge];
>     C -->|score + classification + reasoning| D[Trace detail & Dashboard];
> ```
>
> **1. Pick a judge model**
>
> Go to **Evaluations → Settings**, choose a provider and model to act as the judge (OpenAI, Anthropic, Google, Mistral, TypeSafe Jev, and others), and add its API key from [Vault](https://docs.openlit.io/latest/openlit/developer-resources/vault/overview.md). TypeSafe Jev uses the System One API rather than chat completions. See [TypeSafe Jev judge](https://docs.openlit.io/latest/openlit/evaluations/evaluators.md#typesafe-jev-judge).
>
> **2. Enable evaluators**
>
> Switch to the **Evaluation Types** tab and turn on the evaluators you want. Hallucination, Bias, and Toxicity are enabled by default; Relevance, Coherence, Safety, and 5 others are opt-in.
>
> **3. Turn on Auto Evaluation**
>
> Back in Settings, enable **Auto Evaluation** with a cron schedule so every new trace gets scored automatically - or skip this and click **Run Evaluation** from any trace's Evaluation tab to score it on demand.
>
> **4. Review results**
>
> Open any trace's **Evaluation** tab for its score, classification, and reasoning, or check the **Evaluations** dashboard for aggregate trends across models and time.

> [tab] Offline
>
> ```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
> flowchart LR;
>     E[Dataset] -->|SDK evaluate call| F[LLM Judge];
>     F -->|score| G[Pass / fail gate];
> ```
>
> **1. Get an API key**
>
> In OpenLIT, go to **Settings → API Keys** and create a key. Offline evaluations call your OpenLIT server, so you'll need this key plus your OpenLIT URL.
>
> **2. Run an evaluation**
>
> > [tab] Python
> >
> > ```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > import openlit
> >
> > openlit.init(
> >     openlit_url="http://localhost:3000",
> >     openlit_api_key="openlit-xxxxx",
> > )
> >
> > result = openlit.eval(
> >     prompt="What is the capital of France?",
> >     response="The capital of France is Lyon.",
> >     contexts=["Paris is the capital and largest city of France."],
> > )
> >
> > assert result.passed, f"Evaluation failed: {result.failed_evals}"
> > ```
>
> > [tab] Typescript
> >
> > ```typescript theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > import openlit, { isPassed, getFailedEvals } from "openlit"
> >
> > openlit.init({
> >   openlitUrl: "http://localhost:3000",
> >   openlitApiKey: "openlit-xxxxx",
> > })
> >
> > const result = await openlit.eval({
> >   prompt: "What is the capital of France?",
> >   response: "The capital of France is Lyon.",
> >   contexts: ["Paris is the capital and largest city of France."],
> > })
> >
> > console.log(isPassed(result), getFailedEvals(result))
> > ```
>
> This uses the exact same evaluators, custom types, and Rule Engine context matching configured in your dashboard - see the [Programmatic evaluations quickstart](https://docs.openlit.io/latest/sdk/quickstart-programmatic-evals.md) for batch runs and CI/CD gating.

***

> [card] [Evaluators](https://docs.openlit.io/latest/openlit/evaluations/evaluators.md)
>
> Built-in and custom evaluation types

> [card] [Configuration](https://docs.openlit.io/latest/openlit/evaluations/configuration.md)
>
> Auto Evaluation schedule and judge model

> [card] [LLM-as-a-Judge](https://docs.openlit.io/latest/openlit/evaluations/llm-as-a-judge.md)
>
> Use advanced LLMs to evaluate AI application quality with automated scoring

> [card] [Programmatic evaluations](https://docs.openlit.io/latest/sdk/quickstart-programmatic-evals.md)
>
> Quick start guide for implementing custom evaluations in your code


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.