Recipe: Cheapest model that gets it right
Asks three Claude models the same eval in parallel sandboxes, drops any that miss the bar, and keeps the cheapest one left. What it does, when to use it, how to make it yours, and what a run costs.
Asks Claude Haiku, Sonnet and Opus the same eval at the same time, each in its own sandbox. Each lane scores its model's answers and works out what the call cost. Models that miss the bar drop out, and the judge keeps the cheapest one left.
| At a glance | Notes |
|---|---|
| Level | Advanced |
| Category | Evals |
| Shape | Three models in parallel, cheapest passing wins |
| Plan | Pay as you go (runs 4 sandboxes at once) |
| Needs a Claude key | Yes |
| Limits it comes with | 1 loop, 300 seconds, $0.25 |
Opens it in the Playground as a flow of your own. Simulate shows what a run costs. Run asks before it starts.
The steps
| Step | Block | What it does |
|---|---|---|
| Load the eval | Run command | Saves an eval: eight support tickets with known labels. A model passes with 7 or more right. |
| Fork ×3 | Try in parallel | Copies the sandbox into a lane per model. |
| Ask Haiku, Sonnet, Opus | Ask AI, JSON, one per lane | Each lane asks its model to label the tickets, as JSON. |
| Score Haiku, Sonnet, Opus | Run command, one per lane | Each lane counts right answers and estimates the call's cost from the size of the question and answer, printed as {"usd": ...}. It fails below the bar. |
| Cheapest that passed | Keep the best | Keeps the cheapest lane that passed. |
| Report the pick | Run command | Says which model to use for this job. |
When to use it
- You're choosing a model for a job that runs thousands of times, and the price gap is 20 to 40 times.
- You want the choice backed by your own eval, not a leaderboard.
- You want to check again whenever your prompt or the models change.
Run it
The quick way: choose Try it now under the drawing. It opens the recipe in the Playground as a flow of your own, after you sign in if you aren't yet. Simulate opens it and shows the forecast, and Run opens it and asks before it starts, with what the run will likely cost. From the dashboard instead:
- In the dashboard sidebar, open Agent Playground → Recipes and find Cheapest model that gets it right. Choose Advanced to filter the list. In the builder, Recipes in the toolbar lists them too.
- Choose Use this recipe. It becomes a flow of your own, so changing it never changes the recipe.
- If you haven't yet, save your Claude key on the Secrets page. The builder offers Add a key… in the step's key list if it's missing.
- Choose Simulate to see the forecast, then Run.
What you'll see: Three answers arrive within seconds. Open each lane's score step to see how many it got right and what it cost. The judge keeps the cheapest model that passed, and Report the pick names it.
Make it yours
- Replace
evals/questions.mdandevals/answers.jsonin Load the eval with 20 to 50 real examples from your job. - Change the bar in
evals/score.py(by default, at most one wrong). - Judge on speed instead: print the seconds a lane took and set Keep the best to the smallest
seconds.
What a run costs
These are the builder's own forecast for the recipe as it comes, with its limits, rounded. Simulate shows the same numbers for your version, and they change as you change the flow.
| Notes | Typical | 1 in 10 runs | At most |
|---|---|---|---|
| Sandbox time | $0.0007 | $0.0008 | $0.01 |
| Claude, on your key | $0.005 | $0.005 | the run's spend limit |
| How long it takes | 19 seconds | 22 seconds | 300 seconds |
A typical run uses $0.0007 of sandbox time, so about 1,500 runs cost $1, and every plan includes $5 of usage a month. That includes all 4 sandboxes: the main one and each lane. Claude is billed by Anthropic to your own key, at their usual prices. The run counts it toward its spend limit, so it can't overspend, but we don't charge you for it. At most is the most a run could cost with these limits: it stops at $0.25 or 300 seconds, whichever comes first.