Building an Eval Framework
An eval framework is a curated dataset + a scoring method + a review process. Building one is the PM's job, not the ML team's. Without it, you're shipping blind.
The eval dataset
An eval dataset is a curated set of inputs with known-good (and known-bad) expected outputs. It's your testing ground for every agent change.
What makes a good eval dataset:
Representative — covers the distribution of real inputs the agent will encounter. If Zylo will mostly see HVAC, legal, and retail SMBs, your eval set should have all three in proportion.
Challenging — include edge cases, not just easy examples. An agent that scores 95% on your eval should be one that can handle difficult inputs: low-data-quality prospects, unusual industries, incomplete profiles.
Labeled — each example should have a clear expected output or a quality rubric score. Not necessarily a ground-truth response (LLM output isn't deterministic), but a rubric: "a good output for this input includes at least 2 specific prospect details and exactly one clear value prop."
Stable — the eval set shouldn't change frequently. Changing it makes trend comparisons meaningless. When you need to add new edge cases, add them without removing existing ones (your dataset grows, it doesn't rotate).
How to build it:
1. Take a sample of real production runs from the last 30 days (100–200 examples)
2. Have 2–3 humans grade each output on your rubric, independently
3. Resolve disagreements and document the reasoning
4. Flag the 20% lowest-scoring examples as your "adversarial set" — these are the cases the agent is most likely to fail on
5. Flag the 10% highest-scoring examples as your "golden set" — these should be preserved and always pass after any change
This process takes 1–2 weeks the first time. It's the highest-leverage investment an AI PM can make.
A gote move that becomes sente — a slow investment that later forces the opponent to respond. Building an eval dataset is gote no sente: it slows you down initially but gives you sente in every future iteration.
Rubric design: what does 'good' look like?
A rubric is an explicit, scoreable definition of quality. Vague rubrics ("is this a good outreach message?") produce inconsistent evaluations. Precise rubrics are the foundation of reliable evals.
A good rubric for Zylo outreach quality might look like:
Personalization (1–5):
- 1: No prospect-specific information
- 3: References the prospect's industry generically
- 5: References 2+ specific facts about this prospect (review count, specific challenge identified in IRIS profile, recent company event)
Value prop clarity (1–5):
- 1: No BuzzBoard value prop mentioned
- 3: Mentions BuzzBoard but doesn't connect to a specific prospect challenge
- 5: Directly connects a specific prospect challenge to a specific BuzzBoard capability
Length and tone (pass/fail):
- Fail: over 150 words OR uses passive voice more than once OR includes competitor names
- Pass: under 150 words, active voice, no competitors
Design principles for rubrics:
- Behavioral anchors at each score level (not just "1=bad, 5=good")
- Binary pass/fail for hard constraints (length limits, prohibited content)
- Separate dimensions for separate concerns — don't conflate personalization quality with tone
- Test your rubric by having two different people score the same 10 examples; if they disagree by more than 1 point consistently, the rubric is ambiguous
Eval tooling and workflow
Running evals manually is fine for the first 50 examples. At scale, you need tooling.
Eval platforms to know:
Braintrust — purpose-built for LLM evaluation. Tracks eval runs over time, manages datasets, supports LLM-as-judge, and integrates with OpenAI/Anthropic APIs. Good for PM-accessible dashboards.
LangSmith — LangChain's observability and eval platform. Excellent for pipelines built on LangChain. Captures every LLM call with full input/output, latency, and cost data.
PromptLayer — prompt version management + evaluation tracking. Good for teams where prompt iteration is the primary lever.
Custom eval scripts — sometimes a 100-line Python script that runs your eval set against the current prompt and prints a score is the right tool. Don't over-engineer.
The PM's role in eval tooling: you don't need to build the tooling, but you need to define the requirements: What does the eval dashboard need to show? How often should evals run (every deploy? every day?)? Who gets alerted when quality drops below threshold? What threshold triggers a rollback?
The eval-driven development workflow:
1. Start of sprint: baseline eval run to know current quality state
2. Prompt or feature change: run eval before merging
3. If eval scores improve or hold: merge and deploy
4. If eval scores drop: investigate, fix, or flag for PM decision
5. Weekly: review production eval trends vs. outcome metrics
This workflow makes AI product development testable and accountable — a stark contrast to "we updated the prompt and it seems better now."
Select any text in the lesson to ask a question. Press Esc to close.