Skip to content

How to evaluate whether your agent completed the task

Evaluate task completion by writing down what a finished task means for each user goal, then scoring each run's outcome against that goal. Don't score whether the steps or requests succeeded.

By Arun Prasad · Published · Last updated

On this page

Why agent task completion evaluation matters

Standard monitoring shows that a request went through. It doesn't show whether the answer was right. An agent can succeed on every step and still miss what the user wanted.

AI agents don't fail like normal software. A tool can return a 200 and the task can still fail. Picture a support agent that looks up an order, calls the refund tool, gets a success response, and tells the user the refund is on its way. If the refund was filed against the wrong order, every span is green and the user's goal is unmet. A health check or error-rate dashboard won't flag it.

Task completion evaluation closes that gap. It asks one question per run: did the user get what they came for?

Step 1: Define what completed means for each user goal

Write down, for each kind of user goal, what must be true at the end of the run. An agent can't be scored against a goal that isn't written down.

Start with the intents your agent handles. For each one, write two things: what the user came for, and the observable end state that proves it was done. Keep each criterion checkable by someone who didn't build the agent.

Hypothetical example, for a refund intent:

PartCriterion
User goalGet money back for a specific order
Done whenThe refund tool was called with the order the user named, the user was told the amount and timing, and no further question from the user is left unanswered
Not done whenThe tool returned success but for a different order, or the agent said done without calling the tool

Also write down the cases that should end without completion, such as a request outside your policy. For those, completed means the agent declined correctly and said why. Without this, an agent that refuses wrongly and one that refuses rightly look the same.

Step 2: Capture full runs, not just final answers

A final answer alone hides most failures. You need the steps, tool calls, retries and handoffs behind it to judge whether the goal was reached across the whole conversation.

In PRISM's agent observability, four connected views cover this: Traces (per-run request, response, model, cost, timing and scores), Sessions (the multi-turn journey and drift), Agent Runs (steps, tool calls, retries, handoffs and state), and Scores & Alerts.

Two limits to plan for:

  • Agent steps appear when your integration sends them. If your integration only sends the final exchange, you get the final exchange.
  • Traces that share a session_id form one conversation. Sessions can't be backfilled, so set the ID from the first request you send.

Step 3: Score each run with rules and an LLM judge

Use deterministic rules for checks with one right answer, and an LLM judge for judgment calls. Run both, then read a sample of judge verdicts yourself, because judges can be wrong.

There are three ways to measure whether an agent completed the task:

  • Deterministic rules give the same verdict for the same input and use no model. Good fits: the required tool was called, the output format is valid, the order ID in the tool call matches the one the user gave.
  • LLM-as-judge is a model that reads the exchange and decides whether the goal was met. Use it for what rules can't express, such as whether the user's question was actually answered.
  • Human review keeps the judge honest. Read a sample of verdicts, especially the ones that pass. Builder and above include a human review queue.

In PRISM's evaluators, deterministic rules run on 100% of sessions. The LLM judge scores every incoming trace until the plan's daily allowance runs out (on Free, 100 a day). After that, only the deterministic rules run. Core scores are on Free; custom evaluators and the Evaluators Hub need Builder or above.

Step 4: Build a test set from real failures and simulated users

Mix real failures you've seen with simulated users for cases you haven't encountered yet. Each type catches different problems: past failures catch regressions; simulated users catch gaps.

For real failures, save the input and the completion criterion it broke. Rerun these whenever you change a prompt, a tool or a model.

For cases you haven't seen, simulate them. The situations worth covering are changing intent, missing details, tool problems and out-of-knowledge questions.

Synthetic Scenarios does this in PRISM. You describe the app, and PRISM writes simulated users from the app description and the Knowledge Base: 7 app-specific types plus 3 that try to break it. It judges whether each simulated user got what they came for, and a failing scenario becomes a regression test.

Step 5: Group failures, fix the top pattern, and re-check

Group repeated failures into patterns, fix the one that affects the most sessions, then compare pass rates before and after the change. One passing run proves little.

Individual failed runs are noisy. PRISM groups repeated failures into patterns and shows how many sessions share each one, so you can start with the biggest. For the likely cause (prompt, missing source, retrieval, stale state, tool choice and so on), see AI Remediation. It suggests changes and builds a backlog. A person still reviews and approves each change.

After a fix is merged, PRISM compares pass rates for the 7 days before and the 7 days after the merge. A before-and-after window covers the variety of real traffic. One rerun of the case you fixed doesn't.

How this looks in production

In PRISM, every score links back to evidence. Each verdict points to the rule, the span, the source checked and the reason. When a check fails, you see which rule failed, on which span, and why, not just a pass or fail count.

What runs on which traces:

  • Deterministic rules run on 100% of sessions, with no sampling.
  • The LLM judge scores every incoming trace until the plan's daily allowance runs out. After that only the deterministic rules run.
  • Automatic evaluation tasks run about hourly, so scores are not instant.
  • Content-free ingest, which drops prompt and response text from storage, gets no LLM-judge scores.

Sending a run to PRISM over the HTTP API takes one request per exchange. Example:

Example · text
curl -X POST https://api.prism.blockconvey.com/api/traces \
  -H "X-PRISMtrace-Key: pt-sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "your-project-id",
    "model": "your-model-name",
    "input_messages": [{"role": "user", "content": "<what the user asked>"}],
    "output_message": "<the reply your agent returned>",
    "latency_ms": 840
  }'

The key goes in the X-PRISMtrace-Key header; a Bearer token is rejected. project_id, model, input_messages, output_message and latency_ms are required.

To see how your own runs are tracked against the user's goal, send a few real traces to PRISM.

Common mistakes

  • Treating a successful response as a completed task. A 200 means the request went through, not that the answer was right. Fix: score the outcome against the goal you wrote in Step 1, not the status of the call.
  • Scoring only the final message in a multi-turn session. The goal may have been missed, or met, several turns earlier. Fix: group turns into one session with a shared session_id and judge the whole conversation.
  • Using only an LLM judge. A judge can be wrong, and it gives you nothing to debug when it is. Fix: put every check with one right answer in a deterministic rule, use the judge for the rest, and read a sample of verdicts yourself.
  • Declaring a fix worked from one passing run. One pass says little about real traffic. Fix: compare pass rates over a window before and after the change, such as the 7 days before and after the merge that PRISM compares.

How do I write completion criteria for my agent?

Start with the intents your agent handles. For each one, write what the user came for and the observable end state that proves it was done. Also write what counts as a correct refusal, so an agent that declines wrongly doesn't look the same as one that declines rightly. Step 1 above walks through this in detail.

What's the difference between deterministic rules and an LLM judge?

A deterministic rule gives the same verdict for the same input and uses no model. It's the right choice for checks with one correct answer, such as whether the required tool was called or the output format is valid. An LLM judge reads the exchange and decides whether the goal was met; use it for what rules can't express, such as whether the user's question was actually answered. PRISM runs both: deterministic rules on 100% of sessions, and the LLM judge on every incoming trace until the plan's daily allowance runs out.

Check task completion on your own runs

Connect your agent and see which runs finished the user's task and which only looked like they did.

Free to start, 100 credits each month.