LLM-Assisted Requirements Documentation: Capability Differences and Engineering Practices

    This article examines how large language models differ when used to draft software requirements documents, focusing on three observable dimensions: structure fidelity, detail completeness, and multimodal reliability. It outlines common failure modes such as structural rewriting, content fabrication, instruction drift, and visual misreading, then presents practical engineering countermeasures: explicit output contracts, automated validation with fallback, divide-and-conquer prompting, preprocessing for multimodal inputs, and a human-in-the-loop review checklist. The conclusion recommends prioritizing instruction-following stability and constraint-based output over raw generation speed.

    1. Why the Requirements Stage Exposes Model Differences

    In the software development lifecycle, the requirements document is the pivotal artifact that connects upstream business goals with downstream design, development, and testing. A common workflow for using an LLM here is to draft the feature skeleton yourself, ask the model to fill in boundary conditions, exception flows, and acceptance criteria, and then merge the output back into the document manually.

    The hard part of this workflow is not generating text. It is controlled expansion under constraints: the model must preserve existing numbering and hierarchy, append details only under the specified nodes, leave user-confirmed structure untouched, and avoid introducing features that do not exist in the document. If the model rearranges the structure or invents content on its own, review costs rise quickly.

    2. Three Observable Capability Dimensions

    2.1 Structure Fidelity

    Given a feature list A, B, C, D, the ideal output expands sub-items under each node:

    1. A
    2. A1 Preconditions
    3. A2 Main flow
    4. A3 Exception branches
    5. B
    6. B1 Input validation
    7. C
    8. C1 Permission scope
    9. C2 Audit logging
    10. D
    11. D1 Compatibility strategy
    12. D2 Rollback plan

    The evaluation criteria: no nodes removed, none added, none renamed, and numbering that remains machine-parseable.

    2.2 Detail Completeness

    A qualified completion should cover preconditions, main flow, exceptions and boundaries, permissions and compliance, data and instrumentation, and acceptance criteria. Quality depends on how well the details fit the business context, not on piling up generic boilerplate.

    2.3 Multimodal Reliability

    When the input is a UI screenshot or a table image, the model must handle layout understanding, cell alignment, and format restoration. Reliability means not inventing fields absent from the image, not merging or splitting cells, and producing a Markdown table that downstream tools can consume directly.

    3. Typical Failure Modes and Causes

    • Structural rewriting: models tend to “optimize” the input by rearranging the list into a hierarchy they consider more reasonable, breaking the numbering scheme.
    • Content fabrication: when information is insufficient, the model substitutes probabilistic completion for factual grounding and generates features that are not in the image or document.
    • Instruction drift: across multiple turns, early constraints are gradually diluted and the output drifts away from the original format requirements.
    • Visual misreading: low resolution, dense tables, and similar field names cause row misalignment; the model may still hold its incorrect conclusion even when challenged.

    4. Engineering Practices That Work

    4.1 Constrain Output with an Explicit Contract

    Fix immutable rules in the prompt and make them machine-verifiable:

    1. Rules:
    2. 1. Only add sub-items under the given nodes; do not delete, merge, or rename existing nodes.
    3. 2. Sub-item numbering is parent number + sequence number.
    4. 3. Do not introduce feature items outside the list.
    5. 4. Output plain-text hierarchy only, with no explanatory paragraphs.

    4.2 Add Automated Validation and Fallback

    Run a structural diff on the model output; if the node set does not match the original list, retry automatically or fall back:

    1. def validate(original, generated):
    2. return set(original) == set(generated)
    3. # On mismatch, reduce freedom: narrow the completion scope and process in batches

    4.3 Divide and Conquer

    Split requests by feature module, complete each block separately, then merge. This significantly reduces the probability of instruction drift and omissions.

    4.4 Preprocess Multimodal Inputs

    Increase screenshot resolution, crop by module, and run a pure transcription pass first (output only the text visible in the image) before structuring. Separating these two steps effectively suppresses fabrication.

    4.5 Close the Loop with Human Review

    Treat model output as a draft and pair it with a checklist-based review: structural consistency, terminology consistency, testability, and no fabricated items. On the enterprise side, the workflow can be deployed on container platforms and logging services such as those offered by Baidu AI Cloud, enabling batch task scheduling, result traceability, and quality monitoring.

    5. Selection Guidance and Conclusion

    For requirements documentation, prioritize a model capability combination with stable instruction following, high structure fidelity, and support for constraint-based output, rather than raw generation speed or writing flair. The practical path is: first establish a structural contract and automated validation, then introduce the two-step multimodal transcription flow, and finally close with human review. Done this way, an LLM genuinely becomes an assistant for expanding ideas rather than a variable that rewrites requirements.