CaseAdvancedEval-Driven Specification / Writing an eval spec / #14

Describe the sampling strategy for building an eval set from production traffic.

The direct answer
Pull a fixed minimum number of examples from every known content category, not a random sample sized by how much traffic each category actually gets. Double that floor for the categories where a bad output is a legal or brand risk, like health claims or alcohol, so those examples actually show up in the eval set instead of drowning in the categories that just post more. Size the total against how long a person can really sit and review it, not against what sounds thorough.
Do this, in order
  1. Pull a fixed number from every category, not a random sample weighted by traffic.Why: a random pull gives you almost nothing from a category that's one percent of your traffic, even when that one percent is the one that can get a client sued.
  2. Set a real floor per category, big enough to catch a real pattern, not just "a few examples."Why: three or four examples can't tell a one-in-ten failure rate from noise; you need enough for the pattern to show itself.
  3. Double the floor for categories where a miss is a legal or brand risk, not just an off note.Why: a caption that guesses wrong about a lunch special is a shrug; a caption that makes an unproven health claim is a lawsuit sitting on a client's desk.
  4. Size the total against how long a person can actually read it, in one sitting or one week.Why: a number that sounds rigorous but nobody can review before the next release isn't a real eval set, it's a slide.
  5. Know whether the category count or the per-category floor is doing the heavy lifting in your total.Why: cut the wrong one and you either blow the review budget or thin out the exact categories you added the floor to protect.
  6. Re-check the category list whenever a new kind of post shows real volume in production.Why: a taxonomy that stops updating quietly turns back into the same blind spot you just fixed.

How to answer this, stage by stage

Nobody is grading whether you land on exactly 640. They're grading whether the floor per category is big enough to mean something, whether the risky categories get more than an equal share, and whether the total survives a real review day. Eight moves get you there.

1
Scope it to one real pull, before naming a number
Say it like this
"Before I give you a sample size, let's agree what we're pulling from. Say we've got Hashloom, a tool that reads a photo and a business's notes and writes the caption and hashtags for a social post. Every post it generates gets logged. I'd build the eval set from a real week of that traffic, not a hand-picked set of nice examples."
Why this works
Grounds the sample size in something real instead of a number pulled from thin air.
2
Reframe the question, say what it's actually testing
Say it like this
"This isn't really 'how many examples do I need.' It's 'which categories am I willing to know nothing about.' A flat random pull answers that question by accident, based on whichever categories happen to post the most. I'd rather answer it on purpose."
Why this works
Shows the interviewer you see the real risk before you jump to arithmetic.
3
Say the equation out loud
Say it like this
"The sample size is the number of categories, times a minimum per category, plus extra for the categories we already know carry more risk. Not one round number picked because it sounds thorough."
Why this works
Shows the build-up before a single figure lands, so what follows reads as arithmetic, not a guess.
4
Own the numbers for one real taxonomy
Say it like this
"Hashloom already tags every post with a category when it's generated, fourteen of them: food, fashion, fitness, beauty, real estate, and so on. I'd set a floor of forty examples per category, since under forty you can't tell a real problem from noise. Fourteen times forty is five hundred and sixty."
Why this works
Turns a vague "enough examples" into a number a reviewer can check against a real taxonomy.
5
Split the floor by what a miss actually costs
Say it like this
"Two of those fourteen categories aren't like the rest: health and wellness claims, and alcohol and age-restricted products. A bad caption in fashion is a shrug. A bad caption in health claims can say something false about someone's body, and that becomes a client's legal problem before it's ours. I'd double the floor for those two, to eighty each. That's five hundred and sixty plus another eighty, six hundred and forty in total."
Why this works
This is the decision the whole answer turns on. A flat floor treats every category's risk as equal, and it isn't.
6
Stretch the range to however many categories the real taxonomy has
Say it like this
"That total moves a lot depending on how fine the category list is. Eight broad categories at a flat forty gets you three hundred and twenty. Split by category and by platform too, fourteen categories across four platforms, and you're past two thousand. I'd start at fourteen categories, no platform split, and only add platform as its own axis where the model's behavior actually seems to change by platform."
Why this works
Shows the number isn't fixed, it's a real range with a stated reason for where you'd start.
7
Sanity check it against a real review day
Say it like this
"Six hundred and forty examples, at about ninety seconds each to check the caption, the hashtags, and whether anything sounds like an unproven claim, is sixteen hours. Two working days for one person, or one day split across two or three people. That's a review pass someone can actually finish before the next release."
Why this works
This is the step most estimates skip, and it's what turns a plausible number into one that survives a follow-up question.
8
Name which assumption moves it most, then close
Say it like this
"If I had to bet on what blows this number up or down, it's the category count, not the floor. Growing the taxonomy from fourteen to twenty categories adds about two hundred and forty examples. Raising the floor by five per category only adds about eighty. So: fourteen categories, forty each, doubled to eighty for health claims and alcohol, six hundred and forty total, sixteen hours to review, and the category list is the first thing I'd touch if the number needs to move."
Why this works
Answers the hardest follow-up directly and closes in one breath, the way a strong answer actually sounds.
If you remember one thing A sampling strategy is not one random pull sized to look thorough. It's a floor per category, doubled wherever a miss actually costs something, checked against how long a person can really spend reading the result.

Let's learn

What happens when a sample size sounds big, and the one category that matters most only shows up six times?

Hashloom looks at a photo and a business's own notes, and writes the caption and hashtags for a social post, so the business doesn't have to think of one.

Knowledge spark: what's a stratified sample? Instead of one big random scoop, you split the traffic into groups first, food posts, health posts, fitness posts, and so on. Then you pull a set number from every group, even the small ones. Nobody gets left out just because their group is rare.

Before the team built any real eval set, they tested Hashloom on about 40 examples someone had written by hand, roughly a day's work, mostly picked because they were interesting, not because they were common.

Now Hashloom logs every post it actually generates in production, thousands a day. Pulling from that felt like the fix: a random sample of 500 real posts, weighted by how much traffic each kind of post actually gets.

Five hundred sounds like a lot more than forty. But that's not the real improvement, and it isn't the real problem either.

Here's the turn. A random pull weighted by volume gives you a sample that looks exactly like your traffic. Food posts are common, so you get plenty of food examples. Health and wellness claims are rare, about one post in seventy, so out of 500 you get maybe six or seven. Alcohol posts are rarer still. You end up with a big, thorough-looking sample that has almost nothing to say about the two categories where a wrong caption is a legal problem instead of an embarrassing one.

A bigger sample is not a safer sample. A sample that looks like your traffic can still know nothing about the one slice of it that could get you sued.

At its worst, that eval set passes every release with a strong score, and a false health claim ships anyway, because there were never enough health-category examples in the set for the pattern to even show up.

The decision that mattered Split the sampling floor by what a miss actually costs, not by how much traffic a category gets. A random pull sized to match your traffic will always be the last one to notice the rare category with the biggest downside.

The choice I would take back. The team sized the eval set as one random pull, 500 posts, weighted by real traffic volume, because that felt more honest than hand-picking examples. It was fine while every category carried about the same risk. It stopped being fine the day one caption used the word "proven."

What I would leave alone. The random pull is still fine for something like caption tone, where every category behaves about the same and a miss just looks a little off. There's no need to stratify sampling for a low-stakes read like "does this sound like the brand," only for the categories where a miss actually costs someone something.

The lesson. A sample size that sounds thorough is not the same as a sample that has actually seen the thing you're worried about. If the categories with the least traffic are also the ones with the most risk, a sample built to match your traffic will always be the last one to notice.

Now here is the same thing as a story

Skip this if you already believe a random sample and a stratified one aren't the same thing. Read on if you want to feel why they aren't.

Fumiko Arai has run product for Hashloom's caption engine for two years, and she can tell you which categories of small businesses post the most without looking anything up: food and drink first, fashion close behind, fitness a clear third.

She built the first real eval set herself, the week Hashloom crossed ten thousand captions a day. Five hundred posts, pulled at random from that week's real traffic, weighted the way the traffic actually looked. It felt like the honest choice. Nobody had cherry-picked a single example.

For months, that felt like enough. Every release, she'd run the 500 against the new model, read through the flagged ones over a Tuesday afternoon, maybe two hours of work, and ship. The pass rate held in the high nineties. The first couple of times, she spot-checked the health and alcohol posts in that set specifically, out of habit more than worry. There were only ever six or seven of them in the whole sample. She'd read all six, they'd be fine, and she'd move on.

So she stopped opening those six on purpose. Then she stopped thinking about the split by category at all. Five hundred examples, one pass rate, one number to watch.

Hand-sketched comparison. Left panel, a random pull by volume: a funnel labeled with the note that health claims got two of five hundred examples and alcohol got one, lost in the crowd. Right panel, a stratified pull by category: a balanced scale, with the note that every category gets a floor of forty, and health and alcohol get eighty, on purpose.
The same 500 posts, pulled two different ways. One leaves the riskiest categories to chance. The other doesn't.

Then came a Thursday, a message from a client's own legal team, not a support ticket. A supplement brand had posted with a Hashloom caption reading, more or less, "Clinically proven to melt stubborn belly fat in one week." Nobody at Hashloom had written that sentence. The model had, on its own, from a product photo and three lines of the business's notes about what the supplement did. The brand's lawyer caught it before it went live and asked, reasonably, how a tool that generates this many captions a day let that one out.

Fumiko pulled the eval set that had passed the release the caption shipped under. Five hundred posts. Six were from the health and wellness category. None of the six had anything close to an unproven claim in them, because six examples from a category that generates hundreds of captions a day was never enough to show what that category's failures actually look like.

We didn't build a bigger sample. We built a sample that looked exactly like our traffic, and knew almost nothing about the one slice of it that could get a client sued.

She went back to the eval and asked it the question the 500-post pull had never been built to answer. She pulled every health and wellness caption from three weeks of real logs, about 340 of them, and read a stratified slice of 80. Eleven of the 80, about 14 percent, made a claim no honest business could stand behind. Not because the model had gotten worse. Because nobody had ever looked at that category closely enough to know the problem was already there.

She rebuilt the eval that week: a floor of 40 examples from every one of Hashloom's fourteen content categories, doubled to 80 for health and wellness claims and for alcohol and age-restricted products, 640 examples in total, about 16 hours for one reviewer to get through. Run against the model as it stood, the health and wellness slice scored 86 percent clean, well under the bar she set for it. A fix requiring the model to flag any sentence with a medical or outcome claim for a lighter, hedged rewrite took a week. Rerun, the slice cleared 98 percent. Over the following month, Hashloom generated just over 6,000 health and wellness captions with zero flagged claims reaching a client unreviewed.

The thing I'd tell myself, the week I built that first 500-post sample: a number that looks thorough because it's big is not the same as a number that's actually seen the thing you're worried about. Ours had five hundred examples, and had barely looked at the six that mattered.

BOUND, run against a category with six examples in it

This is a sizing question about how many examples to pull and from where, not a person's trust flipping between two settings, so BOUND fits and FLIPS doesn't.

B, break it down. Sample size equals the number of content categories, times a minimum floor per category, plus extra for the categories already known to carry more risk than the rest. A typical Hashloom taxonomy has 14 categories.
O, own the numbers. A floor of 40 examples per category, since under 40 a real one-in-ten failure rate can't be told apart from noise. 14 times 40 is 560. Two categories, health and wellness claims and alcohol and age-restricted products, get that floor doubled to 80, adding 80 more. Total: 640.
U, use a range. With a coarser taxonomy, 8 broad categories at a flat 40, the total drops to 320. Splitting by category and by platform too, 14 categories across 4 platforms, pushes it past 2,000, closer to 2,560 once the flagged categories stay doubled inside every platform. Start at 640, the plain category split, and only add platform as its own axis where the model's behavior genuinely differs by platform.
N, nail the sanity check. 640 examples at about 90 seconds each to check the caption, the hashtags, and any unproven claim is 16 hours. Two working days for one reviewer, or a single day split across two or three. A real pass someone can finish before the next release, not a number that only sounds rigorous.
D, direction. The category count moves the total more than the floor does. Growing the taxonomy from 14 to 20 categories adds about 240 examples. Raising the floor from 40 to 45 only adds about 80. If the total needs to shrink, merge overlapping categories before thinning the floor, since a thin floor is exactly what let the health claims category hide the first time.

The build-up: 14 categories, then the two that got doubled
14 categories, flat floor of 40560
+ Health & wellness claims, floor doubled to 80600
+ Alcohol & regulated products, floor doubled to 80640
The flat floor across 14 categories does most of the work. The two doubled categories only add 80 examples between them, but they're the 80 that would have caught the actual miss.
What moves the total most
Taxonomy grows from 14 to 20 categories+240
Per-category floor raised from 40 to 45+80
A third category gets flagged as high-risk+40
Two overlapping categories get merged into one−40
The taxonomy's own size swings the total more than the floor does. Adding six categories moves it three times more than nudging the floor by five, which is exactly why the category list needs revisiting, not just the number attached to it.

And if you want to be sure it really works, try it somewhere else

A vet-clinic tool drafts the visit note summary from what a vet says out loud during an appointment, turning spoken observations into a written record with medications and doses.

B, break it down. A typical taxonomy is species times visit type: 3 species buckets, dog, cat, exotic and other, times 5 visit types, wellness, sick, emergency, surgery follow-up, dental, for 15 strata.
O, own the numbers. A floor of 25 examples per stratum, 15 times 25 is 375. The exotic-species-plus-emergency stratum gets the floor doubled to 50, adding 25 more. Total: 400.
U, use a range. Splitting species more finely, say 6 species groups instead of 3, doubles the stratum count and pushes the total toward 750. Fewer visit types, just wellness, sick, and emergency, brings it down closer to 225. Start with the 15-stratum version and widen the species list only where a specific exotic species shows real visit volume.
N, nail the sanity check. Checking a visit summary for dosage accuracy takes longer than checking a caption, closer to 3 minutes each. 400 examples is 20 hours, about two and a half days for one reviewer, or split across a vet and a technician in one day.
D, direction. Here the category count isn't the real lever. A geriatric cat on three medications during a routine wellness visit carries the same dosage risk as an exotic animal in an emergency visit, and stratifying only by species and visit type misses that entirely. The floor that matters most is a separate flag for multiple-medication cases, not a finer split of species or visit type.

Same shape, different lever At Hashloom, the risky slice was a content category anyone could name in advance. At the vet clinic, the riskiest slice cuts across the obvious categories, a routine visit with several medications on board, which means the strata you'd think to draw first aren't the ones that actually catch it.

Swap the trigger and it still runs.
Speed: an interviewer caps the answer at 90 seconds. Skip straight to the split: 40 per category, doubled to 80 for health claims and alcohol, 640 total, 16 hours to review. The build-up backs it up if they ask.
Cost: instead of asking what the sample size should be, a manager caps review time at one day, 8 hours. Work backward: 8 hours at 90 seconds a piece is about 320 examples. Merge overlapping categories to fit that ceiling before thinning the floor on health claims or alcohol.
The model got better: a new version almost never makes a false health claim anymore in general use. The floor doesn't drop on its own. Rerun the health and wellness slice specifically, since a clean overall number says nothing about the category that used to fail.

Where people run it wrong.
They size the sample by what sounds like enough, 500, 1,000, instead of a floor times a category count.
They set the floor once at launch and never revisit it when a new category, a new regulated vertical, starts showing real volume.
They stratify by whatever's easy to tag, platform, post length, instead of the thing actually tied to risk, the content category or the claim type.

How to use it live. Say the equation before any number: "sample size is category count times a per-category floor, doubled wherever a miss actually costs something." That buys the time to work out the real floor instead of guessing a round number that sounds thorough.

Flashcards (click a card to flip it)

1 · THE FRAMEWORK
What framework fits a question about the sampling strategy for an eval set, and why not FLIPS?
Tap to flip
ANSWER
BOUND. This is a sizing question about how many examples to pull and from where, not a person's trust flipping between two settings.
2 · THE PERSON
Who is this answer about?
Tap to flip
ANSWER
Fumiko Arai, product lead for Hashloom's caption engine, an AI tool that writes captions and hashtags for social posts from a photo and a business's notes.
3 · WHAT THE FIRST SAMPLE ACTUALLY PROVED
What did Hashloom's first 500-post eval set actually measure, and what did the team treat it as proving?
Tap to flip
ANSWER
A random pull weighted by real traffic volume. The team treated a steady high pass rate as proof the model was safe everywhere, without checking whether any single category actually had enough examples to show a real problem.
4 · THE BUILD-UP, IN THIS STORY
What's the sample-size build-up this answer turns on?
Tap to flip
ANSWER
Fourteen categories at a flat floor of 40 (560), plus an extra 40 each for health and wellness claims and for alcohol and regulated products, doubling their floor to 80, for a total of 640.
5 · THE OLD DECISION
What decision would you take back, and why did it make sense at first?
Tap to flip
ANSWER
Sizing the eval set as one random pull weighted by traffic volume. It made sense before any category's risk was known to be different from any other's.
6 · THE NUMBER
Fill in the blank: with a flat 40-example floor across fourteen categories, doubled for the two flagged ones, the total eval set lands at ___ examples, about ___ hours for one person to review.
Tap to flip
ANSWER
640 examples, about 16 hours.
7 · THE REPLAY
Same near miss, new eval. What changes?
Tap to flip
ANSWER
The rebuilt eval tests health and wellness on its own. It scores 86 percent clean, fails its target, gets a fix requiring the model to flag medical claims for a hedged rewrite, and reruns at 98 percent. Over the next month, about 6,000 health and wellness captions with zero flagged claims reaching a client unreviewed.
8 · CROSS-PRODUCT TRANSFER
Section 4 answers this same question again for a different product. Which product, and what's different about which stratum needs the tightest floor there?
Tap to flip
ANSWER
A vet-clinic tool that drafts visit note summaries from a vet's spoken observations. There, stratifying by species and visit type alone still misses the real risk, since a routine visit with several medications on board carries the same dosage risk as an emergency visit, so the risk flag has to be its own axis.

Check yourself Score: 0 / 0

Short answer, the number question
1. If the per-category floor were cut from 40 to 25 for all fourteen categories, but the two flagged categories stayed doubled, would the total eval set still clear 600 examples? Show the math.
Show hint
Multiply the twelve general categories by the new floor first, then add the doubled amount for the two flagged ones separately.
Show answer
No. It would fall to about 400. Twelve general categories at 25 is 300. The two flagged categories, doubled from 25, are 50 each, adding 100. Total is 400, well under 600. Cutting the floor hits every category at once, including the two you deliberately protected.
Multiple choice
2. Why does the health and wellness category need a doubled floor instead of the same 40 as every other category, even though a miss there is technically just one wrong caption?
  • A. It's slower to generate captions for that category.
  • B. It costs more in compute to run captions through that category.
  • C. A wrong caption there can be an unproven claim a client's own legal team has to catch, not just an off-tone caption.
  • D. It gets flagged by users more often than other categories.
Show hint
Ask what actually happens in the real world after a caption ships, right or wrong.
Show answer
C. An off-tone caption in most categories is a shrug. An unproven claim in a regulated category becomes a legal and brand problem someone has to notice and undo.
True or false
3. True or false: merging two overlapping categories, like fashion and beauty, into one is the single biggest lever for shrinking the total sample size.
  • True
  • False
Show hint
Check the sensitivity chart. Which row is the tallest, and which is the shortest?
Show answer
False. Merging two categories only saves about 40 examples, the smallest swing on the chart. The biggest swings come from how many categories exist at all, and whether a new one gets flagged as high-risk.
Fill in the blank
4. With a flat floor of 40 across fourteen categories and a doubled floor of 80 for the two flagged categories, the total eval set lands at ___ examples, which is about ___ hours of review time at 90 seconds per example.
Show hint
Check the O step's own numbers and the last row of the build-up chart.
Show answer
640 examples, and about 16 hours. 640 times 90 seconds is 57,600 seconds, which is 16 hours, close to two working days for one reviewer.
Short answer, apply it yourself
5. Pick a product you use that generates something from user data, text, images, or recommendations. Which slice of its output is probably underrepresented in whatever the team tests, just because it's rare in real traffic?
Show hint
Look for the slice that's small in volume but big in consequence if it's wrong, medical, legal, financial, or safety-related.
Show answer
Model answer: "A resume-screening tool probably tests mostly common job titles and typical resumes, since that's most of its traffic. Resumes with employment gaps or a career change are rarer and easy to undertest, and that's exactly the slice where a wrong call does the most damage to a real person's chances."
Multiple choice
6. What old decision does this answer actually take back?
  • A. Hiring more reviewers to check captions by hand.
  • B. Sizing the eval set as one random pull weighted by how much traffic each category gets, instead of a fixed floor per category.
  • C. Removing the health and wellness category from Hashloom entirely.
  • D. Lowering the pass bar so releases could ship faster.
Show hint
A dial turned up or down doesn't count. Look for the actual sampling decision made at launch.
Show answer
B. The first eval set matched the shape of production traffic instead of the shape of the risk, so the rarest categories got almost no representation.
From U2xAI Academy

From answering questions to owning outcomes.

A live workshop where you ship a working AI agent, defend a launch decision, and walk away with a portfolio recruiters can't wave off, not just more questions to study.

  • A live AI agent you actually shipped
  • A launch decision you can defend under pressure
  • An interview-ready portfolio, not more flashcards
Know more