Learn › Testing & Evaluating AI Agents and RAG › Define Success Criteria First

Define Success Criteria First

Intermediate 🕐 15 min Lesson 2 of 11
What you'll learn
  • Turn vague quality goals into specific, measurable criteria
  • Apply the specific, measurable, achievable, relevant checklist
  • Define multiple dimensions of success for RAG apps and agents
  • Separate hard gates from quality targets
  • Avoid proxy metrics and missing baselines

Start With What "Good" Means

The most common eval mistake happens before any code is written: nobody has said what success looks like. "The assistant should answer questions well" cannot be tested. Anthropic's documentation on building evaluations begins with defining success criteria for exactly this reason, and it recommends criteria that are specific, measurable, achievable, and relevant.

Specific and Measurable

The documentation gives a clear contrast. A weak criterion is "the model should classify sentiments well." A strong one names a metric, a threshold, a data set, and a baseline: for example an F1 score of at least 0.85 on a held-out test set, a 5% improvement over the current baseline. A safety criterion in the docs is phrased as a rate: less than 0.1% of outputs out of 10,000 trials flagged for toxicity. The same pattern works for RAG and agents:

Weak: "The support bot is accurate." Better: "On 100 real support questions, at least 90% of answers are supported by the retrieved help-center articles, and 0 answers invent a refund policy."

The numbers in that example are placeholders you choose, not industry benchmarks. For the achievable part, Anthropic's guidance is to base targets on prior experiments, industry benchmarks, AI research, or expert knowledge, and to revise them once you see real results.

Quantitative and Qualitative

Not every criterion is a percentage. The documentation lists quantitative metrics such as accuracy, precision, recall, F1, response time in milliseconds, and uptime. It also accepts well-defined qualitative scales, such as a Likert scale for tone or an expert-written rubric, when you cannot reduce the quality to a number. The key phrase is "well-defined": a scale is only useful if two graders would use it the same way.

Success Is Multidimensional

Anthropic's docs note that most use cases need evaluation along several criteria at once. Common dimensions include task fidelity, consistency, relevance and coherence, tone and style, privacy preservation, context utilization, latency, and price. The docs' own example combines an F1 target, a 99.5% non-toxic output rate, and a response-time target, and even notes that words like "inconvenience" and "egregious" in the error-severity criterion need definitions.

A worked criteria sheet for a RAG support assistant might look like this (illustrative targets):

  • Correctness — answer agrees with the reference answer; target 90% of tasks
  • Grounding — every claim is supported by retrieved text; target 95%
  • Abstention — says it does not know when the documents lack the answer; target 90% of unanswerable tasks
  • Privacy — never shows another customer's data; gate: zero failures
  • Latency — median under 4 seconds; target
  • Cost — average under a budget you set per answer; target

For an agent, add outcome criteria: was the record created, was the file changed, did the agent stay within its allowed tools and turn limit?

Gates Versus Targets

Write hard failures separately from quality scores. "Never reveal another customer's data" is not a score to be averaged; it is a gate, and one failure blocks release. Quality criteria such as tone are targets: you aim for a level and track trends. Mixing the two hides serious problems inside a healthy-looking average.

Common Mistakes

  • Proxy metrics. Measuring answer length because it is easy, when you care about correctness.
  • Too many criteria. Ten equal-weight scores nobody can act on. Start with five or six.
  • No baseline. A score of 82% means nothing until you know what the current system scores.
  • Optimizing one dimension. Accuracy gains that double your latency and cost are a trade-off, not a win.

Keep a Criteria Sheet

For each criterion record four fields: the dimension, how you will measure it, the target, and whether it is a gate or a target. This single page becomes the specification for the test set and graders you build next.

Try This

For one AI feature, write six criteria on a single page. Include at least one hard gate, at least one criterion about cost or latency, and at least one about what the system should refuse or say it does not know. Then show it to a teammate and ask: could two people grade the same output and reach the same verdict using only this page? If not, sharpen the wording until they could.

Key takeaways
  • If you cannot measure a criterion, you cannot improve it
  • Most real applications need several criteria at once
  • Targets should be grounded in evidence and revised with data
  • Hard safety failures are gates, not averages
  • Write the criteria sheet before the test set
Learn more every week Get 5 hand-picked prompts + new AI tools every Monday. Free.