Pular para o conteúdo
← Back to Skalablog

Published article

How to Write Your First AI Eval: Criteria and Judges

Software EngineeringOpenAI

Learn how to write your first AI eval: define concrete pass/fail criteria, read traces, and build an LLM judge that catches regressions early.

How to write your first AI eval without vibe checks

To write your first AI eval, convert what "good" means for one user request into explicit pass and fail criteria, save the matching spans from real traces into a dataset, and grade them with a single LLM judge. SallyAnn DeLucia, head of product at Arize AI, presented that loop at the AI Engineer conference on 25 October 2026.

Vibe checks fail as a quality process because they leave no record. In the workshop, DeLucia described a week where a prompt change shipped on Monday felt better, and a use case fixed the previous week broke days later with nothing to prove either outcome. Without evals, a team cannot detect regressions after a prompt edit, compare prompt or model versions objectively, or place a quality gate in continuous integration.

The loop has six practical stages, and only one of them is writing a judge prompt:

  1. Read traces and note which outputs you would actually share with a user.
  2. Write down what good and bad look like as concrete bullets.
  3. Pick one span type to grade and filter the traces down to it.
  4. Save those spans into a dataset.
  5. Turn the bullets into a judge prompt in a prompt playground and run it.
  6. Read the explanations, edit the criteria, and run again.

DeLucia frames evals as the primary signal for an agent rather than a final audit. The stated goal of the session was three outcomes: a clear definition of what an eval is, the ability to write your own criteria, and a working judge built in the platform during the workshop.

Why an AI eval is not a unit test

An AI eval differs from a unit test because a unit test checks one input against one correct output, while an agent can produce many valid outputs whose reasoning only appears in a trace after the fact. DeLucia made the comparison directly in the workshop.

In conventional software you can read all of the logic in the code. In an agent, that logic surfaces as a trace instead: the record of every step the agent took between a user request and a final answer. A travel planner can pass with a different day-by-day itinerary, a different budget breakdown, and a different set of tool calls. A single assertion cannot capture that spread.

Her shorthand is that traces are the logs for AI and evals are the tests. That ordering matters for adoption, because observability comes before grading. You need captured traces before you can save a dataset, and an eval without data is a prompt with no evidence behind it.

What a trace actually shows an evaluator

A trace is the collection of every step an agent took to answer one user question, organised as spans from a root span down through tool calls and model calls. DeLucia used the Arize demo travel agent, which plans a trip for a stated destination, number of days, and budget.

The top-level entry is the root span, defined technically as the span whose parent ID is null. Root spans usually hold the original input and the final output. Everything beneath them is a span, which DeLucia describes as a unit of work. The demo trace includes an agent span for a research sub-agent, tool spans that fetch external data such as weather, and language model spans that choose a tool or summarise its result.

When the same trace showed two consecutive model spans, the explanation was instrumentation rather than duplication. The first call selected which tool to use; the second received the tool's data and summarised it. DeLucia noted that trace structure also reflects agent architecture, and that in the demo the research and local agents operate as modular workers rather than under a single supervisor that plans every sub-agent's steps.

A related boundary is what the tracing layer captures automatically. Standard attributes such as input messages arrive through the platform's instrumentation, while manual or hybrid instrumentation lets a team attach fields specific to its own use case. DeLucia points to Arize's tracing documentation as the reference for that setup.

Recording useful traces has a production counterpart in the Brazilian developer community. Gustavo Dev Doido teaches instrumentation and observability through Crazystack Typescript, and structured logging habits from that material make saved traces easier to read later.

Types of AI evals and when to use each

LLM as a judge, code evals, decision models, annotations, and agent as a judge are the main eval types DeLucia lists, and they differ in cost, speed, explanation, and the kind of criteria they handle well. Her recommendation is to begin with an LLM judge and add deterministic checks where they fit.

The table below compares the options on the dimensions the workshop covered.

Eval typeWhat it doesBest forMain limitation
LLM as a judgeA second model grades an output and returns a label plus an explanationSubjective qualities such as answer accuracy or relevanceWorks best with one criterion per judge
Code evalDeterministic script or metric scores the outputKeyword checks, valid JSON, ROUGE or BLEU scoresCannot judge open-ended quality
Decision modelA smaller model returns a probability and a labelCheap, fast true/false or multi-label checksNo explanation returned
AnnotationsHuman-labelled ground truth on a datasetBuilding a reference set, including synthetic dataHuman time and reviewer consistency
Agent as a judgeA full agent evaluates another agentComplex, multi-step success criteriaHarder to debug than a single judge

DeLucia noted that OpenAI had released a decision model API the week before the talk, which places that release in mid-October 2026. She expects decision models to grow in importance for evaluation because they are cheap and fast.

The first four types, plus annotations, are meant to run across both development and production. User feedback and business metrics sit closer to production only. That split matters when you choose where to invest, because a judge written for development should keep working once real traffic arrives.

How to turn vague goals into pass and fail criteria

Writing concrete criteria is the step that decides whether a judge is useful, and the recipe is to replace adjectives such as helpful or accurate with testable statements about the user's request. DeLucia called this the difference between vague and concrete criteria.

For the travel agent, vague criteria would be a good, helpful, accurate response. Concrete criteria read as: the answer follows up on the user's follow-up questions, matches the requested number of days, and keeps totals inside the stated budget. Each one can be marked pass or fail against a single trace.

She asks workshop participants to write six things before building anything: the task being judged, what success looks like, what failure looks like, what the eval is actually judging, three bullets for a pass, and three bullets for a fail. The bullets go into the judge prompt nearly verbatim, so specificity in the notes transfers directly to specificity in the grader.

A common question is why a one-line instruction is not enough. The answer is that the criteria become the prompt for the judging model, and a model needs the same detail a colleague would need to review the output without asking follow-up questions. DeLucia's working standard is to describe success the way you would describe it to a stakeholder.

Building and iterating on an LLM judge

Building the judge means saving the right spans to a dataset, converting criteria into a prompt with mapped variables, running it, and revising the template each time you disagree with a label. The workshop demonstrated the full cycle in Arize's prompt playground.

The span you save determines what the judge sees. To grade the final itinerary against the original request, save the root spans, which can be filtered by parent ID being null. To check whether a tool returned usable data, filter by span name and save the tool spans instead.

Inside the judge prompt, start by telling the model its job, then supply the data, then state the pass and fail bullets. DeLucia uses variable mapping so prompt placeholders connect to dataset columns at run time, which keeps a judge reusable when a dataset names a field differently from a trace. Labels can be binary such as correct and incorrect, multi-valued such as correct, partially correct, and incorrect, and they can include a not applicable option, but each run returns exactly one label.

Explanations are the part that makes iteration possible. They give the reasoning behind a label, so a reviewer can spot a judge that reached the right verdict for the wrong reason. DeLucia ran the judge on a small model to demonstrate speed, then adjusted the template wherever the output disagreed with her reading of the trace.

Beyond a single template, the follow-on work she described is alignment, where each dataset example is annotated and the judge's label is compared with the human one, and online evaluation, where a saved evaluator runs on every incoming trace so the score becomes a monitoring signal rather than a one-off experiment.

Scope your eval claims before you scale them

A first eval proves something about the traces you saved and the criteria you wrote, and nothing wider than that. The workshop supports a narrow, defensible scope and cautions against reading more into a single judge.

Three limits are worth stating plainly. A generic template from the Arize eval hub is a starting point rather than proof of quality for your product, and DeLucia's own position is that a specific eval beats a generic one while any eval beats none. A judge that agrees with you on 20 examples has not been validated against human labels until the alignment step is done. And an LLM judge handling several criteria at once is a documented weak spot in her account, which is why she recommends one quality per judge.

The same discipline applies to content published around evals. Turning an hour of workshop material into a readable article is a skill covered in the Bootcamp do Dev Doido, where the emphasis falls on keeping the technical detail intact.

Scale is the last thing to add. DeLucia's own agent inside the platform began with a simple set covering answer correctness, user frustration, and safety checks such as jailbreak and toxicity, and reached 32 evals over time. That growth came after production usage showed which definitions of success were still missing.

FAQ

  • How many traces do you need for a first AI eval? DeLucia recommends starting with about 20 traces, one dimension, and one judge. A small set you have read carefully teaches more about your criteria than a large set you have only skimmed, and you can expand once the explanations look reliable.
  • Should an LLM judge evaluate more than one criterion at a time? For an LLM as a judge, the answer is usually no. DeLucia cites research indicating judges handle one criterion well, and notes that decision models and agent as a judge tolerate multiple criteria better. Start with one quality and add more judges later.
  • Do you have to use Arize or a specific model provider to run evals? No. The platform is framework-agnostic and works with major model providers, and participants were told to use their own API key from whichever provider they preferred. The concepts of traces, criteria, and judge prompts transfer to other tooling.
  • What is the difference between an eval and a metric? A metric tells you that something might be broken, while an eval tells you what the failure mode is. DeLucia recommends using both, because a dashboard alert without a labelled example rarely explains what to fix.
  • Can the judge prompt be updated without breaking existing runs? Variable mapping connects prompt placeholders to your data at run time, so a field rename in a dataset is fixed at the task level instead of inside every judge. That flexibility is why the saved evaluator can serve several applications.
  • Who should define success criteria for an agent? Everyone with a stake in the agent, according to DeLucia. Product, engineering, support, domain experts, and security all see different failure modes, and each group's definition of success belongs in the criteria rather than in one person's judgment.
  • When should a code eval replace an LLM judge? Use a code eval whenever the check is deterministic, such as confirming a word appears in an output or that a response parses as JSON. Reserve model-based judges for qualities that cannot be verified with a rule.
  • What comes after the first eval is working? Alignment and online evaluation. Annotate the dataset, compare judge labels with human ones, then run the saved evaluator continuously on incoming traces so regressions surface without a manual review.
  • Is recording traces a prerequisite for evaluation? Yes. Evals grade saved spans, so a team without observability has nothing to score. DeLucia's summary is that traces are the logs for AI and evals are the tests that read them.

Turning a workshop into notes you can reuse

A 35-minute workshop leaves a lot of material in one place: transcripts of decisions, caveats, and small corrections that are easy to lose. The habit that keeps them useful is the same one DeLucia applies to evals, which is writing the specific thing down instead of the general impression.

If you have recorded talks, interviews, or internal walkthroughs that carry that kind of detail, Skalablog turns the video into a drafted article by transcribing it first and then structuring the transcript into readable sections. Paste the YouTube URL, let the transcript come through, and edit the result against your own notes.

Skala Blog

Source video