Topic 1 of 5 · 3 min read
Script, notebook or eval platform
Goal: Choose between a script and an eval framework for a team's situation and justify it.
Start with the smallest tool that runs your eval every time you change the prompt, and adopt a framework only when a specific chore keeps costing you time. The tool is never the hard part. The dataset and the grader are.
Check yourself · 1 of 3
A two-person team has 60 labelled examples and one prompt to tune. What is the most sensible eval setup?
Why it matters
Teams often pick a platform first and then discover they have no test cases. A framework cannot invent a good dataset for you. A 40-row spreadsheet and a 60-line script that you actually run beats a dashboard that nobody opens.
What a script already gives you
A basic eval is a loop: read cases, call the model, grade the output, print a score. In Python or TypeScript that is a small file. You get full control, no new dependency and a result you can diff in git.
What a framework adds
Look for the chores that grow past a script:
- Datasets and versions. Cases stored and reviewed, not scattered across files.
- Run history. Compare today's run with last week's, per case.
- Caching and concurrency. Do not pay for the same model call twice, and run many cases at once with rate limits handled.
- Several providers. The same cases against Claude, GPT and Gemini side by side.
- Reports and CI. A readable table, a pass threshold and a non-zero exit code when it drops.
- Team access. Product managers and domain experts reading and labelling results.
How to decide
Count the chores. If you hit one or two, add a small library or extend the script. If you hit four or more, and several people need the results, adopt a framework. Write down the one reason, so you can tell later whether it paid off.
Before and after
Before: a team of three buys a hosted platform for a support-ticket classifier. Six weeks later it holds eleven test cases and nobody has looked at a failure. After: they move to a CSV of 80 real tickets with expected labels and a script that prints accuracy per category. They revisit tooling when two more teams need the same results.
import csv
def run(classify):
rows = list(csv.DictReader(open("tickets.csv")))
hits = sum(classify(r["text"]) == r["label"] for r in rows)
print(f"{hits}/{len(rows)} correct")
What goes wrong
- Tool before data. The platform is set up, the dataset is not.
- Lock-in by habit. Cases live only inside one vendor's UI and cannot be exported.
- Script sprawl. Five copies of the loop, each with a different grader, give numbers nobody can compare.
- Framework as proof of quality. A green dashboard measures only what its cases and graders measure.
Examples
Two teams, two answers
A solo developer ships a summariser. 50 cases in a CSV, one script, results pasted into the PR. That is enough.
A company with three LLM features, a product manager who labels outputs, and a compliance need to keep run history for audits has four chores at once. A framework or hosted platform fits.
Key points
- The dataset and the grader decide eval quality; the tool only runs them.
- A short script you run on every prompt change beats a platform nobody opens.
- Frameworks earn their place through specific chores: dataset versions, run history, caching, multi-provider runs, CI reports and team access.
- Name the one reason you are adopting a tool, and check later whether it paid off.
- Keep cases in a plain, exportable format so you can leave any tool.
Common mistakes
- Buying or installing a platform before there is a dataset of real cases.
- Letting each developer write a private eval loop with its own grader, so scores cannot be compared.
- Storing test cases only inside a vendor UI with no export.
- Treating a passing dashboard as proof the product works.
Check yourself · 2 of 3
Which need is a real reason to move from a script to a framework?
Check yourself · 3 of 3
Where should test cases be stored so you can change tools later?
Practice items, not counted towards your mastery.
Start here
- Your AI product needs evals (Hamel Husain) (opens in a new tab)ArticleFree
Why error analysis and your own checks beat generic metrics, and how to start with simple tooling.
- Promptfoo introduction (opens in a new tab)ToolFree
Config-driven prompt tests: providers, test cases and assertions in one YAML file, runnable in CI.
- Inspect: open-source framework for LLM evaluations (UK AISI) (opens in a new tab)ToolFree
Tasks, solvers, scorers and sandboxed agent evals from the UK AI Security Institute.