Comparing Large Language Models for Requirements Document Completion: A Practical Evaluation

    This article compares large language models on a practical requirements-engineering task: completing details in an existing requirements document without rewriting its structure. It defines three evaluation dimensions—structure preservation, instruction adherence, and factual consistency—describes common failure modes and how to mitigate them, and provides a reusable prompt skeleton. It also covers engineering practices for converting images into structured text and a versioned evaluation approach for model selection. Readers will learn how to set hard acceptance criteria and automated validation to get predictable, high-quality output.

    1. Why Completing Details Matters More Than Rewriting Requirements

    In real software development workflows, a requirements document usually starts as a rough feature list from the business side or a product manager. Technical staff then fill in boundary conditions, interaction details, and acceptance criteria. The core need is incremental expansion on an existing structure, not letting the model reorganize the information architecture.

    If a model deletes items, merges items, or invents new ones on its own, the baseline for requirements review breaks. Task breakdown, effort estimation, and test case design all drift as a result. So when evaluating whether a model fits requirements organization work, the key question is not whether it can produce a document that “looks more complete.” It is whether it strictly respects the boundaries of the input list.

    2. Three Core Evaluation Dimensions

    2.1 Structure Preservation

    Structure preservation means the top-level items in the output correspond one-to-one with the input list: nothing added, nothing removed, nothing renamed. The acceptance criterion can be described with this schematic:

    1. Input: [A, B, C, D]
    2. Expected output:
    3. A -> A1, A2, A3
    4. B -> B1, B2
    5. C -> C1, C2
    6. D -> D1, D2
    7. Check: set(output top-level items) == set(input top-level items)

    If the top-level item sets do not match, the result fails, regardless of how good the added content is.

    2.2 Instruction Adherence

    Instruction adherence checks whether the model outputs in the specified format: whether it uses the required hierarchy, whether it adds extra explanatory reasoning, and whether it introduces new concepts without authorization. Weak adherence usually shows up as treating “completion” as “optimization,” or treating “add details” as “propose improvements,” which produces a large amount of unrequested content.

    2.3 Factual Consistency

    In image-to-structured-text scenarios, factual consistency means the model transcribes only what is visible and does not fill in fields that “should exist” based on common sense. This dimension is the easiest to overlook, yet it directly affects downstream usability: one extra, nonexistent feature item can lead developers to implement the wrong logic.

    3. Typical Failure Modes and How to Avoid Them

    Failure Mode 1: Altering the List Without Permission

    This shows up as deleting input items, merging similar items, or renaming items. To avoid it, explicitly state in the prompt that “top-level items must not change,” and require the model to echo the input list before expanding it.

    Failure Mode 2: Inventing Content

    This shows up as adding items that do not exist in the input, along with reasoning-style explanations. To avoid it, constrain the output scope and make clear that “only sub-items may be added under existing items.”

    Failure Mode 3: Unfaithful Recognition Results

    This shows up as mixing speculation into transcribed image content, and sticking to the original judgment even after the error is pointed out. Mitigations include improving input image clarity, adding explicit constraints such as “this module does not have a certain feature,” and using segmented verification instead of transcribing the whole image in one pass.

    A Reusable Prompt Skeleton

    1. Role: Requirements document completion assistant
    2. Hard constraints:
    3. 1. Top-level items must exactly match the input, order unchanged, no additions or deletions
    4. 2. Add only 2-4 sub-items under each top-level item
    5. 3. Do not output reasoning steps or extra explanations
    6. Output format: hierarchical list
    7. Echo the input list first, then output the completion result

    4. Engineering Practices for Image-to-Structured-Text Conversion

    Image transcription should be treated as a separate data processing pipeline, not a single simple model call. The recommended flow is: image preprocessing (upscaling, cropping, contrast enhancement) → region-by-region transcription → structured validation → manual spot checks. The validation step can automatically compare the field set against the expected template; if the diff is non-empty, the result is sent back for retry, preventing incorrect content from flowing into development.

    5. Selection and Evaluation Method

    Do not rely on a single subjective experience to make selection decisions. A more reliable approach is to build a small evaluation set covering four sample types: “plain text list completion,” “list completion with constraints,” “clear image transcription,” and “blurry image transcription.” Prepare several cases for each type, score them on the three dimensions above, and produce comparable quantitative results.

    Model capabilities keep iterating, so the evaluation set should be version-controlled and regression-tested regularly. For enterprise applications, a unified model access layer can hide differences between underlying models, and combined with logging services and monitoring alerts, it can continuously track the output pass rate, balancing cost, latency, and quality. Baidu AI Cloud provides general capabilities in model services and engineering governance, which can serve as a reference direction for building such an evaluation and access system.

    6. Conclusion

    Requirements organization work needs a “predictable expander,” not a “rewriter with ideas.” Only by treating structure preservation, instruction adherence, and factual consistency as hard acceptance criteria, together with standardized prompts and an automated validation pipeline, can you reliably get high-quality requirements document output and let large language models fit into the development workflow instead of adding rework cost.