Skip to main content

You need an eval suite for an agent that books and cancels appointments in a real clinic system. How do you build the test environment so that runs are safe and repeatable?

Agents and tools · Pro 2

Short answer

Run the agent against a sandbox copy of the system with seeded, fictional data, and reset it before every run. Keep the tool interfaces identical to production. Judge each task by the final state in the database, not by the agent's words. Use a scripted or simulated patient for multi-turn tasks, and run each task several times.

Deeper answer

Agent evals are hard to repeat because the agent changes the world. If run one books the 10 am slot, run two sees a different calendar. So the first requirement is a known starting state: a test instance or a faithful fake, loaded from a fixture and reset each time. The tools should be the same code as production and point at the test backend. Otherwise you are testing a different agent.

Grading should look at outcomes. After the task, a script checks the database: one appointment exists for this patient, with the right doctor and time, and nothing else changed. That catches an agent that says it booked but did not, and one that booked twice. For conversations, a simulated user with a fixed persona and goal plays the patient. Include tasks where the right outcome is no action, such as a request to see another patient's booking. Interviewers listen for reset, end-state checks, side-effect checks, and repeated trials, because one pass proves little.

What a strong answer covers

Answer it out loud in the mock interview about 2.5 min

Follow-ups to expect

Common mistakes

Learn it

Evaluating agents

Practice Agents and tools questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.