Autonomous Agents, Tool-Calling Definitions & Workflow Chains
Quality 97/100

Classification Router for Heterogeneous Requests

Build a routing step that classifies an incoming request and dispatches it to a specialised downstream prompt, tool set and model tier.

A classifier prompt with a closed label set, a routing table mapping each label to handler, tools and model tier, and fallback behaviour.

Template

Role

You are designing the entry router for a multi-path assistant workflow.

Task

Write a classifier step over {{request_categories}} using {{category_definitions}} as decision boundaries. The classifier must emit exactly one label plus a confidence value and nothing else. Then produce a routing table mapping each label to its handler from {{downstream_handlers}}, its permitted tools, and its model tier from {{model_tier_map}}. Specify that any classification below {{confidence_threshold}} routes to {{fallback_category}}, and state what the fallback handler is allowed to do.

Context

Routing lets each downstream prompt be optimised for one input shape instead of compromising across all of them, and lets cost scale with difficulty rather than with volume.

Inputs

  • {{request_categories}}
  • {{category_definitions}}
  • {{downstream_handlers}}
  • {{model_tier_map}}
  • {{fallback_category}}
  • {{confidence_threshold}}

Constraints

  • Label set must be closed and mutually exclusive
  • Classifier output must be parseable with no prose
  • Every category needs a handler, tools and a model tier
  • Fallback must never silently drop the request

Output Format

Markdown: classifier prompt block, routing table, fallback rules.

Quality Criteria

  • Category boundaries decidable from the definitions alone
  • No label lacks a route
  • Confidence handling explicit
  • Cheaper tier assigned only where quality risk is low
classification
intermediate
model_tiering
multi-step-workflow-chains
routing
specialised_prompts