The Exact Metrics I’m Using to Evaluate My Personal Decision Agent
In previous articles, I introduced What Do I Do?, a personal decision agent I’m building to explore how AI can help us make better decisions. The agent does not make decisions for you, rather it seeks to ask the right questions, uncover biases, fears, concerns, and assumptions that you might have, and then provide a recommendation which you can then choose to adopt as your final decision.
I have spent the last couple of months working on this agent and I was so excited to see it come to life. Unfortunately, that excitement got cut short when I started testing out the agent and noticed some ways the agent was struggling and not behaving as expected. I shared more about these agent failures and how I mitigated them in my September article.
Those initial test runs of the agent and analyzing the errors was a great first step in measuring the agent performance. Error analysis from adhoc runs generally gives you initial visibility into common errors that show up. You can spot patterns and note ways the agent might be struggling. Hamel Husain strongly encourages error analysis as the first and most important activity in AI evals and I agree with that argument. It gives a base idea of error categories and helps identify unique error patterns in your application specifically. However, there are only a few runs you can manually look through as a human. So to do a full E2E eval on the agent, you need to define a success criteria for the agent across set metrics, run batch tests and aggregate the results.
But what exactly are you testing for?
To not miss out on any new articles, consider subscribing.
You need to define a set of eval metrics, based on your specific use-case, agent’s expected behavior and features, that can generalize as the agent evolves, but is also specific enough that hillclimbing on any of these metrics results in clear improved agent performance.
In this article, I will also share some of the eval metrics I have defined for evaluating the What Do I Do? personal decision AI agent, with the reasons I selected the metric, how the metric is defined and measured.
Decision Agent Evaluation Plan: Metric Set
What Do I Do? is an agent with three main building blocks.
- The state object stores the current information extracted from the user. It could be the available options, their fears, assumptions, or any relevant context or evidence to support a recommendation.
- Clarification is the agent component that generates the right follow-up question to a user, one that maximizes information gain and reduces uncertainty
- Then the final recommendation is provided to the user to conclude the decision dilemma.
I split the eval metric set into the three main components, with the metrics measuring agent quality and behavior isolated to that component.
State object metrics
- Fact and option extraction precision/recall: This measures how many times the agent completely and correctly extracts the right facts and options from the user’s responses. Precision, in this case, tracks how many of the options the agent extracted that were correct and recall measures how many options or values the agent was able to extract out of all the relevant options or values the user had that was revealed by that turn.
- Contradiction rates: Measures how often the agent updates with a state that directly conflicts with the information given by the user.
- Evidence coverage: The evidence coverage is tried to explainability. How often can the state update be directly traced to the user’s message? I’ll measure both traceability (whether evidence is attached) and support (whether that evidence actually justifies the claim).
- Duplicate-option detection precision/recall: Sometimes a user might share the same information in a different manner. This metric measures how many times the agent was able to correctly and completely identify and group repeated choices or attributes from the user’s messages.
Clarification metrics
- Question-answer, skip, and repetition rates: If a user responds to a clarifying question from the agent in a clear manner, sometimes the agent is still not able to process their response, thus, repeating the clarifying question or worse case ignoring the user’s response. This metric measures how many times the skip or repetition in generating clarifying questions occurs.
- High-impact uncertainty reduction: Measures how well the agent is able to generate the next clarifying question maximizing information gain and addressing the highest uncertainties. High-impact uncertainty, in this case, is uncertainty that could materially affect the recommendation.
- User correction and rejection rates: This measures how many times the user corrected the agent or rejected a follow-up question because the agent got it wrong.
- Turns to readiness: Tracks how many clarifying questions the agent needed to obtain sufficient information to make a final recommendation.
- Premature readiness: This metric measures the number of times the user did not feel ready for a final recommendation whereas the agent felt it has sufficient information to make a final recommendation. I also track how many more questions did the agent have to ask the user after it had initially believed it was ready to give a recommendation?
- User effort and satisfaction: This is a semantic metric to measure how satisfied or frustrated a user gets with the clarifying questions asked by the agent.
- Safety violations by decision domain: A very important part of Responsible AI (RAI) and agentic systems is guardrails. Although the agent can ask a lot of clarifying questions to extract options, assumptions, there should be restraint in how far the agent is allowed to probe, and this metric tracks any violations on this. For this metric, the prohibited behaviors and severity levels for each have to be defined by the Safety/RAI team with examples to detect violations by the agent.
To not miss out on any new articles, consider subscribing.
Recommendation metrics
- Hard-constraint compliance: If a user shares a hard constraint relating to a decision, the agent should uphold this constraint. This metric measures how well the agent’s recommendation adheres to any hard constraints the user has. The agent should acknowledge a user’s hard constraint, and not violate it.
- Alignment with confirmed values: Similar to the prior point, if there are any confirmed values stated or extracted by the user, this measures how well the agent’s recommendation aligns with these values. A user can have multiple values and it might be impossible to optimize for maximizing all values; in such cases, the agent should prioritize, identify tradeoffs, and justify compromises.
- Unsupported claims: Measures unsupported user-specific claims, unverified external claims, and explicit assumptions stated as facts made by the agent.
- Robustness-label agreement with human reviewers: This metric measures how much the agent’s recommendation’s robustness or confidence aligns with the human reviewer’s belief. This acts as a sanity check to ensure the agent is not overconfident and overpromising.
- Sensitivity-driver plausibility and flip accuracy: This measures how accurate or sensitive the major values the agent based the recommendation on is. Such that, if that value changes to an opposite value, will it change the recommendation? Sensitivity-driver plausibility investigates if the factors the agent identifies as “most influential” make logical domain sense to a human expert. Flip accuracy, on the other hand, measures the correctness of an agent’s predicted decision flip. If the agent claims that changing Factor X by Y amount will flip the final decision, does applying that exact change actually result in the expected outcome in reality?
Conclusion
This is the first article in my mini-series on building an eval system for my personal decision agent. In this piece, we explored the qualitative metrics for measuring the performance of the agent, across the agent’s decision state object, clarifications, and the final recommendation given by the agent.
In my next article, I’ll share more quantitative, usage, and business metrics I am also measuring the agent performance by, to ensure a well-rounded agent that performs excellently.
The goal is to put a lot of thought into evals, measure performance wholly and apply Data Science in AI and agentic projects. I hope that by sharing these, other data scientists and engineers can learn alongside me.
If you’re interested in AI evals, Data Science, AI systems and agentic engineering, I hope you follow along. Feel free to drop a comment with your thoughts, questions, feedback, or any suggestions you might have.
Thank you for reading.
Aniekan
To not miss out on any new articles, consider subscribing.
Also published on my Substack.
