Bridging the Engineering Gaps of Large Language Models: From Ambiguous Instructions to Contract Adherence

    In enterprise software development, simply relying on benchmark scores for model selection is insufficient. Real project delivery depends on a model's ability to understand design intent from vague requirements, adhere to implicit project conventions, and align with a developer's thought process. This article explores how to build a practical hybrid architecture that leverages large-parameter models for design, review, and complex decision-making, while utilizing small-parameter models for batch execution, offering a balanced approach to cost, delivery quality, and maintainability.

    Bridging the Engineering Gaps of Large Language Models: From Ambiguous Instructions to Contract Adherence

    In enterprise software development, model selection is rarely just about benchmark scores. What truly determines delivery quality is whether a model can understand design intent from vague requirements, adhere to numerous implicit project conventions, and follow the developer’s architectural thought process. Driven by these engineering demands, this article explores the division of labor between large and small parameter models and how to implement a practical hybrid approach.

    1. Define the Constraints: Target Users Determine Selection Boundaries

    Before discussing model capabilities, it is crucial to understand the hard constraints of the use case. In many enterprise and public sector projects, strict data security and compliance requirements prohibit the use of certain foreign models and their associated toolchains. This compresses the selection space and shifts the evaluation criteria: the question is no longer “who scores highest on public leaderboards,” but “who can reliably deliver the project within compliance boundaries.”

    A direct consequence of this constraint is that teams often have to work with two categories of models: large-parameter models with stronger context understanding capabilities, and small-parameter models with lower inference costs that are suitable for batch execution. Orchestrating both on the same pipeline is the real challenge for engineering managers.

    2. Differences in Understanding Ambiguous Instructions

    When writing code, a model must do more than just “get the job done.” In real-world projects, requirements are often incomplete: product managers provide goals, architects provide constraints, and developers must fill in the boundary conditions. Whether a model can infer true intent based on context becomes a key dividing line.

    Small-parameter models do not lack understanding entirely, but they demand highly complete prompts. You must write boundary conditions with absolute clarity, leaving no room for ambiguity. If an instruction contains a slightly generalized phrase like “add a lock to related records,” a small model tends to bind the lock to the nearest literal noun. The result is often code that “runs and passes tests, but deviates from the design intent.”

    The advantage of large-parameter models lies precisely here: they can infer what the developer actually wants by combining context, code structure, and naming conventions. Even if benchmark scores are similar, the actual experience difference is often significant—though at the cost of higher inference overhead. This is not to disparage small models, but to clarify their respective optimal use cases.

    3. An Exclusive Lock Case: Passing Tests ≠ Correct Design

    Consider an enterprise system involving data management and archive management. Archives depend on data records. To ensure operational safety, an exclusive lock is required. Suppose the developer simply states, “add an exclusive lock to archive operations” without specifying the lock granularity. A small-parameter model will likely default to locking the archive’s folder ID.

    Is this approach useful? Yes, and it will pass tests. However, it deviates from the design intent. A more robust approach is to lock the data’s primary key directly: when performing archive operations, exclusively lock the entire associated data record. This not only simplifies the code and locking logic but also avoids a hidden risk—where the backend performs a data operation while another user deletes the entire data record, leaving the archive dangling.

    1. Not recommended: lock(archive.folderId) // Granularity mismatch, no mutual exclusion when data is deleted
    2. Recommended: lock(data.primaryKey) // Aligns with data lifecycle, simpler logic

    This case illustrates that small models are highly efficient at executing explicit tasks, but they often fall short when considering cross-module impacts like “who might delete this data record in the future.” Such scenarios highlight the value of large-parameter models—not because they write more code, but because they think more comprehensively.

    4. Contract Adherence: What Formal Projects Actually Care About

    Some argue that emphasizing a model’s understanding of design intent contradicts “wishful programming.” In reality, it does not. Wishful programming aims to “build something that works,” whereas formal projects require the model to follow various implicit contracts and design along the developer’s own thought process.

    These contracts include: naming conventions, layering rules, error code systems, logging formats, transaction boundaries, and the team’s existing abstraction habits. Sometimes, even if a mathematically superior solution exists, teams will deliberately abandon it to maintain project readability and team consistency after evaluating performance trade-offs. Only models capable of consistently understanding context can handle these trade-offs. Small models execute explicit tasks well, but they will not proactively safeguard these implicit conventions for you.

    5. Comparison in Evaluation and Review Scenarios

    This difference is even more pronounced in “soft tasks” like code reviews or technical proposal evaluations. When asked to evaluate a technical comment, small-parameter models often fail to grasp the core point, tend to compromise, give non-committal responses, or even argue for the sake of arguing. Large-parameter models, on the other hand, are better at distilling the core argument of a statement into a single sentence, judging whether it makes sense, identifying its basis, and defining its boundaries.

    For engineering teams, this means the division of labor can be much clearer: assign tasks that require “distilling viewpoints, identifying risks, and aligning designs” to large-parameter models; assign tasks that require “batch rewriting, template generation, and executing explicit rules” to small-parameter models.

    6. Practical Recommendations for a Hybrid Architecture

    In summary, for projects operating under strict compliance constraints, a pragmatic approach is a hybrid architecture combining large and small parameter models:

    • Large-parameter models for design and review: Requirement clarification, proposal deduction, cross-module decisions (like lock granularity and transaction boundaries), code reviews, and risk identification.
    • Small-parameter models for execution and batch processing: Rule-based code rewriting, boilerplate generation, documentation organization, unit test completion, and other cost-sensitive tasks.
    • Prompt-level fallbacks: Even when using large models, explicitly write out key constraints. Treat context “inference” as a bonus, not a dependency.
    • Establish a team contract checklist: Crystallize conventions for naming, layering, and lock granularity into reusable prompt templates to reduce reliance on the model’s situational understanding.

    The conclusion is that model selection should return to engineering objectives. Under compliance constraints, using large-parameter models to bridge the gaps in understanding and contract adherence, while leveraging small-parameter models for explicit execution tasks, is the only way to strike a balance between cost, delivery quality, and long-term maintainability.