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.

    1. Objective: What the task should accomplish, and what is explicitly out of scope.
    2. Tech stack: Language version, framework version, and key dependencies with version numbers.
    3. Directory structure: The location and responsibility of each file.
    4. Interface contracts: Function signatures, input/output formats, and error handling.
    5. Test boundaries: The happy paths, error paths, and edge cases that must be covered.
    6. Acceptance criteria: Completion conditions described in a way that can be checked automatically.
    7. Prohibited items: For example, no hardcoded secrets, no modifications to shared modules, no new dependencies.

    Below is a simplified template example.

    1. ## Task: Order Amount Parsing Module
    2. ### Objective
    3. Implement conversion from string amounts to fixed-point numbers,
    4. for use by the settlement module.
    5. ### Tech Stack
    6. - Python 3.11
    7. - Standard library decimal only; no third-party dependencies
    8. ### Interface
    9. def parse_amount(text: str) -> Decimal
    10. - Input: a non-negative numeric string with at most two decimal places
    11. - Invalid input raises ValueError
    12. ### Test Boundaries
    13. - Empty string, negative numbers, three decimal places,
    14. input containing letters
    15. ### Acceptance Criteria
    16. - All test cases pass
    17. - 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:

    1. import unittest
    2. from decimal import Decimal
    3. from amount import parse_amount
    4. class ParseAmountTest(unittest.TestCase):
    5. def test_parse_normal_amount(self):
    6. self.assertEqual(parse_amount("12.50"), Decimal("12.50"))
    7. def test_invalid_amount_raises(self):
    8. for text in ["", "-1", "1.005", "abc"]:
    9. with self.assertRaises(ValueError):
    10. parse_amount(text)
    11. if __name__ == "__main__":
    12. 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.