promptdojo_

Write pick_model(task) that takes a task dict and returns one of "haiku", "sonnet", or "opus".

The task dict has four fields:

  • kind: string (e.g., "ticket_tagger")
  • volume_per_day: int
  • latency_ms_max: int
  • criticality: one of "low", "medium", "high"

Routing rules, in order:

  1. High-volume task (volume_per_day >= 10000): route to "haiku" UNLESS criticality == "high", in which case route to "sonnet" (we don't trust Haiku on the high-stakes hot path).
  2. Rare + critical (volume_per_day < 100 AND criticality == "high"): route to "opus". The call is rare enough that cost doesn't matter and the answer needs to be right.
  3. Default: route to "sonnet". The general-purpose workhorse.

Two tasks run for you. Expected output:

ticket_tagger -> haiku
contract_review -> opus

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.