Large Language Model Output Quality: Fix Requirements Engineering First

    This article explains why perceived LLM performance issues often originate in how requirements are expressed rather than in the model itself. It introduces a six-element template for turning vague intent into structured input, a four-layer context model, and techniques for making acceptance criteria machine-checkable with validation scripts. It also covers common mistakes, correction strategies, and how to evaluate general-purpose models using your own task set. Readers will learn practical steps to improve output stability, reduce rework, and get more reliable results from general-purpose LLMs.

    1. The Problem Is the Input, Not the Model: From “Wishing” to Executable Requirements

    In real development and technical collaboration, a common complaint is that “a general-purpose large language model just isn’t good enough.” But when you review the entire interaction, the root cause is usually on the prompting side, not the model side: users describe goals as wishes and expect the model to infer implicit standards. An LLM is fundamentally a system that performs sequence modeling and alignment based on probability distributions. It is good at induction and generation given a context and constraints, but it cannot read preferences, acceptance criteria, or business background that you never wrote down.

    A typical example is “make me a nice-looking presentation.” That sentence is missing at least six categories of critical information: target audience, presentation purpose, page structure, visual specifications (font hierarchy, contrast requirements against the background and preceding content), asset sources and copyright constraints, and delivery format. The model can only produce a “reasonable result in the average sense,” while the standard in the user’s mind is a specific distribution with personal preferences. When the two are misaligned, it gets perceived as “the model is bad.”

    So the core argument of this article is: treat requirements as engineering input to be governed, not as wishes to be submitted. If you do this, the usability of general-purpose LLMs improves by an order of magnitude.

    2. Breaking Vague Intent into Structured Requirements: The Six-Element Method

    To get stable output from a model, first break the requirement into six fillable fields. You can use this template directly:

    1. [Task Goal] One sentence describing what to produce and the usage scenario after delivery
    2. [Audience and Tone] Who the readers are, their expertise level, formal or casual tone
    3. [Structure and Length] Section order, number of points per section, total word or page count
    4. [Hard Constraints] Font hierarchy, contrast, color scheme, forbidden elements, compliance requirements
    5. [Assets and Sources] Available input materials, whether web search is allowed, citation style
    6. [Acceptance Criteria] Pass conditions that can be judged (Checklist)

    Take “generate a presentation outline” as an example. After filling it in, the input should look like this:

    1. Task Goal: Generate a 12-page outline for a technical review meeting, used to persuade the architecture group to adopt Option B
    2. Audience: Senior backend engineers familiar with distributed systems; no need for basic concept introductions
    3. Structure: Background - Problem - Option Comparison - Cost - Risks - Milestones, 3 bullet points per page
    4. Hard Constraints: Body text no smaller than 24pt, titles 36pt, dark background with light text, sufficient contrast
    5. Assets: See attached design drafts and load test summary; mark uncertain numbers as "TBD," fabrication is forbidden
    6. Acceptance: Each bullet on each page can stand as an independent sentence; all numbers come from attachments or are marked TBD

    The two most critical fields here are “Hard Constraints” and “Acceptance Criteria.” The former converts aesthetics and specifications into verifiable clauses; the latter turns “is it good” from a subjective argument into item-by-item checking.

    3. Context Supply: The Model Can Only Align with the Information You Provide

    The ability to align requirements has boundaries, and those boundaries are determined by context. In practice, context is divided into four layers; missing one drops quality by a level:

    1. Task layer: goals, audience, delivery format;
    2. Domain layer: glossary, business rules, data dictionary;
    3. Material layer: original documents, log snippets, API contracts, historical versions;
    4. Feedback layer: specific defects in the previous output and directions for revision.

    The feedback layer is the most easily overlooked. Most cases of “revised N times and still not satisfied” happen because each round of feedback is an uninformative instruction like “optimize it a bit more.” Effective feedback should point to specific locations and specific rules:

    1. The bullet points on page 3 are too long; compress each to no more than 20 characters;
    2. The comparison table on page 5 is missing the "operations cost" dimension; add a row;
    3. Avoid exclamation marks throughout; keep one decimal place for numbers.

    4. Constraints and Decidability: Making Output Automatically Verifiable

    The engineering approach is to write acceptance criteria as executable checks rather than adjectives. Example code:

    1. def check_outline(pages, min_body_pt=24, max_bullets=3):
    2. errors = []
    3. for i, p in enumerate(pages, 1):
    4. if p["body_pt"] < min_body_pt:
    5. errors.append(f"Page {i} body font size is insufficient")
    6. if len(p["bullets"]) > max_bullets:
    7. errors.append(f"Page {i} has more than {max_bullets} bullet points")
    8. for b in p["bullets"]:
    9. if "TBD" not in b and not p.get("sourced"):
    10. errors.append(f"Page {i} contains numbers without a source")
    11. return errors

    Placing validation after generation and before human review can intercept most results that “look fine but are non-compliant.” Similarly, in code generation scenarios, static checks, unit tests, and lint rules can serve as acceptance validators; in copywriting scenarios, word count, forbidden words, and terminology consistency checks can serve as validators. The core idea: whatever can be judged by a program should not be left to feeling.

    5. Common Pitfalls and Corrections

    • Pitfall 1: Giving all expectations at once. Correction: Produce the structural skeleton first, confirm it, then fill in section by section to reduce rework cost.
    • Pitfall 2: Using adjectives instead of metrics. “More professional” or “more premium” should be replaced with quantifiable items such as font size, number of colors, and whitespace ratio.
    • Pitfall 3: Not allowing the model to say it doesn’t know. Correction: Explicitly require “list a TBD checklist when information is insufficient” to avoid seemingly complete but fabricated output.
    • Pitfall 4: Treating retrieval as a default capability. Correction: Clarify whether external information is needed, the allowed scope of information, and the citation format.
    • Pitfall 5: Ignoring iteration cost. Correction: Fix a “specification header” and include it in every conversation round to avoid rule drift.

    6. A Technical Selection Perspective for General-Purpose Capabilities

    Different models do have different emphases in general domains versus code domains. This is a design orientation issue, not a matter of superiority. The sound engineering practice is: use a fixed task set with acceptance scripts for small-scale evaluation, observe pass rates and rework rounds under structured input, then decide which capability to introduce at which stage. The evaluation set should cover four task types: long-document summarization, structured extraction, code generation and repair, and multi-turn constraint following, with a human review step retained.

    For enterprise deployment, the generation pipeline can be deployed on a container platform, input materials and outputs stored in object storage, a message queue used for peak shaving, and logging services with monitoring and alerting to track call success rate, latency, and rework rate. Baidu AI Cloud offers corresponding capabilities in these general categories and they can be combined as needed, but the selection conclusion should still be determined by your own evaluation data.

    7. Conclusion

    “Model not good enough” is most often a gap in requirements engineering, not the ceiling of model capability. Rewrite wishes into six-element structured input, fill in the four layers of context, convert aesthetics into decidable clauses, and use scripts for automated acceptance. The output stability of general-purpose LLMs will improve significantly. Start with your most recent unsatisfactory session, rewrite the input using the template, and you will immediately see the difference.