Why AI Evals? The Framework, the Scope and the Team
Building an AI feature is the easy part. Knowing whether it is good enough to put in front of real users, and proving that to your manager, your client or a regulator, is the hard part. That proof is what AI evaluations (or simply evals) give you.
This chapter answers three questions: what an eval is, why you can't skip it (and why buying a tool or trusting a leaderboard isn't enough), and how a real team plans, scopes and staffs an evals project. You need no maths background. If you know a little Python and have called an LLM API once, you are ready.
By the end of this chapter you will be able toโฆ
- Define an AI eval in one sentence
- Explain why leaderboard scores don't predict your product's quality
- Calculate how failure risk grows in multi-agent systems
- Explain why evals are often a legal and sales requirement
- Spot the hidden traps in "just buy an eval tool"
- Draw the full evals lifecycle, before and after launch
- Scope an evals project: problem, baseline, metric, pass/fail
- Name the roles on an evals team and what each one owns
gpt-6.1-terra (fast and balanced; we use it as the product being tested), gpt-6-luna (the cheapest and fastest; we use it as the judge), gpt-6-astra (the most capable, used sparingly) and text-embedding-3-small for embeddings. Every example shows the output you would see, so you can follow along just by reading. Model names change every few months; the ideas in this series do not.Setup (once): pip install openai pydantic numpy, then set your key: export OPENAI_API_KEY="sk-..." (Mac/Linux) or setx OPENAI_API_KEY "sk-..." (Windows). Nothing else is needed.
Three GPT-6 rules every example in this series follows (break them and the API returns an error):
- Temperature needs reasoning switched off. GPT-6 models "think" before answering by default, and while they do,
temperatureis not allowed. So whenever we want repeatable answers we writereasoning_effort="none", temperature=0. This works ongpt-6.1-terraandgpt-6-luna.gpt-6-astraalways reasons, so we never passtemperatureto it. - Tool calling on Terra uses the Responses API. When the model must call a function (e.g. "escalate to a human"), we use
client.responses.create(..., tools=...)instead ofclient.chat.completions.create. (Luna can call tools in Chat Completions only withreasoning_effort="none".) - JSON replies use Structured Outputs. We describe the reply's shape as a small Pydantic class (e.g.
class Verdict(BaseModel): reason: str; verdict: Literal["PASS","FAIL"]) and callclient.chat.completions.parse(..., response_format=Verdict). The answer comes back already parsed in.choices[0].message.parsed: nojson.loads, no broken JSON.
Which examples run as-is? Any example whose data is written inside the snippet (questions, replies, scores) runs with just your key. Examples that call doubtbot, bank_bot or read files such as golden_v3.jsonl stand for your own product and data: read them to learn the pattern, or plug in your own. Real model outputs will be worded differently from the sample outputs shown; the meaning should match.
๐ Starter kit: 12 words you will hear in every chapter
1. LLM
A Large Language Model (GPT, Claude, Gemini, Llama) that reads and writes text. It is probabilistic: the same question can get different answers.2. AI product
The full thing users touch: the LLM plus your prompt, your data, your tools and your code. Evals test the product, not just the LLM.3. Eval
A repeatable test that measures how well your AI product does a job, against criteria you defined in advance.4. Test case
One input (a question, a conversation, a task) plus what a good output should look like.5. Test set
A collection of test cases. Like a question paper.6. Rubric
The marking scheme: rules that say what counts as a good, average or bad answer.7. Metric
A number that summarises results, e.g. "accuracy 87%" or "safety violations 0.4%".8. LLM-as-a-judge
Using one LLM to grade another LLM's answers with a rubric. Fast and cheap, but it has its own biases.9. Trace
A step-by-step record of everything the product did for one request: the prompt, the documents it fetched, the tools it called, the final answer.10. SME
Subject Matter Expert: a domain expert (a doctor, a lawyer, a senior teacher) who knows what "good" looks like.11. PRD
Product Requirements Document: the written plan of what a product must do. A good PRD is the starting point of every eval plan.12. Guardrail
A rule about what the product must never do (leak personal data, give unsafe advice, do a student's homework).๐ค Meet DoubtBot: our running example for the whole series
Ideas stick better with one concrete product. Throughout these notes we will evaluate the same AI product, chapter after chapter, from the first rough test to monitoring it after launch.
๐ The product
DoubtBot is an AI teaching assistant for a 12-week Data Structures & Algorithms (DSA) course in Python. Students ask doubts any time of day. DoubtBot answers using the course notes and lecture transcripts (this is RAG: it fetches relevant notes and gives them to the LLM). It guides students step by step with hints instead of handing over full solutions, and it hands the conversation to a human TA when it is unsure, when a question is outside the course, or when a student seems to be in distress.๐งพ The facts we will use
- Users: 1,000 students per batch
- Today (the baseline): 4 human TAs, about 1 TA per 250 students; a doubt waits around 6 hours for a reply
- Built with:
gpt-6.1-terra+ a vector database of course notes - Business goal: answer most doubts instantly and free TAs for the hard ones
- Key metric: the share of doubts DoubtBot resolves without escalating to a TA
low when arr[mid] < targetโฆ"Chapter 1 ยท Why AI Evals?What evals are ยท why leaderboards and tools are not enough ยท the lifecycle ยท scope ยท the team
1.1 What is an AI eval?
Before asking "how do we test an AI?", ask a simpler question: how do we test a human? With exams. Think of your Class 12 board exams.
- There are several subjects (Physics, Chemistry, Maths).
- Each subject has a question paper with many questions.
- Each answer is marked using a marking scheme.
- Marks are added up per subject, so you get one score per subject, not one score for "being smart".
AI evals work exactly the same way. Here is the mapping, using DoubtBot:
| Board exam | AI eval | DoubtBot example |
|---|---|---|
| Subject | A capability or risk we care about | "Explains concepts correctly", "Never gives full homework solutions" |
| Question paper | Test set | 60 real student doubts about recursion |
| One question | Test case | "Why does my recursive Fibonacci take forever for n = 50?" |
| Marking scheme | Rubric (the "defined criteria") | "Full marks if it names repeated sub-problems and suggests memoisation" |
| Marks in one subject | Metric (an aggregated score) | "Concept accuracy on recursion: 88%" |
| Examiner | Evaluator: a human expert, a rule in code, or an LLM judge | A senior TA, a regex check, or gpt-6-luna |
Three words in that definition do the heavy lifting:
Systematic
Not "I tried five questions and it looked fine". The same test set, the same rubric, run the same way every time, so you can compare version 1 with version 2.Defined criteria
You decide before testing what counts as success. Otherwise everyone grades by gut feeling, and gut feelings disagree.Represents real usage
The test set must look like what real users actually ask, not what the engineer finds easy to type.Why "it looked fine when I tried it" is not an eval
โ The vibe check
An engineer types a few questions, reads the answers, says "looks good ๐". Different person, different questions, different verdict. Nothing is written down. When the prompt changes next week, nobody knows if things got better or worse.โ An eval
A fixed set of 200 real student doubts, a written rubric, the same evaluator every time, and a number per metric. Change the prompt, re-run, compare: "concept accuracy went from 84% to 91%, but hint-only behaviour dropped from 97% to 89%". Now you can make a decision.๐ Your first eval in code
Let's make the exam idea real. Below, DoubtBot faces three tiny "subjects" (test sets). For each test case we check something simple and objective: does the answer mention the idea it must mention? Then we add up a score per subject.
from openai import OpenAI
client = OpenAI() # reads OPENAI_API_KEY from the environment
SYSTEM = "You are DoubtBot, a DSA teaching assistant. Explain briefly. Give hints, not full solutions."
# Each test set = one "subject". Each test case = question + a word a correct answer must contain.
TEST_SETS = {
"recursion": [
{"q": "Why is recursive fibonacci(50) so slow?", "must": "memo"},
{"q": "What is a base case?", "must": "stop"}],
"binary_search": [
{"q": "Binary search needs the array to be what?", "must": "sorted"},
{"q": "Time complexity of binary search?", "must": "log"}],
"heaps": [
{"q": "In a min-heap, where is the smallest element?", "must": "root"},
{"q": "Cost of pushing into a heap of n items?", "must": "log"}],
}
def ask_doubtbot(question):
r = client.chat.completions.create(
model="gpt-6.1-terra", reasoning_effort="none", temperature=0,
messages=[{"role": "system", "content": SYSTEM},
{"role": "user", "content": question}])
return r.choices[0].message.content
for subject, cases in TEST_SETS.items():
passed = 0
for case in cases:
answer = ask_doubtbot(case["q"])
ok = case["must"] in answer.lower() # the "marking scheme"
passed += ok
print(f"{subject:14} {passed}/{len(cases)} = {passed/len(cases):.0%}")
Output:
recursion 2/2 = 100%
binary_search 2/2 = 100%
heaps 1/2 = 50%
How this code works, line by line:
TEST_SETSis our question paper: three subjects, two questions each, and for each question one keyword a correct answer must contain.ask_doubtbot()sends one question to the product (system prompt + question) and returns its answer.reasoning_effort="none"switches off the model's hidden "thinking" step (GPT-6 models only accept atemperaturesetting when it is off), andtemperature=0then keeps answers as repeatable as possible.- The loop goes subject by subject. For every question it gets DoubtBot's answer and checks if the keyword appears (
okisTrueorFalse; in Python,Truecounts as 1 when added). - Finally it prints one score per subject, exactly like a marksheet.
Reading the result: recursion and binary search look fine; heaps need attention. When we looked at the failing answer, DoubtBot said "pushing into a heap takes O(n)", which is wrong (it is O(log n)). One number per subject told us where to look.
๐ฎ Try it: run DoubtBot's "board exam"
Press the button to run each test case one by one. Watch how individual โ and โ results are rolled up into one score per subject (a metric).
1.2 Why leaderboards and benchmarks are not enough
The hardest step in any evals project is often the very first one: convincing your stakeholders it is needed. A manager will often say: "Why spend time on evals? This model is number one on the leaderboard." This section and the next three give you the arguments for that conversation. Let's start with leaderboards.
A benchmark is a public, fixed test set (for example a set of coding problems or exam questions). A leaderboard ranks models by their benchmark scores. They are useful for a rough first shortlist. They are dangerous as proof that your product works, for three reasons:
1. Leaderboards disagree
Different leaderboards, and even the same benchmark run by different people, can rank the same models in a different order. Model makers tend to publish the comparison where their newest model wins. Small choices (prompt wording, number of attempts allowed, which subset of questions) can flip the ranking.2. The paper may have leaked
Popular benchmarks are on the public internet, and LLMs are trained on the public internet. A model may have memorised the questions and answers. This is called benchmark contamination. A high score then measures memory, not ability.3. It's not your exam
A benchmark of competitive programming problems tells you little about whether DoubtBot explains your course's heap lecture correctly, in the right tone, without giving away homework answers.๐ Leaked question papers: how to spot contamination
Here is a simple, practical test. Take a benchmark question that cannot be answered without some piece of information (an image, a table, the answer options) and give the model the question without that piece. A human expert would say "I can't answer without the image." If the model still produces the exact correct answer, it has most likely seen that question during training.
Another easy probe: give the model only the first half of a well-known benchmark question and ask it to continue. If it completes the rest word for word, the question was in its training data.
half = "A farmer has 17 sheep. All but 9 run away. How many" # first half of a famous puzzle item
r = client.chat.completions.create(
model="gpt-6.1-terra", reasoning_effort="none", temperature=0,
messages=[{"role": "user", "content":
"Continue this text exactly as it appears in its original source:\n" + half}])
print(r.choices[0].message.content)
Output:
sheep does the farmer have left? Answer: 9
The model reproduced the rest of the item and its answer. For your own product this is a reminder: never use a famous public test set as your only proof of quality. Your own test set, built from your own users' questions, has never been on the internet.
1.3 An AI product is not the same as an AI model
Even a perfect, uncontaminated leaderboard ranks models. Your users never touch a bare model. They touch your product: the model wrapped in your system prompt, your data, your retrieval, your tools and your code. A great model inside a badly built product still gives bad answers.
๐ช The complexity ladder: every step adds new ways to fail
Even step โ is fragile. A small change in the system prompt can move several metrics at once. Here is what happened when we tried three versions of DoubtBot's system prompt on the same 200 test doubts (illustrative numbers):
| System prompt version | Concept accuracy | Gave a full solution (bad) | Refused a valid doubt (bad) | Avg. answer length |
|---|---|---|---|---|
| A. "You are a helpful DSA tutor." | 91% | 23% | 1% | 310 tokens |
| B. A + "Never give full code solutions. Give hints only." | 88% | 4% | 11% | 140 tokens |
| C. B + "If the doubt is a concept question, explain fully; hold back only for graded assignments." | 90% | 5% | 2% | 190 tokens |
Version A is the "smartest" but hands out homework answers. Version B fixes that but starts refusing honest concept questions. Version C balances both. Without evals you would never see these trade-offs; you'd just see "it seems fine".
PROMPTS = {
"A": "You are a helpful DSA tutor.",
"B": "You are a helpful DSA tutor. Never give full code solutions. Give hints only.",
}
doubts = load_test_doubts() # 200 real student doubts, each tagged "concept" or "assignment"
for name, system in PROMPTS.items():
full_solutions = 0
for d in doubts:
answer = client.chat.completions.create(model="gpt-6.1-terra", reasoning_effort="none", temperature=0,
messages=[{"role": "system", "content": system},
{"role": "user", "content": d["text"]}]).choices[0].message.content
if d["type"] == "assignment" and "def " in answer: # crude check: did it write a full function?
full_solutions += 1
print(name, "full solutions given:", full_solutions)
Output:
A full solutions given: 46
B full solutions given: 8
One sentence in the prompt changed a safety-critical behaviour almost six-fold. A model leaderboard can't show you this, because it is a property of your product.
๐งฎ Agent maths: why multi-agent systems fail more often than you think
Say you build a pipeline of 10 agents, and each one fails only 1% of the time. Sounds safe. What is the chance that at least one of them fails on a given request?
The trick: it is easier to calculate the chance that nothing fails, then subtract from 1.
- Chance one agent works: 1 โ 0.01 = 0.99
- Chance all 10 work (assuming they are independent): 0.99 ร 0.99 ร โฆ ten times = 0.9910 โ 0.904
- Chance at least one fails: 1 โ 0.904 = 0.096, almost 10%
Would you ship a product where 1 in 10 requests breaks? And this is the optimistic case. Real agents depend on each other: one agent's bad output becomes the next agent's input, so errors snowball and the true failure rate is usually higher.
๐ฎ Try it: how risk grows with more agents
Move the sliders. Notice how even tiny per-agent failure rates add up.
1.4 Rules, laws and proof: evals are often not optional
So far the reasons were technical. There is a second, very practical reason: regulators and customers increasingly ask for evidence. New AI-specific laws are still catching up, but many existing laws already apply to AI products.
| Rule | Where / who | What it means for an AI product |
|---|---|---|
| DPDP Act, 2023 | India: any product handling personal data of people in India | Personal data must be collected with consent, used only for the stated purpose and protected. A bot that leaks one student's marks to another is a violation. |
| GDPR | EU residents' data, wherever your company is | Similar duties on personal data, plus rights around automated decisions. |
| EU AI Act | AI systems used in the EU | Risk-based rules. Systems used in education and hiring are treated as high-risk and need documented testing, accuracy and human oversight. |
| HIPAA / FERPA | US health data / US student records | Health and education bots must not expose protected records. |
| State AI laws | e.g. Colorado's AI Act, California's AI transparency rules | Duties around disclosure, discrimination and transparency for certain AI uses. |
Even if you are not regulated, your customers will ask. Enterprise buyers and government procurement teams now routinely ask vendors: "How did you evaluate this? Show us the results." If you sell AI to other businesses (as many Indian IT services firms now do), an evals report is becoming part of the sales process, just like a security audit.
Who needs evals, and why
- Startup: "move fast" is fine until a big customer asks for proof
- Enterprise team: to win internal buy-in and budget
- Buyer of an AI tool: to test vendors' marketing claims before signing
- Your career: evals skills are in high demand for AI engineer, FDE and PM roles
โ ๏ธ "Ship and pray" only works when the stakes are low
A meme generator can afford to be wrong. A bot that advises students, patients, borrowers or employees cannot. The more regulated your industry, the less optional evals become.1.5 "Can't we just buy an eval tool?"
Once your manager agrees evals are needed, the next question is usually: "There are many eval tools on the market. Why not just buy one? Why reinvent the wheel?" It is a fair question. Model providers and many startups now sell evaluation platforms, often with impressive customer stories ("we cut evaluation time by 40%"). Tools genuinely help. But buying a tool does not do the thinking for you. Here is why.
โ๏ธ Problem 1: AI judges have biases
Most eval tools are built around LLM-as-a-judge: one model grades another. That judge is itself an LLM, with LLM habits:
๐จโ๐ฉโ๐ง Self-preference ("nepotism")
Research has found that judges tend to prefer answers written by models from their own family (similar training, similar style). Ask an OpenAI judge to compare an OpenAI model with a Claude model, and the scores can lean towards OpenAI.โ๏ธ Position bias
When comparing two answers side by side, many judges prefer whichever one is shown first (or second), regardless of quality.๐ Length bias
Judges often give higher scores to longer answers, even when the short answer is better.Ask the judge to compare answer X and answer Y twice: once as (X, Y) and once as (Y, X). A fair judge should pick the same answer both times.
JUDGE = """Which answer explains the student's doubt better?
Doubt: {q}
Answer 1: {a1}
Answer 2: {a2}
Reply with only "1" or "2"."""
def judge(q, a1, a2):
r = client.chat.completions.create(model="gpt-6-luna", reasoning_effort="none", temperature=0,
messages=[{"role": "user", "content": JUDGE.format(q=q, a1=a1, a2=a2)}])
return r.choices[0].message.content.strip()
flips = 0
for q, x, y in comparison_pairs: # 100 doubts, each with two candidate answers
first = judge(q, x, y) # "1" means it chose x
second = judge(q, y, x) # "2" means it chose x
chose_x_both_times = (first == "1") == (second == "2")
flips += not chose_x_both_times
print(f"Judge changed its mind on {flips}/100 pairs just because the order changed")
Output:
Judge changed its mind on 17/100 pairs just because the order changed
17% of verdicts depended on order, not quality. A tool's dashboard would show you a confident number either way. Only a deliberate check like this reveals the problem. (Common fix: run both orders and count a win only when they agree.)
๐ค Problem 2: who judges the judge?
Some teams respond by training their own judge model. That just moves the question: how do you know the new judge is right? You still need humans. Human judgement is the anchor that defines what "good" means in the first place. If you remove humans from the loop entirely, the system slowly optimises for what the judge likes, which can drift away from what users need.
๐ฆ Problem 3: ready-made metrics don't know your product
Tools ship with generic metrics such as "hallucination score", "toxicity" and "helpfulness". They are convenient, but they don't decide whether your product succeeds. No generic metric knows that DoubtBot must give hints, not homework answers, or must escalate a distressed student to a human. Those are your product's rules, and you have to define and measure them yourself.
๐ค Problem 4: the trust gap
1.6 The evals lifecycle: before and after launch
Teams that do evals well follow a surprisingly similar workflow. It has two halves: pre-release (offline, before real users see it) and post-release (online, with real users).
Before launch: evals drive development
Each change (new prompt, new model, new chunking) is checked against the test sets before it ships, the same way test-driven development works in normal software. This is called evaluation-driven development. Evals also inform the final release decision.After launch: evals become diagnostics
The job isn't done at launch. You keep tracking eval metrics alongside product metrics (usage, escalations) and business metrics (TA hours saved, student satisfaction). Eval metrics now act as early-warning signals, so you catch problems before users complain.1.7 The one-page evals plan (go / no-go document)
A common failure pattern: teams rush to build and launch without ever writing down what the product should do and what success looks like. A short planning document fixes that. It acts as a checkpoint: before anyone says "ship it", these questions must have written answers. It has three parts that follow the lifecycle above.
- Problem and business need
- What's out of scope
- Baseline: what we do today without AI, and its key number
- Investment: budget, people, timeline
- Pass/fail rule for launch
- Team, experts and veto holders
- Quick hands-on check: top user journeys, show-stoppers, stop rules
- Metrics table: primary metric, guardrail metrics, supporting metrics, each with an owner, test set and threshold
- Experiment plan: control, method, sample size, hypothesis
- Launch readiness checklist and the final Go / Conditional Go / No-Go
- Leading indicators (early warnings) with targets, check frequency, owner and action
- Lagging indicators (real impact)
- Who looks at what, how often, and what they do when a number goes red
| Field | DoubtBot |
|---|---|
| Decision | โ Go โ Conditional Go โ No-Go ยท Owner: Product manager, Learning team ยท Decision date: before batch 14 starts |
| Executive summary | Students wait ~6 hours for TA replies; many give up. DoubtBot answers course doubts instantly with hints and hands hard or sensitive cases to TAs. Expected: faster help for students, TAs focus on difficult doubts. Risk of doing nothing: lower course completion as batches grow. |
| Out of scope | Grading assignments; career counselling; doubts from other courses |
| Baseline | Human TAs only. Median first reply 6 h. TAs spend ~70% of time on repeat concept doubts. |
| Primary metric & pass rule | Ship only if DoubtBot resolves โฅ 60% of doubts without escalation and all guardrails hold. |
| Guardrails (any failure = No-Go) | Zero leaks of another student's data; full-solution rate on graded assignments โค 2%; 100% of distress messages escalated to a human |
| Team | PM ยท ML engineer ยท Data/eval analyst ยท SMEs: 2 senior TAs + course instructor |
| Veto holders | Course instructor (teaching quality), Legal/Privacy (student data), Student-success head (well-being) |
Example default fail rules for the quick check
- Automatic fail if any privacy or safety violation can be reproduced.
- Fail if an error or slowness breaks a key user journey and there is no fallback.
- Fail if a large share of samples (for example one in five) shows the same type of defect: that's a pattern, not bad luck.
Why write it down?
It forces the hard conversations early ("Who decides 60% is enough?"), it gives veto holders a place to sign, and six months later it tells everyone why the product was launched. It is also exactly the document an enterprise client or auditor asks for.1.8 Scoping an evals project
Every evals project starts like any other project: define the scope. Start from the product, not from the metrics. Five questions:
Start from the PRD
A useful team exercise: take the product requirements document (PRD) and map it to the eval plan. A good PRD should tell you the key user scenarios, the guardrails and the release criteria. In practice, PRDs often miss some of these. Finding those gaps together, before testing starts, is part of the evals work.
| Problem | Goals | Roles |
|---|---|---|
| One TA for ~250 students, so replies are slow and uneven. Students need accurate, step-by-step help at the moment they are stuck (often at 11 pm before a deadline). | Access: available 24ร7 Quality: clear, step-by-step help that matches the course notes and the instructor's teaching style Workload: take routine doubts off TAs' plates |
PM (owner) SMEs: instructor, senior TAs Tech: data/eval, UX, engineering Veto holders: instructor, privacy/legal, student-success head |
Baseline: human TAs. Key metric: resolution rate without escalation (how often DoubtBot fully answers a doubt without needing a TA).
๐งฑ Scope = capabilities + constraints
Here is the mistake almost everyone makes: they define what the product should do and forget to define what it must not do.
โ What DoubtBot SHOULD do (capabilities)
- Explain DSA concepts accurately, at the student's level
- Help debug code with hints, step by step
- Adapt to the student's progress
- Escalate to a TA when unsure
โ What DoubtBot must NOT do (constraints)
- Knowledge boundary: answer questions from outside the course
- Academic integrity: write graded assignments for students
- Well-being: handle a distressed student alone; it must hand over to a human
- Privacy: reveal any student's marks, email or phone number
๐ฎ Try it: capability or constraint?
For each student message, decide what DoubtBot should do. Click an option to check your answer.
Business need ยท Baseline ยท What must not happen
Key players ยท SMEs ยท Veto holders
Key metric ยท Pass/fail gate ยท Timeline
1.9 Who does what: evals is a team sport
Many companies assume evals are the PM's job: the PM designs the tests, runs them and uses the results. For a small, simple bot that can work. For anything serious, evals need several roles working together. The PM can coordinate, but no single role can own it all.
๐ Bring subject matter experts in early
For a simple e-commerce or SaaS support bot, one person can sometimes run the evals: anyone can tell if "where is my order?" was answered correctly. But in many fields, a non-expert cannot tell a good answer from a subtly wrong one:
Is this dosage advice safe?
Does this hint teach, or give away the answer?
Is this clause interpretation or tax rule right?
Is the X-ray or chart read correctly?
1.10 Summary
- An eval is a systematic, repeatable test against criteria you defined in advance, using a test set that looks like real usage.
- Public leaderboards are for shortlisting models, not for proving your product works. They disagree and can be contaminated.
- Users experience the product (prompt + data + tools + model). Small changes to any part can move several metrics at once.
- Failure risk compounds: 10 agents at 1% each โ 10% of requests with at least one failure, and usually worse.
- Regulators and enterprise buyers increasingly ask for evidence. Evals are that evidence.
- Eval tools automate; they don't decide what to measure. LLM judges have biases and need a human anchor.
- Lifecycle: qualitative โ quantitative โ experiment (gated) โ deploy โ monitoring โ analytics.
- Write a one-page evals plan with a go/no-go rule, guardrails and veto holders.
- Scope = capabilities + constraints. Bring SMEs in from day one.
๐ Quick quiz (click to reveal the answer)
Q1. Map these to AI-eval terms: question paper, one question, marking scheme, marks per subject.
Question paper = test set. One question = test case. Marking scheme = rubric (the defined criteria). Marks per subject = a metric.Q2. Give three reasons a leaderboard rank doesn't prove your product is good.
(1) Leaderboards disagree with each other. (2) Benchmarks can be contaminated: the model may have memorised the questions. (3) They rank bare models on generic tasks, not your product with your prompt, data and constraints.Q3. How would you check if a model has memorised a benchmark question?
Remove something essential (the image, the options, the second half of the question) and see if the model still produces the exact answer, or ask it to continue the question text word for word.Q4. A pipeline has 5 agents, each failing 2% of the time, independently. Chance at least one fails?
1 โ 0.98โต โ 1 โ 0.904 = 0.096, about 9.6%. In real systems it's usually higher because agents depend on each other.Q5. Name two biases of LLM judges and one way to detect one of them.
Self-preference (favouring its own model family), position bias (favouring the first or second answer) and length bias (favouring longer answers). Detect position bias by running each comparison twice with the order swapped and counting how often the verdict flips.Q6. Why do experiments/pilots come after quantitative evals?
Pilots are the slowest and most expensive step (real users, weeks of data), so teams only run them once the product passes the qualitative and quantitative bar.Q7. What does "scope = capabilities + constraints" mean? Give a DoubtBot constraint.
You must define both what the product should do and what it must never do, and test both. DoubtBot constraints: don't answer outside the course, don't write graded assignments, always hand distressed students to a human, never reveal another student's data.Q8. Who are veto holders, and why list them on day one?
Stakeholders who can stop the launch (e.g. the instructor, legal/privacy, the student-success head). Listing them early means their concerns become eval criteria, instead of blocking the launch at the last minute.Q9. Why is "the PM owns evals" usually not enough?
Evals need user insight (UX), reproducible metrics and test sets (data), domain judgement (SMEs) and system fixes (engineering). The PM coordinates and owns the decision, but can't do all of it.Q10. What is evaluation-driven development?
Using evals before launch the way test-driven development uses unit tests: every change to the prompt, model, data or tools is checked against the test sets before it ships, and the results drive the next iteration and the release decision.๐ Glossary
| Term | Meaning in one line |
|---|---|
| AI eval | A systematic, repeatable test of an AI system against criteria defined in advance. |
| Test case / test set | One input with what a good output looks like / a collection of them. |
| Rubric | The marking scheme that defines good, average and bad answers. |
| Metric | A number that summarises eval results (e.g. accuracy 87%). |
| Benchmark / leaderboard | A public test set / a ranking of models by benchmark scores. |
| Contamination | When benchmark questions were in a model's training data, so it can answer from memory. |
| Vibe check | Informal "try a few questions and see"; useful, but not an eval. |
| LLM-as-a-judge | An LLM that grades another system's outputs using a rubric. |
| Self-preference / position / length bias | A judge favouring its own model family / an answer's position / longer answers. |
| Offline vs online evals | Tests before release on test sets / measurement in production with real users. |
| Evaluation-driven development | Using evals to guide every change before launch, like test-driven development. |
| Baseline | The current way of doing the job (often humans), which the AI is compared against. |
| Guardrail metric | A metric that must stay within limits for launch, whatever the primary metric says. |
| SME | Subject matter expert who defines and checks what "good" means in a domain. |
| Veto holder | A stakeholder who can stop the launch. |
| PRD | Product requirements document. |