In this video, you ran each case of the booking assistant’s eval set five times instead of once, and turned each case’s single verdict into a pass rate, with what a run costs and how long it takes beside it.
Key Points
- One run is one sample. The model can take a different path through the same case. Asked to cancel LF-2414, it asked for the cancellation straight away in some runs and looked up the booking first in others. Both paths passed, but a run that passed once can fail the next time. In a chat run of the same request, the model asked for the cancellation again after Amara’s no, and the fifth case’s
asks()check fails a run like that. - A pass rate is passes out of runs. Five passes out of five runs is a rate of 5/5 for that case. The whole set’s rate is the passes out of all its runs.
- Runs differ in cost and time, too. A run of the cancel case with the lookup sent one more request and cost about 0.37 cents. A run without it cost about 0.24 cents.
runOnce()runs one case once. Last lesson’s body for one case moves into a function that returns whether the run passed, the checks that failed, the answer, the run’s cost in cents worked out from its token usage, and the seconds it took.- The loop runs each case
RUNStimes. Each run writes a ✓ or ✗ withprocess.stdout.write(), which doesn’t end the line, so one case’s marks share a row. - Each row ends with the passes out of five, the average cost and time of one run, and the case’s name. Below the table come the rate for the whole set and the total cost, then each failed run’s failed checks and answer. Every run, passing or not, goes to
evals/runs.json. - Report cost and time beside each rate. In the recorded run, every case passed five times out of five, for 30 runs out of 30. Three more full runs of the set passed every time too.
- An average run cost from 0.21 cents for the people on her own booking up to 0.36 cents for the Gull Island times, and the whole eval came to under 9 cents. Your numbers will differ, from run to run and with a different model. When you change the prompt or the model, you’ll weigh these numbers against the rates.
- Five out of five doesn’t mean a case never fails. If a case failed one run in twenty, five runs would all pass about three times in four, because 0.95 to the power of five is about 0.77. Twenty runs would all pass only about one time in three (0.95 to the power of 20 is about 0.36). Give the cases where a failure would hurt most more runs.
Run each case several times. Report passes out of runs, per case and for the whole set, with cost and time beside each rate.