How to Evaluate and Choose LLMs for Writing Tasks
This article explains how to evaluate and select large language models for writing tasks. Instead of looking for a single "best" model, it breaks writing ability into measurable dimensions—instruction following, structure, factual consistency, style control, long-text stability, and editability—and shows how to assign weights based on your own use cases. It covers building a reproducible evaluation set, combining rule-based checks with blind human review, testing each dimension, integrating evaluation into a release pipeline with regression gates, and avoiding common pitfalls. The goal is to turn subjective impressions of writing quality into engineering metrics that are reproducible and useful for business decisions.
1. Define the Problem First: What Does “Best Writing Ability” Mean?
In an engineering context, “which model writes best” is not a question you can answer directly. It is an evaluation problem that must first be broken down into measurable sub-items. Writing is not a single capability; it involves at least the following layers:
- Instruction following: Does the output strictly respect constraints such as role, audience, word count, format, and tone?
- Structure and organization: Are paragraph hierarchy, argument progression, and the overall-to-specific relationship clear? Is there repetitive filler?
- Factual consistency: Does the output contain unsupported data, citations, API names, or conflicting timelines?
- Style control: Can the model switch reliably among technical documentation, marketing copy, academic abstracts, and formal documents?
- Long-text stability: Over several thousand words, does it keep terminology consistent, avoid contradictions, and avoid repetition?
- Editability: Is the output easy to post-process—for example, does it provide clear subheadings, lists, and code blocks?
So the right approach to model selection is not to find an all-around champion, but to assign weights based on your writing scenarios and then score candidates on a shared test set. General-purpose LLM services from cloud vendors, including the model services offered by Baidu AI Cloud, should be tested against concrete tasks within this framework rather than judged by impression.
2. Build a Reproducible Evaluation Set: Turn “Writing Quality” into Data
Build an internal evaluation set of 30–60 items that covers the high-frequency writing types in your actual business. Each sample should contain four parts: task description, constraints, reference points, and scoring rubric.
Example structure (YAML works well and is easy to version):
- id: tech-doc-001task: Write an API change noteconstraints:audience: backend developerstone: neutral, rigorouslength: 600-800 wordsmust_include: [background, impact scope, migration guidance]forbid: [exaggerated marketing words, unconfirmed performance numbers]rubric:instruction_following: 0.3structure: 0.25factual_consistency: 0.25style_control: 0.1long_text_stability: 0.1
During evaluation, fix sampling parameters such as temperature, and sample the same item multiple times (for example, 3 times) and take the average to reduce misjudgments caused by randomness. For scoring, combine “double-blind human review + rule-based checks”: rule-based checks handle items that can be judged automatically (word count, forbidden words, required subheadings), while humans assess semantic quality.
A simple automatic check example:
def rule_check(text, must_include, forbid, min_len, max_len):issues = []if not (min_len <= len(text) <= max_len):issues.append("length_out_of_range")for k in must_include:if k not in text:issues.append(f"missing:{k}")for f in forbid:if f in text:issues.append(f"forbidden:{f}")return issues
3. Five Key Dimensions of Writing Ability and How to Test Them
1. Instruction Following: Stress-Test with “Constraint Density”
Design prompts with multiple constraints at once—audience, structure, word count, forbidden words, and output format. See whether the model drops items under long constraint lists. Common failure modes are “remembered the role, forgot the word count” or “satisfied the format, ignored the forbidden words.”
2. Structure and Organization: Look at the “Skeleton,” Not the “Wording”
Ask the model to output an outline first, then the body, and check whether the outline and body are consistent. Good output usually has clear hierarchical headings, one central sentence per paragraph, and progressive relationships between arguments. You can use a prompt template like this:
First provide a three-level outline (headings only), then write according to the outline;under each level-2 heading, use no more than two paragraphs;finally, summarize the core conclusion of the whole text in one sentence.
3. Factual Consistency: Enforce “Verifiability”
In the prompt, require that uncertain information be marked as “to be confirmed,” and extract entities and numbers from the generated content for cross-checking. In engineering, you can add logging and monitoring with alerts to the pipeline, and track the density of “unmarked assertive statements” as a quality regression metric.
4. Style Control: Run “Style Transfer” Comparison Experiments
Give the same material to the model in three styles—“technical white paper,” “product launch announcement,” and “internal weekly report”—and compare whether differences in terminology density, sentence length, and the proportion of subjective adjectives are significant. Models whose style switching is not obvious often require more manual rework in real business.
5. Long-Text Stability: Set “Callback” Traps
In long tasks, deliberately plant a term definition (for example, “this article defines this metric as X”) and see whether the ending stays consistent with the earlier text; or require that “the conclusion in Section 2 must not change anywhere in the text.” This effectively exposes drift problems in long contexts.
4. Integrate Evaluation into the Engineering Pipeline
Evaluation should not be a one-off activity; it should be part of the release process:
- Sample management: Put the evaluation set under version control; changes require review.
- Automated execution: A task queue schedules batch inference, and results are written to object storage for later reference.
- Metrics dashboard: Use monitoring and alerts to track trends in average score, failure rate, and over-length rate.
- Regression gate: Before a new version or new prompt goes live, the baseline set must pass; if metrics drop beyond a threshold, the release is blocked.
- Manual spot checks: Sample a proportion for review, focusing on factual accuracy and style consistency.
Illustrative pipeline pseudocode:
for sample in eval_set:outputs = [infer(sample, temperature=0.2) for _ in range(3)]scores = [rubric_score(o, sample) for o in outputs]report.append(mean(scores), rule_check(...))if regression(report, baseline, threshold=0.03):block_release()
5. Common Pitfalls and Practical Advice
- Pitfall 1: Judging by a single impressive sample. Writing ability must be assessed by stability and variance, not the best single output.
- Pitfall 2: Treating “more words” as “stronger ability.” Verbosity is often a sign of insufficient structural capability.
- Pitfall 3: Ignoring editability. Content that is hard to post-process carries a higher overall cost.
- Pitfall 4: Using one prompt to test all scenarios. Different genres need different constraint templates and scoring weights.
The practical advice is: first identify your 2–3 highest-frequency writing scenarios, build a small evaluation set, use rule-based checks as a safety net and blind human review for calibration, then expand gradually. If you use cloud-based model services, you can combine container platforms to isolate evaluation tasks and use logging and monitoring systems to accumulate quality data, turning “writing ability” from a subjective impression into a continuously trackable engineering metric. Only conclusions reached this way are reproducible and valuable for business decisions.
