LLM Selection for Math Reasoning and Execution Efficiency: A Cost-Aware Workflow
Model selection for LLMs is difficult to reduce to a single overall score. This article outlines a practical workflow: define task categories and targets, measure execution speed, calculate cost, and route requests, with examples for real-time, reasoning, and generation workloads.
LLM selection is hard to complete with a single overall score. The same model may perform well on code completion but be slow on mathematical proofs, or it may produce a long chain of thought that makes the bill grow quickly. This article follows a sequence—define tasks first, then measure, then calculate cost, and finally route—to explain how teams can put this into practice.
1. Break Tasks Down Before Discussing Models
Most teams do not have only one type of request. It is advisable to split tasks into at least three categories and write down three numbers for each category: acceptable response time, required accuracy, and token budget per request.
- Real-time tasks: code completion, customer support Q&A, and form validation. Users are waiting, so latency matters more than deep reasoning.
- Reasoning tasks: mathematical proofs, complex logical analysis, and architecture review. Correctness comes first, and longer response times are acceptable.
- Generation tasks: long-form writing, report summarization, and batch content rewriting. Throughput and per-request cost are usually the main constraints.
After these three sets of numbers are written down, model selection discussions become concrete. For example, “the 95th percentile time to first token for real-time tasks must be below the team’s upper limit” is a condition that can be directly verified.
2. How to Measure Execution Speed Correctly
A common problem in speed evaluation is reporting only an average. Teams should record four metrics, including the following:
- Time to First Token: the time users wait before the first token appears; this has the greatest impact on interactive experience.
- Output speed (tokens per unit time).
