Choosing LLMs by Task Complexity: Model Tiers, Reasoning Effort, and Prompt Design
Selecting the right Large Language Model (LLM) tier is critical for balancing performance, cost, and latency. This article explores how to choose models based on task complexity, configure reasoning effort effectively, and design prompts that describe constraints rather than just outcomes. It also covers programmatic verification techniques for validating structured outputs like SVG, ensuring reliability and stability in production environments.
1. Background: Tier Differences Within the Same Model Series
LLM service providers typically offer multiple tiers within the same product line, commonly categorized into lightweight, balanced, and flagship tiers. The lightweight tier offers fast responses and low cost per request, making it suitable for well-defined tasks such as classification, extraction, and simple rewriting. The flagship tier features longer reasoning chains and can satisfy multiple constraints simultaneously, making it ideal for complex generation tasks that require planning and self-checking.
Version iterations introduce another layer of variation. A newer version is not necessarily better across all tasks. Some versions show significant improvements in completeness for complex tasks but may produce more verbose outputs for simple tasks, consuming more tokens. Therefore, the version number alone cannot serve as the sole selection criterion; it must be tested against actual task types.
2. Three Dimensions for Model Selection
Task Complexity. Complexity is determined by the number of constraints, reasoning steps, and the strictness of the output structure. An instruction defining only one goal is considered low complexity. An instruction simultaneously specifying structure, dimensions, geometric relationships, interaction constraints, and self-checking steps is considered high complexity.
Latency and Cost. Interactive scenarios are sensitive to first-token latency, while batch processing scenarios focus more on overall throughput and unit cost. High-intensity reasoning increases wait times and output length, an overhead that must be factored into the total cost.
Stability. High-load periods may cause queuing, timeouts, or output interruptions. Production systems should set timeout thresholds and fallback paths for each tier rather than assuming a single model will always be available.
Based on these dimensions, you can start with a basic mapping table:
| Task Type | Recommended Tier | Reasoning Effort |
|---|---|---|
| Classification, extraction, simple rewriting | Lightweight | Low |
| Routine code completion, document generation | Balanced | Medium |
| Multi-constraint generation, complex refactoring, long-chain reasoning | Flagship | High |
This table is only a starting point; specific thresholds should be calibrated using your own data.
3. Principles for Configuring Reasoning Effort
Reasoning effort determines how much internal computation a model invests before outputting. The core principle is to match capability with the task. Using high reasoning effort for simple tasks will slow down responses and waste tokens with little to no improvement in quality. Using low reasoning effort for complex tasks makes the model prone to skipping key constraints, resulting in missing components, positional misalignment, or structural defects.
In practice, you can follow a three-step approach:
- Run the workflow with medium reasoning effort first to ensure the output format is correct and parses without errors.
- Analyze failed samples. If failures are concentrated on constraint omissions, gradually increase the reasoning effort and record the success rate and time consumed at each level.
- If failures are unrelated to reasoning (e.g., format parsing errors or missing fields), modify the prompt or post-processing logic instead of continually increasing reasoning investment.
4. Prompt Design: From Describing Outcomes to Describing Constraints
A common issue with prompts for complex tasks is that they only describe the desired outcome, not the path to achieve it. For example, asking a model to “generate a graphic of a person riding” might yield a seemingly plausible result, but it will struggle to simultaneously satisfy proportions, contact relationships, and size requirements.
A robust prompt should include four parts:
- Target and Delivery Format. Clearly specify the file type, canvas size, code block requirements, and whether additional explanations are allowed.
- Object Decomposition. List the geometric or structural requirements for each component, such as relative proportions and connection methods.
- Relationship Constraints. Specify the connections, load-bearing, and contact relationships between components. Each relationship should be verifiable; avoid using unmeasurable terms like “natural” or “realistic.”
- Self-check Steps. Require the model to verify coordinates or structures item by item before outputting, and to fix any non-compliance before generating the final output.
Here is a general template suitable for vector graphic generation tasks involving spatial relationships:
Task: Generate a 1200x1200 SVG schematic containing a person sitting on a seat and a pedal device.1. Planning: First determine the center point of the device, the seat position, the motion radius of the pedals, and list the key coordinates.2. Relationship constraints:- The character's feet must be on the pedals, with one foot up and one foot down;- The hands must touch the handlebars;- The endpoints of each path must coincide with the connection points of adjacent components, no floating allowed.3. Output: Output only one svg code block, no additional explanations.4. Self-check: Verify the relationships in step 2 one by one. If not satisfied, correct the coordinates before outputting.
Model self-checking can reduce error rates, but it cannot replace external verification. A model claiming it has “checked” does not guarantee a correct result; therefore, programmatic validation is necessary.
5. Programmatic Verification of Output Results
For parseable outputs like SVG, validation can be divided into three layers.
The first layer is syntax validation. The output must be valid XML, and the root element must be svg. If parsing fails, the error message should be returned directly to the model for a retry.
The second layer is specification validation. Check whether width, height, and viewBox are all set to the required 1200. Any inconsistency should be deemed a failure.
The third layer is geometric validation. Perform tolerance comparisons on key connection points, such as ensuring the distance between the endpoints of two paths is less than a very small threshold, and that the bounding box of graphic elements falls within the canvas boundaries. This layer requires rules defined by the business logic; there is no universal one-click solution.
The pseudo-code for the validation process is as follows:
function check_svg(svg_text, expected_size = 1200):problems = []if svg_text cannot be parsed as valid XML:return ["XML parsing failed"]if root_element_name != "svg":problems.append("Root element is not svg")if width or height != expected_size:problems.append("Canvas size does not meet requirements")if viewBox exists and its width/height != expected_size:problems.append("viewBox size does not meet requirements")if distance between key connection points exceeds tolerance:problems.append("Unconnected components detected")return problems
If the problems list is not empty, return the list of issues along with the original task to the model, and set a maximum retry limit to prevent infinite loops and uncontrolled costs.
6. Engineering for Cost and Stability
The routing layer should select tiers and reasoning effort based on task tags, rather than using the same configuration for all requests. The following pseudo-code demonstrates a simple mapping approach:
TIER_BY_TASK = {"classify": (lightweight_tier, low_effort),"codegen": (balanced_tier, medium_effort),"svg_complex": (flagship_tier, high_effort),}function pick_model(task_type
