quiet robot

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.

View as Markdown

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 glanceNotes
LevelAdvanced
CategoryEvals
ShapeThree models in parallel, cheapest passing wins
PlanPay as you go (runs 4 sandboxes at once)
Needs a Claude keyYes
Limits it comes with1 loop, 300 seconds, $0.25
Cheapest model that gets it right, as it is on the canvas.Load the eval (Run command), Fork ×3 (Try in parallel), Ask Haiku (Ask AI), Score Haiku (Run command), Ask Sonnet (Ask AI), Score Sonnet (Run command), Ask Opus (Ask AI), Score Opus (Run command), Cheapest that passed (Keep the best), Report the pick (Run command). Arrows: Load the eval to Fork ×3; Fork ×3 to Ask Haiku; Ask Haiku to Score Haiku on Either way; Score Haiku to Cheapest that passed on Either way; Fork ×3 to Ask Sonnet; Ask Sonnet to Score Sonnet on Either way; Score Sonnet to Cheapest that passed on Either way; Fork ×3 to Ask Opus; Ask Opus to Score Opus on Either way; Score Opus to Cheapest that passed on Either way; Cheapest that passed to Report the pick on Passed.Either wayEither wayEither wayEither wayEither wayEither wayPassed>_ RUN COMMANDLoad the eval⑂ TRY IN PARALLELFork ×3lanes Haiku, Sonnet and Opus✦ ASK AIAsk Haikulane Haiku>_ RUN COMMANDScore Haikulane Haiku✦ ASK AIAsk Sonnetlane Sonnet>_ RUN COMMANDScore Sonnetlane Sonnet✦ ASK AIAsk Opuslane Opus>_ RUN COMMANDScore Opuslane Opus★ KEEP THE BESTCheapest that passedlowest "usd">_ RUN COMMANDReport the pick
Cheapest model that gets it right, as it is on the canvas.
Try it nowSimulateRun

Opens it in the Playground as a flow of your own. Simulate shows what a run costs. Run asks before it starts.

The steps

StepBlockWhat it does
Load the evalRun commandSaves an eval: eight support tickets with known labels. A model passes with 7 or more right.
Fork ×3Try in parallelCopies the sandbox into a lane per model.
Ask Haiku, Sonnet, OpusAsk AI, JSON, one per laneEach lane asks its model to label the tickets, as JSON.
Score Haiku, Sonnet, OpusRun command, one per laneEach 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 passedKeep the bestKeeps the cheapest lane that passed.
Report the pickRun commandSays 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:

  1. 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.
  2. Choose Use this recipe. It becomes a flow of your own, so changing it never changes the recipe.
  3. 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.
  4. 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

  1. Replace evals/questions.md and evals/answers.json in Load the eval with 20 to 50 real examples from your job.
  2. Change the bar in evals/score.py (by default, at most one wrong).
  3. 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.

NotesTypical1 in 10 runsAt most
Sandbox time$0.0007$0.0008$0.01
Claude, on your key$0.005$0.005the run's spend limit
How long it takes19 seconds22 seconds300 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.

  • Agent PlaygroundQuickstart: build and run your first flow
  • Agent PlaygroundBlocks
  • Agent PlaygroundRecipes
  • SandboxesQuickstart: your first sandbox
  • SandboxesMCP server
  • SandboxesAPI reference
  • InsightsAll posts