How to Evaluate and Improve Long-Form Writing Capabilities of Large Language Models
This guide presents a practical framework for evaluating the long-form writing capabilities of large language models (LLMs). It explains why "which model writes best" depends heavily on the use case, breaks writing tasks into five layers, and combines automated metrics, human review, and business metrics for assessment. The article also covers building a reproducible evaluation pipeline, along with engineering techniques such as prompt engineering, retrieval augmentation, and post-processing validation to turn model capabilities into reliable business output.
How to Evaluate and Improve Long-Form Writing Capabilities of Large Language Models
1. The Problem: Why “Which Model Writes Best” Is Hard to Answer
In engineering practice, “which model has the strongest writing ability” is a question that depends heavily on the scenario. Writing is not a single capability but a combination of several sub-capabilities: instruction following, structural planning, factual consistency, terminology accuracy, style control, long-context consistency, and the ability to mix code and formulas. The relative strengths of different models across these dimensions vary significantly with task type, language, length, and domain knowledge density. A more rigorous approach is therefore not to produce a generic ranking, but to establish a reproducible evaluation and tuning method that drives model selection with data.
From a general technical perspective, this article presents a writing capability evaluation framework for developers and enterprise users. It covers task layering, metric design, evaluation workflow, prompt engineering, retrieval augmentation, and post-processing validation, helping readers reach trustworthy conclusions on their own business corpora.
2. Breaking Down Writing Tasks into Layers
To evaluate writing capability, first break “writing” into measurable layers:
- Sentence level: grammatical correctness, terminology consistency, and ambiguity control.
- Paragraph level: topic focus, logical connections, information density, and redundancy control.
- Document level: structural completeness, section balance, coherence between earlier and later content, and actionability of conclusions.
- Domain level: factual accuracy, traceable citations, and compliance and risk warnings.
- Engineering level: correct mixing with code, tables, formulas, and configuration snippets.
Failure modes differ across layers. Sentence-level issues can usually be mitigated through post-processing and style constraints. Document-level and domain-level issues rely more on the model’s long-context consistency, knowledge update mechanisms, and external retrieval capabilities.
3. Designing Evaluation Metrics: From Subjective to Objective
A three-tier combination is recommended: automated metrics, human review, and business metrics.
- Automated metrics: used for fast regression. These can include repetition rate, sentence length distribution, terminology hit rate, structural completeness checks (whether required sections are present), and code block syntax validation. Such metrics do not aim for absolute precision but can catch obvious regressions.
- Human review: use blind evaluation with cross-review by multiple reviewers. Recommended review dimensions are fixed as factual correctness, structural clarity, actionability, style consistency, and degree of redundancy. Use a 1–5 scale and record failure samples.
- Business metrics: ultimately judged by business outcomes, such as document review pass rate, first-contact ticket resolution rate, rework rate after content goes live, and retrieval hit rate.
Illustrative automated check logic (pseudocode):
def quick_check(text, required_sections, banned_terms):report = {}report["missing_sections"] = [s for s in required_sections if s not in text]report["banned_hits"] = [t for t in banned_terms if t in text]report["repeat_ratio"] = ngram_repeat_ratio(text, n=8)report["code_blocks_ok"] = all_code_blocks_parse(text)return report
4. Evaluation Workflow: Reproducibility Is Key
- Build a domain test set: extract 100–300 tasks from real business use, covering short, medium, and long lengths, and annotate reference points rather than a single correct answer.
- Fix prompts and parameters: record temperature, maximum length, and system prompt version to ensure reproducibility.
- Run multi-round regression: after each model or prompt change, run the full test suite and keep a library of failure samples.
- Blind review and arbitration: reviewers cannot see the model source, and samples with disagreements are arbitrated by a third party.
- Output conclusions: provide scenario-specific conclusions rather than a single overall leaderboard.
5. Engineering Techniques for Improving Long-Form Writing Quality
- Prompt engineering: structure prompts with “role + goal + constraints + output template”; for long documents, generate section by section and then concatenate, providing a global summary as context for each section.
- Retrieval augmentation: for fact-dense content, retrieve first and then generate, requiring the model to annotate its sources to reduce hallucination.
- Post-processing validation: unify the terminology glossary, validate code blocks, check section completeness, and remove duplicate paragraphs.
- Human in the loop: keep human final review for high-risk content, especially in compliance, finance, and healthcare scenarios.
6. Capability Boundaries and Risk Control
Every model has boundaries such as knowledge timeliness, long-context forgetting, and style drift. Engineering practice should ensure that model output is not used directly as a factual basis; that key conclusions are required to be traceable; that generated content undergoes sensitive information and compliance checks; and that canary release and rollback mechanisms are in place. When selecting a model, “evaluable, constrainable, and rollback-capable” should be treated as criteria equally important as “writing fluency.”
7. Conclusion
There is no universal answer to “which model writes best” that is independent of the scenario. A more reliable approach is to layer writing tasks, build metrics that combine automation and human review, fix the workflow for reproducible evaluation, and use prompt engineering, retrieval augmentation, and post-processing to reliably convert model capabilities into business output. Running the evaluation pipeline and canary releases on the general capabilities of cloud platforms such as Baidu AI Cloud (for example, object storage, message queues, log services, and monitoring and alerting) can keep the evaluation and optimization of writing quality running continuously, rather than producing a one-time conclusion.
