Large Models for Planning, Small Models for Execution: A Practical Guide to Collaborative AI Coding
In AI-assisted software development, a two-tier model collaboration pattern is becoming common: a large model handles requirement understanding, task decomposition, and technical planning, while a smaller, faster model executes the concrete implementation. This article explains why parameter count and leaderboard scores alone are poor selection criteria, identifies the two factors that determine a small model's execution quality (instruction-following and speed), and provides a practical template for writing executable implementation documents that serve as the contract between the planning and execution stages.
Background: The Division of Labor Between Large and Small Models
In day-to-day software development, more teams are adopting a two-tier model collaboration approach. A larger model, with more parameters, is responsible for understanding requirements, breaking down tasks, and producing technical plans. A smaller model then follows those plans to complete the concrete implementation. The core logic is straightforward: complex judgment goes to the more capable model, while repetitive construction work goes to the model that responds faster and costs less.
Whether this pattern works depends on two prerequisites. First, the planning stage must produce documentation of sufficient quality that the executor can understand the task without ambiguity. Second, the executing model must reliably follow the documentation and produce results fast enough.
1. Why Parameter Count and Leaderboard Scores Are Not Enough
When selecting models, many people habitually start with parameter size or overall benchmark scores. These metrics reflect a model’s breadth of knowledge, but they do not directly predict how well it will perform on a specific engineering task.
General capabilities should be broken down by task type. Take multimodality as an example: some models natively support image input, while others can produce assets by invoking external image generation capabilities. The former reduces integration steps; the latter requires additional consideration of API call costs, quota management, and the hardware cost of local deployment. These hidden costs should be factored into the total cost of ownership, rather than comparing per-token prices alone.
Pure coding ability is equally hard to capture with a single score. Code quality is heavily influenced by the programming language, framework, project scale, and team conventions. A more reliable approach is to run small-scale trials with your own real tasks, record how each model performs, and make decisions based on those results.
2. Two Factors That Determine a Small Model’s Execution Quality
2.1 Instruction Following
In the execution stage, a small model’s value lies in faithfully carrying out the specification. If the model tends to improvise—for example, renaming interfaces on its own, introducing undeclared dependencies, or restructuring directories—then even if individual features run correctly, overall project consistency will gradually degrade. For this role, rigor and instruction-following ability usually matter more than divergent, creative capability.
To evaluate instruction following, run a controlled test with a fixed implementation document. Give every candidate model the same document, then check whether the output meets the following requirements:
- The directory structure matches the document;
- Dependency versions match what was declared;
- Naming conventions and interface definitions are followed;
- No files outside the document’s scope were modified.
The more items a model satisfies, the better suited it is for the execution role.
2.2 Execution Speed
The other advantage of small models is fast output. In scenarios like writing unit tests, batch-fixing formatting issues, or generating boilerplate code, most work consists of “execute, get feedback, execute again” loops. If every iteration requires waiting through a long internal reasoning process, the overall iteration cycle stretches noticeably.
Speed needs to match task complexity. Changing a button’s style does not require multiple subtasks to conduct lengthy research first. Reserve intensive reasoning for architecture design, hard-to-locate bugs, and reviews of critical modules; hand simple, repetitive work to fast-responding models. Overall efficiency is usually higher this way.
3. How to Write an Executable Implementation Document
The implementation document is the contract between the large model and the small model. The more specific the document, the smaller the executor’s deviation. A usable implementation document typically includes the following sections.
- Objective: What the task should accomplish, and what is explicitly out of scope.
- Tech stack: Language version, framework version, and key dependencies with version numbers.
- Directory structure: The location and responsibility of each file.
- Interface contracts: Function signatures, input/output formats, and error handling.
- Test boundaries: The happy paths, error paths, and edge cases that must be covered.
- Acceptance criteria: Completion conditions described in a way that can be checked automatically.
- Prohibited items: For example, no hardcoded secrets, no modifications to shared modules, no new dependencies.
Below is a simplified template example.
## Task: Order Amount Parsing Module### ObjectiveImplement conversion from string amounts to fixed-point numbers,for use by the settlement module.### Tech Stack- Python 3.11- Standard library decimal only; no third-party dependencies### Interfacedef parse_amount(text: str) -> Decimal- Input: a non-negative numeric string with at most two decimal places- Invalid input raises ValueError### Test Boundaries- Empty string, negative numbers, three decimal places,input containing letters### Acceptance Criteria- All test cases pass- No files under settlement/ are modified
Acceptance criteria should be programmatically verifiable. Writing “code quality is good” makes it impossible to judge whether the task is done; writing “all tests pass, and no files outside the specified directory are changed” can be checked directly.
The corresponding tests can be organized like this:
import unittestfrom decimal import Decimalfrom amount import parse_amountclass ParseAmountTest(unittest.TestCase):def test_parse_normal_amount(self):self.assertEqual(parse_amount("12.50"), Decimal("12.50"))def test_invalid_amount_raises(self):for text in ["", "-1", "1.005", "abc"]:with self.assertRaises(ValueError):parse_amount(text)if __name__ == "__main__":unittest.main()
Conclusion
The large-model-plans, small-model-executes pattern is essentially an engineering division of labor: spend expensive reasoning capacity where judgment matters, and use cheap, fast execution where the work is well-defined. To make it work in practice, select models based on real-task trials rather than leaderboard scores, prioritize instruction following and speed when choosing the executor, and treat the implementation document as a strict, verifiable contract between the two stages.
