Selecting LLMs for Requirement Completion and Screenshot-to-Markdown Table Transcription

    This article covers two routine engineering tasks where large language models assist developers: completing requirement documents with structured sub-items, and transcribing table screenshots into Markdown. It explains the main failure modes, including structural drift and hallucinated content, proposes evaluation dimensions for model selection, and describes engineering practices such as constrained prompts, programmatic validation, risk-based model routing, and human review.

    In daily R&D collaboration, including requirement writing, prototype organization, and screenshot transcription, large language models have become more than question-answering tools. They now function as productivity components that help organize information and restructure content. However, models differ noticeably in how well they follow structure, keep facts consistent, and control hallucinations. A poor model choice may only mean rewriting prompts several times in the short term. In the long run, it can introduce requirement drift, distorted documents, and higher communication costs.

    This article does not focus on any specific product. It abstracts the problem into two general capabilities: structured completion of requirement documents, and reliable transcription of table screenshots into Markdown. It also presents practical evaluation methods and engineering practices.

    1. Background: Two Common Tasks, Two Core Risks

    The first task is requirement document completion. Developers typically provide a rough feature list, for example four top-level features A, B, C, and D. They then ask the model to add sub-features, boundary conditions, exception flows, and acceptance criteria. The key is not to rewrite the requirement document, but to perform controlled expansion on the existing structure. An ideal output keeps all top-level items unchanged and adds only sub-items traceable to their parents. For example, under A the output adds A1, A2, and A3. Under B it adds B1, and under C it adds C1 and C2. If the model deletes B, renames C, or invents a new E, the output breaks the requirement baseline, even when the new content looks reasonable.

    The second task is converting table screenshots from online documents into Markdown. The Markdown is then passed to AI coding tools or document systems for further processing. This task looks like optical character recognition, but it also involves layout understanding, table structure reconstruction, field alignment, and fact checking. A model may misread characters, merge the wrong columns, or infer a feature that does not appear in the screenshot. A more serious problem occurs when a user explicitly states that a module does not have a certain feature, yet the model insists on its incorrect conclusion. Such hallucinations directly contaminate downstream development inputs.

    Model selection therefore should not focus only on which answer looks better. It should focus on which model stays stable under constraints, produces results that can be verified, and can be safely written back into the document.

    2. Evaluation Dimensions: From Subjective Impression to Acceptance Criteria

    We recommend establishing the following dimensions:

    1. Structure adherence: Whether the set of top-level items in the output exactly matches the input. Whether the order, names, and hierarchy are preserved. Whether new content is attached to the correct parent item.
    2. Factual consistency: Whether the output comes from the input or is explicitly marked as a suggestion. Whether transcribed content from a screenshot includes only visible content. Whether uncertain items are left blank rather than fabricated.
    3. Traceability: Whether each sub-item can be traced to its parent item or screenshot region. Whether the output supports diff comparison and manual spot checks.
    4. Stability: Whether results vary too much across repeated runs of the same input. Whether the model consistently follows the constraints in the prompt.
    5. Latency and cost: Whether high-quality transcription can finish within an acceptable latency. Whether high-risk tasks justify a slower but more reliable model.
    6. Repairability: Whether the output format is easy to validate programmatically, retry locally, and correct manually.

    These dimensions are more reliable than one-off subjective comparisons. Models follow system prompts and structured constraints to different degrees, and no single prompt pattern works for every model. A more effective approach is to prepare a small self-test set, run low-cost side-by-side comparisons through a unified model access layer or an aggregation gateway, and then route tasks according to their risk level.

    3. Requirement Document Completion: Controlled Expansion, Not Rewriting

    Prompts for requirement completion should state explicitly that the model may only expand the document, not rewrite it. The following constraint template works:

    1. You are a requirement document expansion assistant. Complete the details based on the input list.
    2. Hard constraints:
    3. 1. Top-level items must match the input exactly. Do not add, delete, rename, or reorder them.
    4. 2. Only add sub-items under top-level items.
    5. 3. Every sub-item must be traceable to its parent item.
    6. 4. Mark uncertain content as "pending confirmation". Do not invent business rules.
    7. 5. Output structured data that includes the parent ID, sub-item ID, description, acceptance criteria, and pending confirmation items.
    8. Input: A, B, C, D.

    The expected behavior is expansion. Under A, the model adds A1, A2, and A3. Under B, it adds B1. Under C, it adds C1 and C2. Under D, it adds D1 and D2. Even if the model believes B could be merged into C, it should not delete B in a completion task. It can propose the merge in a suggestion section, but it must not change the main structure. Rewriting is more dangerous. A rewriting model makes arbitrary deletions and changes, and it may even add E while explaining it as a derivation from B and C. For a requirement baseline, this kind of inventive output is risky.

    From an engineering perspective, add programmatic validation. The set of top-level items must be identical to the input. Every sub-item’s parent ID must exist. New top-level items should be rejected outright. Renamed items should be detected through string similarity checks. All pending confirmation items should go to a manual review queue. When writing back to the document, use diff comparison and accept only confirmed expansion blocks. This prevents the model’s output from overwriting the entire document.

    4. Table Screenshot to Markdown: Transcribe First, Validate Second

    Split the transcription process into a pipeline: screenshot preprocessing, region slicing, cell-by-cell transcription, structure reconstruction, fact validation, and manual review. The prompt should emphasize four rules: transcribe only visible content, do not infer features that do not appear, leave uncertain characters blank, and do not fill in information from outside the screenshot. For complex tables, slice by rows and columns before merging. This reduces misalignment.

    Pseudocode:

    1. regions = slice_table(image)
    2. for region in regions:
    3. md = model.transcribe(region, rules="transcribe only visible cells; do not infer; leave uncertain cells blank")
    4. validate_structure(md, region)
    5. flag_low_confidence(md)
    6. merge_and_review(md_blocks)

    The key to preventing hallucinations is a second validation step that relies only on the screenshot. Ask the validation step whether a given feature appears in the screenshot, and require the region coordinates or cell position as evidence. If the position cannot be located, mark the item as “unverified.” When a user explicitly states that a module does not have a certain feature, write that statement into the prompt as a hard constraint, and add a validation item to the output that prohibits new features. For high-risk tables, use a slower but more reliable model for the final transcription, or cross-validate with two models. Manually confirm only the cells where the two models disagree.

    5. Model Selection and Deployment: Risk Tiers and Multi-Model Routing

    Requirement document completion is a high structural risk task. Prioritize models with strong structure adherence that make minimal changes. For creative exploration and solution brainstorming, a more active model may be appropriate. Its output must go into the suggestion section and must not be written directly into the baseline. Screenshot-to-Markdown is a high factual risk task. Prioritize models that transcribe stably, are willing to leave cells blank, and can flag uncertain items. Keep manual review in place for this task.

    We recommend task-level routing. Use low-cost models for low-risk drafts, constraint-oriented models for high-risk baselines, and dual-model cross-validation for key facts. Combined with an agent workflow and human oversight, split slicing, transcription, validation, and diff comparison into separate tool steps, and let people make the final factual confirmation. Continuously record the structure adherence rate, hallucination rate, and write-back correction rate on the self-test set. Only then can model selection move from gut feeling to measurable acceptance criteria.