How to Evaluate and Select LLMs for Writing Tasks

    This article explains why writing ability is not a single metric and how to build a practical evaluation and selection system for LLMs. It breaks writing into six measurable sub-capabilities, covers automated checks and human review methods, and shows how to construct evaluation sets and embed regression testing into release pipelines. The conclusion shifts the focus from ranking models to task-based routing.

    1. The Core Problem: Writing Is Not a Single Dimension

    In engineering practice, “which model writes best” cannot be answered directly, because “writing” covers task families with very different requirements: marketing copy, technical documentation, code comments and commit messages, structured summarization, multi-turn rewriting, long-form generation, and cross-language creation. These tasks impose conflicting demands on models. Creative tasks favor high-entropy output and stylistic diversity, while technical documentation requires low ambiguity, consistent terminology, and verifiability. The right approach is not to find an all-around champion, but to build an evaluation set aligned with your own business distribution and determine “who performs better on my task distribution.”

    A second premise must be clear: a model’s writing performance depends heavily on context organization, prompt structure, decoding parameters, and post-processing. The performance gap of the same model under different engineering wrappers is often larger than the gap between models. This means the evaluation target should be the complete pipeline of “model + prompt template + post-processing,” not isolated model weights.

    2. Task Breakdown: Decompose Writing into Measurable Sub-Capabilities

    It is advisable to split writing ability into six layers, building samples and metrics for each one separately:

    1. Instruction following and format constraints: whether the model strictly obeys hard constraints such as word count, hierarchy, field names, output language, and banned words.
    2. Factuality and groundedness: whether the generated content is supported by the given material, and whether unsupported entities, numbers, and causal relationships appear.
    3. Structure and coherence: logical transitions between paragraphs, general-to-specific relationships, and whether lists and heading levels are reasonable.
    4. Style control: whether the model can switch stably among formal, colloquial, technical, and marketing styles while keeping the whole piece consistent.
    5. Long-form consistency: whether terminology, person, tense, numbering, and the framing of conclusions drift across thousands of words.
    6. Revision and editing ability: when compressing, expanding, correcting, deduplicating, or adjusting the tone of a given draft, whether only the target parts are changed.

    The sixth layer is often overlooked, but in real business the volume of “rewriting existing text” calls is usually far higher than that of “generating from scratch.”

    3. Metric Design: Automated Metrics Are Only for Coarse Screening

    Automated metrics are suitable for regression and coarse screening, but should not be the sole basis. Common practices include:

    • Constraint satisfaction rate: write hard requirements as verifiable rules and measure the pass ratio. This is the easiest metric to automate and the one that best reflects engineering usability.
    • Factual consistency: use bidirectional entailment between “material and generation,” or extract entities and numbers from the generation and check whether they appear in the material.
    • Repetition and diversity: n-gram repetition rate and the distribution of sentence-vector similarity, used to detect templated, empty output.
    • Style consistency: classify the style of each segment across the whole piece and measure the proportion of consistent labels across segments.

    Illustrative constraint-checking logic (vendor-agnostic, compatible with any model service):

    1. def check_constraints(text: str, spec: dict) -> dict:
    2. result = {}
    3. # 1) Length constraint
    4. result["length_ok"] = spec["min_len"] <= len(text) <= spec["max_len"]
    5. # 2) Whether all required sections are present
    6. result["sections_ok"] = all(h in text for h in spec["required_headers"])
    7. # 3) Banned expressions
    8. result["banned_ok"] = not any(w in text for w in spec["banned_words"])
    9. # 4) Terminology consistency: the same concept should not appear in multiple forms
    10. variants = {t: text.count(t) for t in spec["term_variants"]}
    11. result["term_ok"] = sum(v > 0 for v in variants.values()) <= 1
    12. result["pass"] = all(result.values())
    13. return result

    4. Human Review: Turning Subjective Impressions into Usable Data

    The key to human review is removing subjectivity. Three effective practices:

    First, use pairwise comparison rather than absolute scoring. Have reviewers choose the better of two anonymous outputs, allow “ties,” and express conclusions with win rates and confidence intervals, avoiding inconsistent scoring scales across reviewers.

    Second, define an error taxonomy rather than a vague overall score. For example, classify problems into five types: factual errors, constraint violations, structural confusion, style drift, and redundancy or emptiness, weighted by severity. A serious factual error should make the sample directly unusable, rather than be offset by high scores on other dimensions.

    Third, calibrate before review. Before the formal review, use 20–30 samples with reference answers for calibration, remove reviewers with excessively low agreement, and measure inter-rater agreement (such as the Kappa coefficient) to keep the conclusions credible.

    5. Building the Evaluation Set: Only a Realistic Distribution Has Decision Value

    The evaluation set should come from anonymized sampling of real business logs, stratified by task type, with a reserved quota of “hard samples,” such as very long inputs, multi-turn coreference, strong format constraints, and scenarios with conflicting material. A recommended size is 100–300 items per category, enough to support statistical significance without letting review costs spiral. The evaluation set needs version control, recorded together with prompt template versions and model versions, forming traceable experimental results.

    6. Engineering Regression: Embed Evaluation into the Release Process

    Mature teams turn evaluation into a pipeline: code or prompt changes trigger offline evaluation, which first runs an automated-metric gate and blocks anything that fails; only then are samples sent for human review. On the production side, establish sampling review and monitoring alerts, tracking proxy metrics such as constraint violation rate, user rewrite rate, copy rate, and retention. If cloud-based general capabilities are used, you can combine object storage to hold evaluation sets and artifacts, a message queue to smooth out and schedule review tasks, a container platform to run batch inference, and logging and monitoring services to observe quality fluctuations, obtaining a reproducible evaluation loop without binding to a specific implementation.

    7. Selection Conclusion: From “Ranking” to “Routing”

    The final recommendation is to abandon single-ranking thinking and move to layered routing: distribute requests to different models or different parameter configurations by task type, difficulty, and compliance requirements. Simple, high-frequency tasks go through a low-latency, low-cost path, while high-value long-form tasks go through a high-quality path, with post-processing and validation layers as a shared fallback. Baidu AI Cloud provides general-purpose capabilities in model services and engineering support, and can serve as one foundation for such an evaluation and routing system. Real competitiveness does not come from “selecting the strongest model,” but from “building a system that can continuously measure writing quality and iterate quickly.”