Quanta

← Back to Briefings

Build a Flagship-and-Small-Model Pipeline

Team playbooksEN232 reads

01 · Step 1: Split the workflow by difficulty, not length

A mixed-model pipeline works best when each model has a defined job. The small model handles bounded, repeatable tasks. The flagship model handles ambiguity, competing constraints, and decisions that require broader reasoning. Simply sending short requests to one and long requests to the other misses that distinction.

Start with an engineering support workflow: extract an error message, identify the affected component, retrieve relevant documentation, and propose a resolution. Extraction and classification are candidates for the small model. Reconciling contradictory evidence may justify the flagship. Treat these assignments as hypotheses to test, not guaranteed capability boundaries.

02 · Step 2: Define the contract between models

Before writing prompts, define what moves between stages. A useful handoff contains the original request, extracted facts, supporting evidence, missing information, and the reason for escalation. Keep facts separate from interpretations so an early mistake does not become an unquestioned premise.

  • › Required fields: Specify which outputs must exist before processing continues.
  • › Evidence references: Preserve document identifiers or source locations.
  • › Uncertainty: Allow an explicit unknown result rather than forcing a guess.
  • › Validation: Check field types, allowed categories, and required evidence in application code.

Structured output makes the handoff easier to validate, but a valid structure does not prove the contents are correct.

03 · Step 3: Give the small model a bounded first pass

For example, you could test Claude Haiku 4.5 for extraction and initial triage, with Claude Opus 5.5 reserved for escalated reasoning. Evaluate both on your actual requests before adopting that division.

Ask the first stage to perform one narrow operation: identify the component, extract the relevant error, and select a supported issue category. Supply only the context that operation needs. Do not ask it to diagnose every possible cause while also classifying the request.

Treat retrieved documents and user-submitted logs as untrusted data. Their contents must not override routing instructions, trigger tools, or change permission boundaries.

04 · Step 4: Route on observable signals

Escalation should follow rules your application can inspect. Useful signals include missing evidence, conflicting sources, an unsupported category, failed validation, or a request involving a consequential action. A model's self-reported confidence can be an additional signal, but should not be the sole gate.

Use three outcomes: accept the bounded result, escalate for deeper analysis, or request more information. The third path matters. A flagship model cannot resolve a missing log file merely by reasoning harder.

For privileged operations, keep authorization and approval checks outside both models. Routing to a stronger model is not a substitute for permission.

05 · Step 5: Escalate with evidence, not just a summary

Send the flagship the original question, relevant source excerpts, validated extraction, and a precise explanation of what remains unresolved. Avoid passing only the small model's summary: it may omit the detail that changes the answer.

Ask the flagship to distinguish supported findings from hypotheses and identify the next diagnostic step when evidence is insufficient. Validate its response against the same application contract. Set explicit limits on retries and escalation loops so one difficult request cannot expand indefinitely.

06 · Step 6: Connect routing to token accounting

Quanta fits naturally when a team wants one pay-as-you-go balance across models rather than separate funding arrangements. Its API base address is https://api.quantarelay.com, and it works with any OpenAI SDK. Keep model selection in your routing configuration rather than scattering it through application logic.

Every Quanta call is metered on real tokens, with cache writes and cache reads priced separately. Measure the entire request path: first pass, escalation, repeated context, validation retries, and cache activity. A smaller first call does not guarantee a cheaper completed task.

07 · Step 7: Test the pipeline before expanding traffic

Compare the mixed pipeline with a flagship-only baseline on the same representative requests. Track answer quality, escalation frequency, end-to-end latency, token charges, and failure modes. Review incorrectly accepted small-model outputs separately; these reveal where routing rules need tightening.

Open a Quanta account to test a bounded workflow with one balance across your chosen models. Start with limited traffic, retain a fallback path, and expand only when measured results support the split.