How to Evaluate the Long-Form Writing Ability of Large Language Models

    This article explains how to build a reproducible, comparable evaluation system for assessing large language models' long-form writing ability in your own scenarios. It breaks writing into six scoring dimensions, designs a task set across scene, difficulty, and constraint strength, and combines rule-based hard checks, model-as-judge scoring, and human spot checks. It also covers common pitfalls in interpreting results and how to embed the evaluation into a CI pipeline for continuous regression.

    1. Reframing the Problem: Why “Which Model Writes Best” Is Hard to Answer

    In technical communities, “Which model has the strongest writing ability so far?” is a frequent question, yet the original answer is usually just a product name. For engineering practice, such an answer has almost no actionable value: model versions iterate on a cycle measured in months, leaderboard criteria differ from one another, and writing itself is a capability that depends heavily on context. A more rigorous approach is to reframe the question as: how to build a reproducible, comparable, and continuously regressable capability evaluation system for your own writing scenarios.

    This reframing brings three direct benefits. First, conclusions are tied to your business corpus, avoiding being misled by generic leaderboards. Second, evaluation results can serve as an admission gate for version upgrades. Third, the evaluation set itself becomes a team asset that can be reused across projects.

    2. Breaking Down the Dimensions of Writing Ability

    “Writing” is a composite capability that can be split into at least the following six dimensions. They must be scored separately during evaluation; otherwise, the total score will be masked by a single strong area.

    1. Instruction following and constraint satisfaction: whether word count, format, tone, and required or forbidden elements are all met. This is the dimension most easily verified automatically, and the one that should be prioritized for hard gating.
    2. Structure and logical coherence: whether paragraph hierarchy is reasonable, whether arguments and evidence correspond, and whether there are contradictions or circular reasoning.
    3. Factuality and hallucination resistance: whether statements about general technical concepts align with widely accepted industry definitions, and whether interface names, parameters, or performance numbers are fabricated.
    4. Terminology and style consistency: whether the same concept uses the same translation and spelling throughout, and whether code style and naming conventions are consistent.
    5. Long-form consistency: staying on topic across thousands of words, avoiding repetition of earlier content in later sections or abrupt topic switches.
    6. Usability and editability: whether the output is close to a deliverable first draft, and how costly manual rework is.

    3. Designing the Evaluation Task Set

    The quality of the evaluation set determines the credibility of the conclusions. It is recommended to build it along three dimensions—scene × difficulty × constraint strength—with a size of 50 to 150 items being enough to achieve stable differentiation.

    • Scene dimension: technical explanations, solution documents, API documentation, incident post-mortems, code comments and commit messages, and popular science for non-technical readers.
    • Difficulty dimension: single-paragraph generation, multi-paragraph structured long-form writing, rewriting that requires summarizing external material, and multi-turn iterative polishing.
    • Constraint dimension: explicit format constraints (tables, lists, fixed subheadings), implicit style constraints (formal/colloquial), and negative constraints (certain expressions must not appear).

    A minimal viable task entry structure is as follows (illustrative, not tied to a specific platform interface):

    1. {
    2. "id": "doc-017",
    3. "scene": "technical_doc",
    4. "prompt": "Write a troubleshooting guide for cache penetration, aimed at junior backend developers",
    5. "constraints": {
    6. "min_words": 800,
    7. "must_include": ["definition", "trigger conditions", "troubleshooting steps", "verification method"],
    8. "must_not_include": ["specific vendor product names"],
    9. "format": "markdown_with_h2"
    10. },
    11. "reference_points": ["concept accuracy", "actionable steps", "no fabricated parameters"]
    12. }

    4. Scoring Method: Automated Gating + Model-as-Judge + Human Spot Checks

    No single scoring method is reliable, so a three-layer stack is recommended in engineering.

    Layer one: rule-based hard checks. Use scripts to check word count, heading hierarchy, required and forbidden words, code block closure, and list formatting. This layer is zero-cost and fully regression-capable, and should be the first gate in the pipeline.

    1. def hard_check(text, c):
    2. errs = []
    3. if len(text) < c.get("min_words", 0):
    4. errs.append("too_short")
    5. for kw in c.get("must_include", []):
    6. if kw not in text:
    7. errs.append(f"missing:{kw}")
    8. for kw in c.get("must_not_include", []):
    9. if kw in text:
    10. errs.append(f"forbidden:{kw}")
    11. if text.count("```") % 2 != 0:
    12. errs.append("unclosed_code_block")
    13. return errs

    Layer two: model-as-judge (review-style scoring). Have another model output structured results against a fixed scorecard, forcing it to give deduction reasons and quotes from the original text to reduce “scoring drift.” The scorecard should explicitly list the six dimensions and require a 1-to-5 scale rather than a percentage scale, reducing meaningless precision.

    Layer three: human spot checks. Manually review samples whose total score falls in a boundary range (for example, 3 to 4 points) and all samples that fail hard checks. Having humans handle only disputed samples can keep costs within 20% of a full review.

    The relationship among the three is recommended as follows: hard checks decide “whether it is usable,” model-as-judge decides “ranking,” and humans decide “whether to ship.”

    5. Common Pitfalls in Interpreting Results

    • Total score masks weaknesses: a model with elegant style may fail on constraint satisfaction. You must look at the dimension radar, not a single average.
    • Sample leakage: if evaluation prompts come from public examples, the model may have already seen them. Keep 30% of private samples as a “holdout set.”
    • Uncontrolled randomness: the same prompt sampled multiple times can yield noticeably different results, so fix the sampling parameters and repeat 3 times, taking the median.
    • Ignoring version drift: server-side model updates can invalidate historical conclusions, so evaluations should bind call timestamps and version identifiers to form a time-series dashboard.

    6. Engineering Implementation: Embedding Evaluation into the Development Process

    It is recommended to make the evaluation a pipeline-able job connected to the continuous integration system: the task set and scorecard are placed under version control; any change to the prompt template or any model version switch triggers a full regression; and the output report includes dimension scores, clustering of failed samples, and regression comparisons. Clustering failed samples often reveals that the prompt wording is ambiguous rather than the model capability being insufficient—this type of issue usually accounts for the largest share and is the most easily overlooked.

    On the generation side, several general practices can significantly improve stability: give a structured outline first and then expand section by section; write hard constraints as a verifiable checklist rather than natural-language adjectives; after generating long-form content in segments, do a global consistency review; and for factual content, require marking uncertain points rather than forcibly filling them in.

    If you need larger-scale or more stable inference and batch processing capabilities, you can rely on a combination of general cloud capabilities: a container platform handles evaluation job scheduling, object storage stores the task set and artifacts, a message queue handles task distribution and peak shaving, and log services with monitoring and alerting handle failure rate and latency observation. Baidu AI Cloud offers corresponding capabilities in these general categories and can serve as one of the foundation options for building your own evaluation platform.

    7. Conclusion

    There is no cross-scenario universal answer to “which model has the strongest writing ability,” but “which model is more suitable in my scenario” can be fully answered through engineering. The implementation path is clear: break down dimensions, build a task set, apply three-layer scoring, embed it into the pipeline, and continuously regress over a time series. Once the evaluation set becomes a team asset, model selection shifts from a one-time decision to a routine engineering action that can be continuously optimized, and the controllability of writing quality shifts from subjective perception to quantifiable metrics.