How do you evaluate an agent, beyond checking its final answer?
Evals · Pro 1
Short answer
Build tasks with clear success criteria and check outcomes, ideally in a realistic environment. Also check the trajectory: did it use the right tools with valid arguments, how many steps and tokens it took, whether it asked for approval where required, and whether it avoided forbidden actions. Run each task several times and track the pass rate.
Deeper answer
Outcome checks can be code (the ticket was updated, the test suite passes) or model graders with rubrics. Trajectory checks catch agents that succeed by luck or by unsafe means.
Keep a regression set of tasks that once failed. Report cost and latency alongside success, because an agent that succeeds at ten times the cost may not be shippable. Anthropic's guide on evals for agents and DeepLearning.AI's course on evaluating agents cover this in depth.
What a strong answer covers
- Tasks with clear success criteria
- Checks the path: tools, arguments, steps
- Tracks cost, tokens and latency
- Checks safety: approvals, forbidden actions
- Repeated runs and pass rate
Answer it out loud in the mock interview about 1.5 min
Follow-ups to expect
- Why run each task several times?
- How would you grade a task with no single right answer?
Common mistakes
- Only checking final answers
- Running each task once
Learn it
- What is benchmark contamination, and how can you detect or avoid it?
- How would you evaluate an LLM application?
- How do you evaluate a RAG system?
- How would you build a test set for an LLM feature when you have no labelled data?
- What are the pros and cons of using an LLM as a judge?
- A new model has just topped a public leaderboard. Your manager wants to switch. What do you do?
- What is the difference between pointwise and pairwise evaluation, and when would you use each?
- How do you stop a prompt or model change from breaking things that used to work?
- How would you evaluate an LLM feature whose answers are open-ended text?