Skip to content

Docs

Pattern: Speculative Fan-Out

Ask everything the system might need in one request, then let code throw away what it does not use. The ticket-triage example sends a category plus four speculative questions in parallel.
Format
Docs
Reading time
2 min
Published by
TypeSafe AI
Last verified
Sep 2026

Highlights

  • All questions are evaluated in parallel, so adding questions usually has little effect on response time.
  • One request carries a Choice category plus four speculative Score and Noul judgments.
  • The example escalates bugs at severity above 1.5 with repro above 0.6 and flags refunds above 0.7.
  • Speculative answers that do not match the branch are simply ignored.

Quickstart

python
if category.choice == "bug_report":
    if bug_severity.score > 1.5 and bug_repro.noul > 0.6:
        escalate_to_engineering(ticket_id, severity="high")
    else:
        add_to_bug_backlog(ticket_id)

elif category.choice == "billing":
    if refund.noul > 0.7:
        route_to_billing_with_flag(ticket_id, refund_likely=True)
    else:
        route_to_billing(ticket_id)

Watch out

Every speculative question adds input tokens on every call, so fan out on questions that several branches can reuse.

Questions about this entry

Short answers drawn from the linked project or page.

Reactions & coverage

Posts, threads, and videos about this entry from around the web.

Facebook: Intake Router keeps diagnosis out of the answer space at the front desk.

FacebookClinicnotes

X: OpenRouter Decision Model Rankings

X: herdr + jev, an agent router

X: A group chat bot with decision room routing

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai