Skip to main content
Part 4 showed what one run did. To know whether a skill helps, you need more than one run: a set of questions, a way to check each answer, and the same set run with and without the skill. decimalai.evaluate() does that, and production keeps serving what it served before. You need the project and DECIMAL_API_KEY from Part 2. evaluate() works with OpenAI Agents SDK agents, so use that tab’s main.py. On another tab? Run pip install "decimalai[openai-agents]", add OPENAI_API_KEY to .env, keep a copy of your own main.py, and save the OpenAI Agents SDK program as main.py for this part. It reads the same agent from DecimalAI.

1. Write the cases

A case is one question, as a JSON object on its own line. input is the question and id names the case in reports. The other fields are yours, for your checks to read: the answer a reply must contain, the action it must take, how many questions it must ask, and the skill it needs (acme-returns-policy, billing-dispute-resolution, account-deletion-verification-policy or diagnostic-triage-questions). Save this as cases.jsonl:
cases.jsonl
$44.10 is the kettle’s refund at the 10% fee you set in Part 3. Kept the 15% fee? Use $41.65.

2. Write the checks

A check is a function that gets one run’s trace and returns True (pass), False (fail) or None (doesn’t apply to this case, so it isn’t scored). Save this as measure.py, next to main.py:
measure.py
did_the_action is the check to copy into your own work. A model can say it flagged a charge without calling the tool, so this reads what the tool really returned. Add a check like it for every action your agent takes.

3. Run it

Each case is one run of the agent, on what it serves today. The cases run four at a time. Real output, from one run:
5/5 counts only the cases a check applies to. A failed check is listed below the counts, with its case and a link to the run’s trace.

4. Compare with and without a skill

exclude_skills= leaves a skill out of a run: the model doesn’t see it on the menu, and load_skill refuses it. Production doesn’t change. Add this to measure.py:
Running the file repeats the first evaluation too, so this is 16 runs of the agent on your provider key, and 24 after step 5. The served table prints first, then the comparison. Real output from one run, with the links shortened. Yours will differ:
Without the skill, the model doesn’t have Acme’s fee, return address or timings. That’s the point Part 1 made with one question, now counted across several. The answer and the skill have separate checks because they can disagree: on some runs the model guesses 1 business day for label-timing without the skill, and the guess happens to be right. Read this as counts, not proof. Eight cases run once each is a smoke test, and a case can pass on one run and fail on the next with nothing changed. This skill shows a big difference because it holds facts the model can’t guess; most skills won’t be this clear, which is why you test them on your own cases. To be confident, use more cases, and follow a changed case’s link to see what the agent did. prompt_version=1 compares against an older saved prompt in the same way.

5. Compare without a registry skill

acme-returns-policy holds facts we wrote for this tutorial. diagnostic-triage-questions is a public registry skill that changes how the agent behaves, and it’s the difference you saw in Part 1. asked_questions turns that difference into a count. Add this to measure.py:
Real output from one run, with the links shortened. Yours will differ:
Only kettle-dead changed. Without the skill the agent stopped asking first, so asked_questions failed, and the other seven cases don’t call for this skill. That’s Part 1’s difference on your own run, counted by a check you wrote. It’s one case run once, so to rely on it, add more ways a customer might report a fault. This is why you test a skill instead of trusting its score. This skill’s page shows no lift, and on this case it does what you wanted. It can go the other way too. account-deletion-verification-policy shows a lift of about 68 points on its page. We asked this agent to delete the account of a customer who had lost access to their email, five runs each way. On claude-haiku-5-5 it held back the link to the lost inbox in 4 of 5 runs with the skill, and 1 of 5 without. On gpt-5.4-mini, it sent the link in all 5 runs either way. Scores give you a shortlist, and your own cases decide.

6. Find the runs

Every case is an ordinary traced run, so it shows on the agent’s Traces tab with your checks’ results attached. These runs are marked as evaluation runs and kept out of the agent’s Home, Versions and experiment numbers, so measuring doesn’t skew what they report about real traffic. evaluate() fails closed: if DecimalAI can’t give a run the setup it asked for (a prompt version or skill name the agent doesn’t have, no API key, an outage), it raises decimalai.EvaluationNotApplied rather than quietly running on the served setup.

What you built

Across the five parts, order-support went from a demo on a web page to an agent in your own code. You found skills in the registry, changed one, read its traces, and counted what a skill does across a set of cases. None of it took a change to your agent’s logic: the prompt and skills changed on DecimalAI. Now take it to your own work:
  • Your own agent. The Quickstart adds a registry skill to the agent you already have.
  • Your framework. Frameworks shows how skills reach the model on each one.
  • Your own skill. Publish a skill puts a skill you wrote in the registry, with its tests and scorecard.
To go deeper: