← Table of Contents · Page 559 of 868

COST OPTIMIZATION TECHNIQUES

Part 3 of 10

MODEL ROUTING Model routing means sending easy tasks to cheaper models and hard tasks to more capable, more expensive ones. Providers usually offer a family of models in several sizes. Small models are cheap and fast but less capable at complex reasoning. Large models are slower and cost more but handle difficult, multi-step work better. Think of a hospital. A nurse handles routine checks, and a specialist surgeon handles the operation. You would not pay a surgeon to take temperatures, and you would not ask a nurse to perform a heart transplant. Routing matches the worker to the job. There are several ways to decide which model gets a task. By task type: your harness knows that classification and extraction go to the small model, while planning and writing go to the large one. By a classifier: a small, cheap model first looks at the request and rates its difficulty, then the request is sent on accordingly. By escalation: start with the cheap model, and if its answer fails a check or it signals low confidence, retry with the stronger model. Routing needs measurement. Test the cheap model on your real tasks. If it gets the same quality of answers on easy tasks, route those tasks to it permanently. Also keep a safety net so that a mistaken routing decision can be corrected by escalation.
Advertisement
Read Aloud:
0:00 / 0:00