Prompt
How do I reduce LLM costs by sending simple prompts to cheaper models?
Latest observation
Oct 10, 2026
OpenAI APIWeb search: off
A practical way to cut LLM spend is to route easy requests to cheap models and reserve expensive models for hard ones. This is usually called tiered routing or a model cascade.
Basic idea
- Classify the request as simple vs. complex.
- Send simple tasks to a low-cost model.
- Escalate only when needed to a stronger model.
Good candidates for cheap models
Use smaller/cheaper models for tasks like:
- Summarization of short text
- Classification / tagging
- Extraction of structured fields
- Rewriting / grammar cleanup
- Basic Q&A over provided context
- Drafting boilerplate responses
Keep expensive models for
- Long multi-step reasoning
- Ambiguous user intent
- Code generation/debugging
- High-stakes outputs
- Tasks that need deep context synthesis
Common routing strategies
1. Rule-based routing
Simple heuristics:
- If prompt length < X and contains keywords like “summarize”, “extract”, “classify” → cheap model
- If it asks to “analyze”, “compare tradeoffs”, “debug”, “design” → stronger model
This is easy to implement and cheap, but brittle.
2. LLM router
Use a small model to decide:
- “Can a cheap model handle this?”
- “Should this be escalated?”
Output could be a label like:
cheapexpensiveneeds_clarification
3. Confidence-based escalation
Ask the cheap model to respond with a confidence score. If confidence is low, retry with a better model.
4. Two-pass approach
- Pass 1: cheap model generates draft
- Pass 2: expensive model reviews only if necessary
This is useful when you want quality control without paying top-tier costs for every request.
Example routing logic
def route_prompt(prompt: str) -> str:
p = prompt.lower()
if any(k in p for k in ["summarize", "extract", "classify", "rewrite"]):
return "cheap"
if any(k in p for k in ["debug", "design", "tradeoff", "analyze", "prove", "optimize"]):
return "expensive"
if len(prompt) < 500:
return "cheap"
return "expensive"
Best practices
- Measure accuracy and fallback rates before fully rolling out.
- Log routing decisions so you can tune the rules.
- Use prompt templates to make simple tasks more predictable.
- Limit context sent to cheap models; only include what they need.
- Cache repeated requests where possible.
- Set escalation triggers when output is malformed, incomplete, or low confidence.
A strong pattern: cascade with validation
- Cheap model produces an answer.
- Lightweight validator checks structure or quality.
- If it fails, send to expensive model.
This often gives the best cost/quality tradeoff.
Practical example
For customer support:
- Billing address extraction → cheap model
- Refund policy interpretation → expensive model
- Short FAQ answer → cheap model
- Complaint with nuanced legal/contract implications → expensive model
Important caveat
Don’t route purely by prompt length. A short prompt can still be hard. It’s better to combine:
- task type
- complexity indicators
- confidence
- fallback checks
If you want, I can also give you:
- a routing architecture diagram,
- a Python implementation, or
- a decision table for which tasks go to which model.