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

# Evaluator Types — Human, Code, and LLM-as-a-Judge

> Three kinds of evaluators — human, code-based, and LLM-as-a-judge. What each is good at, what each isn't, and how to choose between them.

export const AskAlyx = ({children}) => {
  const gradientId = `askAlyxGradient-${Math.random().toString(36).slice(2)}`;
  return <div style={{
    display: "flex",
    alignItems: "flex-start",
    gap: "0.625rem",
    margin: "1rem 0",
    padding: "0.75rem 1rem",
    borderRadius: "10px",
    border: "1px solid rgba(120, 115, 245, 0.25)",
    background: "linear-gradient(135deg, rgba(255, 110, 196, 0.08), rgba(120, 115, 245, 0.08))"
  }}>
      <svg width="18" height="18" viewBox="0 0 21 17" xmlns="http://www.w3.org/2000/svg" style={{
    flexShrink: 0,
    marginTop: "0.2rem"
  }}>
        <defs>
          <linearGradient id={gradientId} x1="0%" y1="100%" x2="100%" y2="0%">
            <stop offset="0%" stopColor="#FF3CA8" />
            <stop offset="100%" stopColor="#4827C1" />
          </linearGradient>
        </defs>
        <path d="M6.28906 12.7223C6.28889 11.3831 5.24007 10.3385 3.98926 10.3385C2.73859 10.3387 1.68963 11.3832 1.68945 12.7223C1.68945 14.0616 2.73849 15.1059 3.98926 15.1061C5.24018 15.1061 6.28906 14.0617 6.28906 12.7223ZM7.81152 0.557254C9.70554 -0.563135 12.1081 0.0645388 13.2607 1.91468L13.3691 2.09827V2.09925L20.7266 15.402C20.8713 15.6637 20.8667 15.9823 20.7148 16.2399C20.5629 16.4975 20.2864 16.6559 19.9873 16.6559H14.5459C13.0953 16.6474 11.7648 15.848 11.0469 14.5748V14.5739L6.33301 6.19104C5.22656 4.2273 5.87813 1.706 7.80957 0.558231L7.81152 0.557254ZM11.8906 2.91761C11.2374 1.74047 9.78961 1.34962 8.67188 2.01038L8.67285 2.01136C7.61521 2.64 7.19477 3.99924 7.69336 5.13733L7.80566 5.36194V5.36292L12.5186 13.7448C12.9466 14.5038 13.7274 14.9616 14.5557 14.9664H18.5547L11.8906 2.91663V2.91761ZM7.97949 12.7223C7.97949 14.9527 6.21527 16.7965 3.98926 16.7965C1.7634 16.7963 0 14.9526 0 12.7223C0.000173728 10.4921 1.76351 8.64923 3.98926 8.64905C6.21516 8.64905 7.97932 10.492 7.97949 12.7223Z" fill={`url(#${gradientId})`} />
      </svg>
      <span>{children}</span>
    </div>;
};

The level of an evaluator tells you what slice of data it looks at. The **type** tells you how it makes its judgment. Three kinds of evaluators exist, and they aren't interchangeable — each is suited to a different class of question.

# The three types

| Type               | How it works                                                   | Where it shines                                                                                                     | Where it doesn't                                                       |
| :----------------- | :------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------- |
| **Human**          | A reviewer scores outputs against a rubric.                    | Capturing nuance and subject-matter expertise; defining golden datasets that calibrate other evaluators.            | Slow, expensive, inconsistent across reviewers, doesn't scale.         |
| **Code-based**     | Deterministic Python (or built-in templates) check the output. | Anything that can be programmatically checked — string contains, JSON shape, regex match, deterministic comparison. | Anything subjective — tone, helpfulness, factuality.                   |
| **LLM-as-a-judge** | An LLM reads the data and emits a label and explanation.       | Subjective qualities at scale, with minimal up-front data; flexible across domains.                                 | Non-deterministic; requires prompt design; vulnerable to known biases. |

# Human evaluation

Human evaluation is the calibration target for everything else. When you want to know whether your other evaluators are *correct*, you compare them to human-labeled data.

What humans are good at:

* **Nuance and context.** A human reviewer with domain knowledge can spot subtle factual errors, tone problems, or context-specific failures that pattern-matching can't.
* **Defining ground truth.** Golden datasets — small, carefully-labeled collections of input/output pairs — are how every other evaluator gets validated. They almost always start with human labeling.
* **Edge cases.** Rare failure modes that no automated system was designed to catch.

What humans aren't good at:

* **Scale.** A human reviewer can read maybe a few hundred traces a day; a production application generates orders of magnitude more.
* **Speed.** Human turnaround is hours-to-days; automated turnaround is seconds-to-minutes.
* **Consistency.** Two reviewers, given the same rubric, will disagree on a non-trivial fraction of cases. One reviewer, given the same trace twice on different days, will sometimes disagree with themselves.
* **Bandwidth.** Humans cannot evaluate against four million tokens of context. Pattern-matching tasks like "find spans that match X criteria across the last month of data" are not human tasks.

Use humans to **define and validate** golden datasets, and to spot-check production. Don't use humans as a continuous evaluator for any meaningful volume.

# Code-based evaluators

Code-based evaluators run pure Python (or a built-in template) against the output. They are fast, cheap, deterministic, and repeatable — which makes them the right choice whenever the question can be expressed as a check.

What code is good at:

* **Deterministic criteria.** "Does the output contain a competitor's name?" "Is the JSON shape correct?" "Did the function call use the right parameter names?" Anything where a correct/incorrect answer is fully determined by the data.
* **Reliability.** A code evaluator gives the same answer every time. No retry loops, no rate limits, no model drift.
* **Speed and cost.** Running a code evaluator is essentially free compared to an LLM call.

What code isn't good at:

* **Anything subjective.** Tone, factuality, helpfulness, coherence — these can't be checked by pattern-matching.
* **Anything that needs reasoning.** "Is the response consistent with the retrieved context?" requires understanding both pieces, which code can't do.

A common pattern: combine code evaluators (for the deterministic checks) with LLM-as-a-judge evaluators (for the subjective ones) and use the code ones as cheap pre-filters before paying for the LLM ones.

# LLM-as-a-judge

LLM-as-a-judge uses a pre-trained LLM to read the data and emit a label, score, and explanation.

What LLM-as-a-judge is good at:

* **Subjective evaluation at scale.** Tone, helpfulness, factuality, coherence — questions that need reasoning.
* **Flexibility.** A new evaluator is a new prompt, not a new model.
* **No training data required up front.** You'll want a small golden dataset to validate the judge, but you don't need thousands of examples to get started.

What LLM-as-a-judge isn't good at:

* **Determinism.** The same judge, run twice on the same input, can disagree with itself.
* **Cost-free operation.** Every eval is an LLM call. At production volume, this matters — see [Filters, scope, and cadence](/docs/ax/concepts/evaluators/filters-scope-and-cadence) for the sampling levers.
* **Resistance to bias.** Verbosity bias, position bias, self-enhancement bias — see [Evaluator best practices](/docs/ax/concepts/evaluators/evaluator-best-practices) for the catalog and how to guard against them.

For the canonical LLM-as-a-judge survey paper, see Gu et al., 2024 — [A Survey on LLM-as-a-Judge](https://arxiv.org/abs/2411.15594).

# Choosing between types

A decision tree:

1. **Is the question deterministic?** (Yes = code-based. Done.)
2. **Do you need to evaluate at production scale?** (No = human is fine for small samples.)
3. **Default for everything else** = LLM-as-a-judge.

<AskAlyx>**Ask Alyx** to suggest the right evaluator for a check you describe in plain language.</AskAlyx>

Most production setups end up running multiple types in parallel — code evaluators for the cheap deterministic checks, LLM-as-a-judge evaluators for the subjective questions, periodic human review to validate the judges. The three types complement each other; they don't compete.

***

## Next step

Whichever type you pick, every evaluator has the same shape — inputs, outputs, and metadata. The next page covers that anatomy:

<Card title="Next: Anatomy of an Evaluator" icon="arrow-right" href="/docs/ax/concepts/evaluators/anatomy-of-an-evaluator" />
