Evals

Templates

39 ready-made evals in seven groups: answer quality, grounding, safety, tools, performance and cost, conversations, and people in the loop. Where to start, and how to adapt one.

Every template is a complete eval, built the way this guide recommends: cheap steps first, a model only where it adds something, endings named for why. Open them from Assess → Evals → New eval, search for what you want to catch (hallucination, tool errors, frustration, JSON, latency), or pick a group on the left.

Start here

Three templates to reach for first, one for each way of deciding. The New eval dialog shows them at the top.

TemplateLevelDecides withUse it for
RAG faithfulnessRunPython · Decision modelAnswers that must come from your documents, not the model's memory.
Answers the questionRunLLM judgeThe first eval most agents need: is the reply about what was asked?
Tool call succeededSpanPythonThe quickest health check of your tools, including failures hidden inside a "successful" output.

Using a template

  1. Pick one. The create dialog opens filled in: name, description, level, filters and steps.
  2. Pick the judge's model, if it has judge steps. One choice sets every judge step; you can change each later. Decision model steps take your team's most recent decision model; with none, the dialog asks you to add Jev or Hartley in Settings → Models.
  3. Create and open, then adapt the steps on the canvas. The Adapt it column below says what to change.
  4. Test, then turn on. Templates start switched off. Test on a few real traces, then turn it on in ⋯ → Settings.

Templates read span kinds (tool, llm, retrieval), which every Trodo SDK and integration sets, so they work on any agent. Where your agent is built differently (facts in spans that are not tools, a retriever with its own name) the Adapt it line says what to change.

Answer quality

TemplateLevelUsesWhat it doesAdapt it
Answers the questionRunLLM judgeA judge scores how directly the answer addresses what the user asked.Raise the pass line from 0.7 if your answers must be exact.
Complete answerRunLLM judgeA judge decides whether every part of a multi-part question was answered.Route "partial" to a pass if partial answers are acceptable for you.
Answers instead of refusingRunDecision modelA decision model asks two things of every reply: did it answer, and if it declined, was declining right. Answers pass, fair refusals pass, giving up fails.Say what your agent should decline in the second question.
Valid JSON outputRunPythonPython parses the output as JSON and checks the keys you require are there.Put your required keys in REQUIRED.
Answer length in boundsRunPythonPython counts the words in the answer and fails empty, too-short and too-long replies.Set MIN_WORDS and MAX_WORDS.
Matches the expected answerRunPython · LLM judgeWhen a run carries an expected answer in its metadata, Python compares exactly first and a judge decides the rest.Send the expected answer as metadata.expected_output, or change the key in the Python.
Tone and helpfulnessRunLLM judgeA judge rates the reply's tone: professional, clear and kind to the user.Describe your brand voice in the prompt.
Replies in the user's languageRunLLM judgeA judge checks the reply is written in the language the user wrote in.None needed.
Replies in the user's language (no model)RunPythonPython compares the writing system of the user's message and the reply (Latin, CJK, Cyrillic, Arabic, …) and fails when they differ. Free; the judge version is for languages that share a script.Short or mixed messages read as unclear and pass; use the judge version when your users' languages share a script (e.g. English and Spanish).

Grounding and hallucination

TemplateLevelUsesWhat it doesAdapt it
Grounded in tool resultsRunPython · Decision model · Human reviewCatches hallucination: a decision model checks every figure and claim of the answer against the tool outputs, and what it cannot tell goes to a person.If your facts come from spans that are not tools, change which spans Gather tool results reads.
RAG faithfulnessRunPython · Decision modelFor retrieval agents: a decision model reads the retrieved documents and the answer, and fails answers that state what the documents do not support.If your retrieval spans are not of kind "retrieval", change the Documents tag to pick them by name.
Retrieval found somethingSpanPythonA retrieval span must return results; an empty retrieval that still led to an answer is the classic source of made-up answers.Filter to your retriever's span name if you have several.

Safety and compliance

TemplateLevelUsesWhat it doesAdapt it
No personal data in the answerRunPythonPython looks for emails, phone numbers, card numbers and national ids in the output.Add patterns for the identifiers of your market.
No secrets in the answerRunPythonPython looks for API keys, tokens and private keys in the output.Add the key formats your stack uses.
Safe contentRunLLM judgeA judge classifies the reply as safe, or as harmful, hateful, sexual or self-harm content.Add your own categories to the judge's values.
Resists prompt injectionRunDecision modelA decision model asks whether the input tries to override the agent's instructions, and whether the agent went along with it.Say in the second question what your agent must never reveal or do.
Stays in scopeRunLLM judgeA judge checks the agent only helps with what it is for, and politely declines the rest.Describe your agent's scope in the prompt.
No regulated adviceRunLLM judgeA judge fails replies that give personal financial, legal or medical advice instead of general information.Keep only the domains that apply to you.

Tools and agent behaviour

TemplateLevelUsesWhat it doesAdapt it
Tool call succeededSpanPythonScores every tool call: failed when the span errored, or when it says ok but its output carries an error.Filter to one tool by name to watch it alone.
Tool arguments are validSpanPythonPython checks each tool call's input is JSON with the fields you require.List the required argument names; filter to one tool for per-tool rules.
Recovers from failed toolsRunPython · LLM judgeWhen a tool fails, did the agent retry and succeed, or answer anyway? A judge decides whether an unrecovered run admitted the problem or covered it up.None needed; tighten the judge's prompt for your domain.
No tool loopsRunPythonPython fails runs that call the same tool with the same input again and again.Change the pass range (0–2 repeats) on the step's route.
Stays within its step budgetRunPythonPython counts model and tool calls in a run and fails runs that take too many.Set MAX_LLM_CALLS and MAX_TOOL_CALLS from what a good run of yours takes.
No tool call stormRunPythonPython fails runs that make far more tool calls than a run should — the storm an agent gets into when it fans out or thrashes.Set the pass range to a little above what your busiest good run makes.
Retries do not run outRunPythonPython fails runs where one tool failed three or more times in a row and never succeeded after — retried until it gave up.Change ATTEMPTS to your retry limit.
Tools do not answer emptySpanPythonPython fails tool calls that report success but return nothing: an empty output, or one that says "no results".Filter to the tools where an empty answer is a problem (a search that finds nothing may be fine for some).
Tool failures, by causeSpanPythonPython passes tool calls that worked and fails the rest with their cause — auth, rate limit, bad request or other — so an alert can watch one cause.Make an eval alert on failures filtered to one reason code (AUTH_FAILED, RATE_LIMITED, BAD_REQUEST, TOOL_ERROR).

Performance and cost

TemplateLevelUsesWhat it doesAdapt it
Latency budgetRunPythonPython fails runs slower than your target.Change the pass range (0–20 s) on the step's route; filter by agent to hold agents to different targets. For p95 over time, use the Slow runs alert.
Cost budget per runRunPythonPython fails runs that cost more than your budget in model spend.Set the pass range to your budget in US dollars.
Model call is healthySpanPythonScores every model call: it must not error, must return text, and must not be cut off at the token limit.Filter to one model or one call site by span name.
Prompt size in boundsSpanPythonPython fails model calls whose prompt is larger than you meant to send.Set the pass range to your largest acceptable prompt, in tokens.

Conversations

TemplateLevelUsesWhat it doesAdapt it
Conversation reached its goalConversationLLM judgeA judge reads the whole thread and decides whether what the user came for was resolved.Say what "resolved" means for your product in the prompt.
User frustrationConversationDecision model · Human reviewA decision model reads the thread and asks whether the user is frustrated by the end; the threads it cannot call go to a person.Say what frustration looks like for your users in the question.
User had to repeat themselvesConversationDecision modelA decision model reads the user's turns and fails threads where they asked the same thing again.None needed.
Ended with an answerConversationDecision modelA decision model pairs the user's last message with the last reply: a thread that ends on an unanswered question fails. A clarifying question earlier in the thread does not count against it.None needed.
Resolved in few turnsConversationPythonPython counts the turns in a thread; long threads for simple asks mean the agent is making users work.Set the pass range to the turns a good conversation of yours takes.
User did not leave after a failureConversationPythonPython fails threads whose last turn failed or refused — the user left right after the agent let them down.Add phrases your agent uses when it declines to REFUSALS.

People in the loop

TemplateLevelUsesWhat it doesAdapt it
Screen, then a person decidesRunPython · Human reviewA cheap Python screen passes the clear cases; the rest wait in the grading queue for someone on your team.Write the screen for what you are sure of; turn sampling down to control the queue.
Review what users dislikedRunPython · LLM judgeRuns a user rated badly go to a judge for the reason; the judge's category is the report you read each week.Change the categories to the failure types you care about.

Don't see yours?

Describe it to Lucid: create an eval that catches answers quoting prices we don't offer. Lucid reads your traces, designs the eval, tries it, and creates it switched off. See Self-improving evals and Lucid. Or start from the closest template and change its steps.

On this page