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.
| Template | Level | Decides with | Use it for |
|---|---|---|---|
| RAG faithfulness | Run | Python · Decision model | Answers that must come from your documents, not the model's memory. |
| Answers the question | Run | LLM judge | The first eval most agents need: is the reply about what was asked? |
| Tool call succeeded | Span | Python | The quickest health check of your tools, including failures hidden inside a "successful" output. |
Using a template
- Pick one. The create dialog opens filled in: name, description, level, filters and steps.
- 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.
- Create and open, then adapt the steps on the canvas. The Adapt it column below says what to change.
- 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
| Template | Level | Uses | What it does | Adapt it |
|---|---|---|---|---|
| Answers the question | Run | LLM judge | A 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 answer | Run | LLM judge | A 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 refusing | Run | Decision model | A 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 output | Run | Python | Python parses the output as JSON and checks the keys you require are there. | Put your required keys in REQUIRED. |
| Answer length in bounds | Run | Python | Python counts the words in the answer and fails empty, too-short and too-long replies. | Set MIN_WORDS and MAX_WORDS. |
| Matches the expected answer | Run | Python · LLM judge | When 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 helpfulness | Run | LLM judge | A 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 language | Run | LLM judge | A judge checks the reply is written in the language the user wrote in. | None needed. |
| Replies in the user's language (no model) | Run | Python | Python 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
| Template | Level | Uses | What it does | Adapt it |
|---|---|---|---|---|
| Grounded in tool results | Run | Python · Decision model · Human review | Catches 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 faithfulness | Run | Python · Decision model | For 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 something | Span | Python | A 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
| Template | Level | Uses | What it does | Adapt it |
|---|---|---|---|---|
| No personal data in the answer | Run | Python | Python 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 answer | Run | Python | Python looks for API keys, tokens and private keys in the output. | Add the key formats your stack uses. |
| Safe content | Run | LLM judge | A 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 injection | Run | Decision model | A 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 scope | Run | LLM judge | A 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 advice | Run | LLM judge | A 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
| Template | Level | Uses | What it does | Adapt it |
|---|---|---|---|---|
| Tool call succeeded | Span | Python | Scores 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 valid | Span | Python | Python 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 tools | Run | Python · LLM judge | When 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 loops | Run | Python | Python 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 budget | Run | Python | Python 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 storm | Run | Python | Python 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 out | Run | Python | Python 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 empty | Span | Python | Python 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 cause | Span | Python | Python 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
| Template | Level | Uses | What it does | Adapt it |
|---|---|---|---|---|
| Latency budget | Run | Python | Python 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 run | Run | Python | Python fails runs that cost more than your budget in model spend. | Set the pass range to your budget in US dollars. |
| Model call is healthy | Span | Python | Scores 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 bounds | Span | Python | Python fails model calls whose prompt is larger than you meant to send. | Set the pass range to your largest acceptable prompt, in tokens. |
Conversations
| Template | Level | Uses | What it does | Adapt it |
|---|---|---|---|---|
| Conversation reached its goal | Conversation | LLM judge | A 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 frustration | Conversation | Decision model · Human review | A 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 themselves | Conversation | Decision model | A decision model reads the user's turns and fails threads where they asked the same thing again. | None needed. |
| Ended with an answer | Conversation | Decision model | A 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 turns | Conversation | Python | Python 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 failure | Conversation | Python | Python 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
| Template | Level | Uses | What it does | Adapt it |
|---|---|---|---|---|
| Screen, then a person decides | Run | Python · Human review | A 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 disliked | Run | Python · LLM judge | Runs 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.
Filters and sampling
Decide which traffic an eval scores: filters on any trace field (one agent, runs that used a span, one customer) and sampling to score a steady share, or a span eval only when a run eval asks.
Test, version, ship
Test an eval on real traces before it scores anything, save versions with notes, put one in production, restore an old one, re-score history, and see who changed what.