A Practical Guide to LLM-Assisted Requirements Document Completion

    This article explains why large language models often fail at completing requirements documents and how to fix it. It covers two common failure modes—restructuring existing outlines and inventing constraints that are not in the input—and presents engineering countermeasures: machine-checkable output contracts, breaking tasks into a pipeline, human review loops with source annotations, and concise prompt rules with an explicit refusal option. It also recommends building a small in-house evaluation set with metrics such as structural consistency, item accuracy, hallucination rate, and rework count. The focus is on model discipline rather than creativity.

    1. Why Requirements Document Completion Is Hard

    In the software development lifecycle, the requirements document is the first critical artifact that carries an idea toward implementation. In practice, many teams do not ask a model to generate an entire document from scratch. Instead, a person writes a rough feature list first, then uses a large language model to fill in details such as boundary conditions, exception flows, and acceptance criteria, and finally consolidates the result back into the document. This collaboration model—“humans define the skeleton, the model adds the flesh”—places very different demands on the model than “write a piece of code” or “polish a paragraph.”

    The real difficulties come down to three points:

    1. Structure preservation: Does the model strictly follow the hierarchy and numbering provided by the caller, rather than reorganizing the information architecture?
    2. Detail completion: Can the model add valuable implementation constraints, exception branches, and acceptance criteria under each existing node?
    3. Multimodal transcription reliability: When the input is a UI screenshot or a table image, can the model faithfully reproduce it instead of filling in content that “looks like it should be there”?

    Together, these three points determine whether a model is actually usable in requirements engineering, not whether it looks smart.

    2. Two Typical Failure Modes

    2.1 Unauthorized Restructuring: Altering Existing Structure

    Suppose the feature list provided by a person contains only four items: A, B, C, and D, and the expected output is further subdivision under each item. The first failure mode is the model deleting one of them, merging two of them, or even adding a new item E, along with an explanation like “E is derived from B and C.” In terms of generation fluency, this looks creative. From a requirements management perspective, however, it is high-risk behavior: requirement items often map one-to-one to schedules, test cases, and acceptance sheets, so adding or removing items directly triggers downstream rework.

    2.2 Fabrication: Constraints Not Present in the Input

    The second failure mode is more subtle. When converting a table screenshot into structured text, the model may output feature items that do not exist in the screenshot. Even if you zoom in on the image and explicitly state in the prompt that “this module does not have this feature,” the model may still insist that it exists. This kind of problem is extremely costly during requirements review, because fabricated items can be mistaken for real scope and enter the schedule.

    The common root cause of both failure modes is that the training objective of general-purpose LLMs is biased toward “generating the most reasonable and complete text,” whereas requirements completion demands exactly the opposite—restraint: expansion is allowed only within the existing skeleton, and changing the skeleton itself is not.

    3. Engineering Countermeasures

    3.1 Constrain Output with a Structured Contract

    Do not describe requirements only in natural language. Instead, provide a machine-checkable output contract. For example, specify a JSON structure and state clearly that “the key set must be exactly the same as the input”:

    1. {
    2. "items": [
    3. {"id": "A", "children": ["A1", "A2"]},
    4. {"id": "B", "children": ["B1"]}
    5. ],
    6. "constraints": [
    7. "The id set of items must be exactly the same as the input",
    8. "Adding, deleting, or merging any item is forbidden",
    9. "children may only be extended under the parent node"
    10. ]
    11. }

    Pair this with executable validation logic to turn “whether the model obeys” into a question that can be judged automatically:

    1. def validate(original, generated):
    2. assert set(original) == set(generated), "The item set was modified"
    3. for k in original:
    4. assert generated[k].startswith(k), f"Structure of {k} was broken"
    5. return True

    3.2 Reduce Single-Task Complexity

    Asking the model to perform four actions at once—“recognize + transcribe + complete + format”—compounds the probability of errors. A more reliable approach is to split the work into a pipeline: first perform layout and cell recognition, then do plain-text transcription, and finally do structured completion, keeping intermediate artifacts at every step so that the problematic stage can be located.

    3.3 Build a Human-Model Verification Loop

    For multimodal transcription results, adopt a “sampled review” strategy: have the model annotate the source region coordinates or original text snippet for each item, so that a person only needs to check the annotated parts. Items without source annotations are all treated as suspicious and sent directly to the manual review queue, rather than accepted by default.

    3.4 How to Organize Prompts

    In practice, you will find that a larger model does not necessarily follow lengthy system prompts better. A more reliable approach is to write constraints as short items, place them close to the task, and use examples to fix the output pattern:

    1. Rules:
    2. 1. If the input has N top-level items, the output must have exactly N, in the same order.
    3. 2. Only sub-items under each top-level item may be added.
    4. 3. If information is insufficient, output "INSUFFICIENT". Do not guess.

    Rule 3 is especially important: giving the model a legitimate way to refuse can significantly reduce fabrication.

    4. Model Selection and Evaluation Recommendations

    Rather than relying on someone else’s horizontal benchmark conclusions, build your own small evaluation set: prepare 20 to 50 real requirements snippets and screenshots, define four metrics—structural consistency rate, item accuracy rate, fabrication rate, and rework count—and run low-cost comparisons through a unified model access layer. Conclusions obtained this way are strongly correlated with your own business distribution and are far more reliable than abstract rankings.

    If you need to extend capability boundaries, you can combine general cloud service categories: use object storage to keep original screenshots and intermediate artifacts, use a message queue to decouple pipeline stages, use a container platform to run batch evaluation jobs, and use logging and monitoring/alerting services to track fluctuations in metrics such as the fabrication rate.

    5. Conclusion

    The requirements document completion scenario truly tests a model’s discipline, not its creativity. Only by making structural constraints contractual, breaking the task chain into fine-grained steps, automating verification, and retaining human final review can you strike a balance between efficiency and controllability. Tools will keep evolving, but the engineering methods above have long-term reusable value.