{"slug": "stop-evaluating-ai-writing-tools-by-how-human-their-output-sounds", "title": "Stop Evaluating AI Writing Tools by How Human Their Output Sounds", "summary": "A developer built a provider-independent Python evaluation framework that checks AI-generated drafts against a defined content specification, testing for required Markdown sections, source presence, word limits and unresolved markers rather than relying on how fluent the output sounds. The framework uses only standard library modules and runs the same spec across drafts from different systems, with a separate human review rubric covering accuracy, relevance, originality, clarity and editing time. The developer notes the automated checks test structural compliance, not truthfulness.", "body_md": "When comparing AI-generated articles, it's easy to prefer whichever output sounds more polished. Unfortunately, fluency is a poor proxy for factual accuracy, instruction adherence and completeness.\n\nWhile working on a comparison of [Jasper alternatives](https://keytomic.com/blog/jasper-alternatives), I started considering how developers and content teams could evaluate writing systems more systematically.\n\nIn this tutorial, we'll build a small, provider-independent Python evaluation framework that checks generated drafts against a defined content specification.\n\nThe goal isn't to replace human reviewers. It's to make evaluations more consistent and catch predictable problems before editorial review.\n\nOur evaluation framework will check:\n\nWe'll use Python 3.10+ and only standard library modules.\n\nStart by describing what an acceptable article should contain.\n\n``` python\nfrom dataclasses import dataclass\n\n@dataclass\nclass ArticleSpec:\n    required_sections: list[str]\n    required_sources: list[str]\n    min_words: int\n    max_words: int\n\nspec = ArticleSpec(\n    required_sections=[\n        \"Overview\",\n        \"Limitations\",\n        \"Implementation\"\n    ],\n    required_sources=[\n        \"https://example.com/documentation\"\n    ],\n    min_words=100,\n    max_words=1000\n)\n```\n\nThe specification is deliberately independent of the AI model or writing platform.\n\nThis means multiple systems can be evaluated against the same requirements.\n\nThe example URL is a placeholder. Replace it with an actual approved source before evaluating real articles.\n\nWe can use regular expressions to identify Markdown headings and simple string checks to identify required references.\n\n``` python\nimport re\n\ndef evaluate_article(article, spec):\n    headings = {\n        h.strip().casefold()\n        for h in re.findall(\n            r\"^#{1,6}\\s+(.+)$\",\n            article,\n            flags=re.MULTILINE\n        )\n    }\n\n    word_count = len(article.split())\n\n    checks = {\n        \"section_coverage\": all(\n            section.casefold() in headings\n            for section in spec.required_sections\n        ),\n        \"source_presence\": all(\n            source in article\n            for source in spec.required_sources\n        ),\n        \"word_limit\": (\n            spec.min_words <= word_count\n            <= spec.max_words\n        ),\n        \"no_unresolved_markers\": (\n            \"[SOURCE NEEDED]\" not in article\n        )\n    }\n\n    return {\n        \"checks\": checks,\n        \"word_count\": word_count,\n        \"passed\": all(checks.values())\n    }\n```\n\nThese checks are intentionally limited.\n\nThe presence of a source URL doesn't establish whether the source supports a claim. Likewise, the absence of an unresolved marker doesn't establish factual accuracy.\n\nWe're testing structural compliance, not truthfulness.\n\nSave generated drafts as Markdown files using the same content brief and source material.\n\n```\ndrafts/\n    system_a.md\n    system_b.md\n    system_c.md\n```\n\nWe can then evaluate every draft using the same specification.\n\n``` python\nfrom pathlib import Path\n\nresults = []\n\nfor path in sorted(Path(\"drafts\").glob(\"*.md\")):\n    article = path.read_text(encoding=\"utf-8\")\n    evaluation = evaluate_article(article, spec)\n\n    results.append({\n        \"system\": path.stem,\n        **evaluation\n    })\n\nfor result in results:\n    print(result)\n```\n\nThis works regardless of whether the drafts came from an API, a commercial writing platform or a locally hosted model.\n\nFor meaningful comparisons, keep the task instructions, source documents and editorial requirements consistent.\n\nSome of the most important writing characteristics cannot be reliably assessed through simple automated rules.\n\nWe can create a separate human evaluation rubric.\n\n```\n@dataclass\nclass HumanReview:\n    accuracy: int\n    relevance: int\n    originality: int\n    clarity: int\n    editing_minutes: int\n\n    def __post_init__(self):\n        scores = [\n            self.accuracy,\n            self.relevance,\n            self.originality,\n            self.clarity\n        ]\n\n        if any(not 1 <= score <= 5\n               for score in scores):\n            raise ValueError(\"Scores must be 1–5\")\n\n        if self.editing_minutes < 0:\n            raise ValueError(\"Invalid editing time\")\n\n    def quality_score(self):\n        return (\n            self.accuracy\n            + self.relevance\n            + self.originality\n            + self.clarity\n        ) / 4\n```\n\nReviewers can score each dimension from one to five.\n\nWhere possible, remove product names from the drafts before reviewing them. This reduces the influence of existing preferences about particular software providers.\n\nEditing time should be recorded separately rather than treated as a direct measure of writing quality.\n\nA useful evaluation framework should detect deliberately incomplete articles.\n\n``` python\nimport unittest\n\nclass EvaluationTests(unittest.TestCase):\n\n    def test_missing_section(self):\n        article = \"## Overview\\nExample text.\"\n\n        result = evaluate_article(article, spec)\n\n        self.assertFalse(\n            result[\"checks\"][\"section_coverage\"]\n        )\n\n    def test_unresolved_claim(self):\n        article = \"Example claim [SOURCE NEEDED]\"\n\n        result = evaluate_article(article, spec)\n\n        self.assertFalse(\n            result[\"checks\"][\"no_unresolved_markers\"]\n        )\n\n    def test_missing_source(self):\n        article = \"An article without references.\"\n\n        result = evaluate_article(article, spec)\n\n        self.assertFalse(\n            result[\"checks\"][\"source_presence\"]\n        )\n\nif __name__ == \"__main__\":\n    unittest.main()\n```\n\nRun the tests whenever you change the evaluation rules.\n\nYou can extend the suite with passing examples, malformed Markdown and boundary cases involving word counts.\n\nEvaluating one generated article tells you relatively little about the reliability of an AI writing system.\n\nA better evaluation dataset might include:\n\nRepeat each assignment several times where practical, since generative systems can produce different outputs from identical instructions.\n\nTrack the model version, prompt version, generation settings and date of evaluation.\n\nOtherwise, it becomes difficult to reproduce results or identify regressions.\n\nA production content pipeline should include independent source verification.\n\nFor example, reviewers can extract factual claims from a draft and classify each one as supported, contradicted or insufficiently supported by the available evidence.\n\nGoogle's [guidance on generative AI content](https://developers.google.com/search/docs/fundamentals/using-gen-ai-content) also emphasises reviewing automatically generated information for accuracy before publication.\n\nStructural validation is useful, but it should never be mistaken for a complete editorial quality assessment.\n\nThe objective of evaluating an AI writing system shouldn't be to identify whichever tool produces the most convincing prose.\n\nIt should be to understand which system reliably helps produce accurate, relevant and useful content for a defined audience.\n\nA combination of deterministic checks, human review and repeatable evaluation datasets provides a more meaningful starting point than subjective first impressions.", "url": "https://wpnews.pro/news/stop-evaluating-ai-writing-tools-by-how-human-their-output-sounds", "canonical_source": "https://dev.to/zainab_hayee_737b0b336278/-stop-evaluating-ai-writing-tools-by-how-human-their-output-sounds-6n5", "published_at": "2026-12-04 08:34:19+00:00", "updated_at": "2026-12-04 08:45:45.906124+00:00", "lang": "en", "topics": ["ai-tools", "generative-ai", "large-language-models"], "entities": ["Jasper", "Python"], "also_reported_by": [], "takeaway": "Evaluate AI writing tools against a fixed content spec — required headings, source URLs, word limits and unresolved markers — instead of fluency, since structural checks catch predictable problems but do not establish factual accuracy.", "recommendation": {"advice": "Run every draft from every writing system against the same spec of required sections, sources and word limits, then reserve human rubrics for accuracy and clarity.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/stop-evaluating-ai-writing-tools-by-how-human-their-output-sounds", "markdown": "https://wpnews.pro/news/stop-evaluating-ai-writing-tools-by-how-human-their-output-sounds.md", "text": "https://wpnews.pro/news/stop-evaluating-ai-writing-tools-by-how-human-their-output-sounds.txt", "jsonld": "https://wpnews.pro/news/stop-evaluating-ai-writing-tools-by-how-human-their-output-sounds.jsonld"}}