Stop Evaluating AI Writing Tools by How Human Their Output Sounds 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. 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. While 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. In this tutorial, we'll build a small, provider-independent Python evaluation framework that checks generated drafts against a defined content specification. The goal isn't to replace human reviewers. It's to make evaluations more consistent and catch predictable problems before editorial review. Our evaluation framework will check: We'll use Python 3.10+ and only standard library modules. Start by describing what an acceptable article should contain. python from dataclasses import dataclass @dataclass class ArticleSpec: required sections: list str required sources: list str min words: int max words: int spec = ArticleSpec required sections= "Overview", "Limitations", "Implementation" , required sources= "https://example.com/documentation" , min words=100, max words=1000 The specification is deliberately independent of the AI model or writing platform. This means multiple systems can be evaluated against the same requirements. The example URL is a placeholder. Replace it with an actual approved source before evaluating real articles. We can use regular expressions to identify Markdown headings and simple string checks to identify required references. python import re def evaluate article article, spec : headings = { h.strip .casefold for h in re.findall r"^ {1,6}\s+ .+ $", article, flags=re.MULTILINE } word count = len article.split checks = { "section coverage": all section.casefold in headings for section in spec.required sections , "source presence": all source in article for source in spec.required sources , "word limit": spec.min words <= word count <= spec.max words , "no unresolved markers": " SOURCE NEEDED " not in article } return { "checks": checks, "word count": word count, "passed": all checks.values } These checks are intentionally limited. The 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. We're testing structural compliance, not truthfulness. Save generated drafts as Markdown files using the same content brief and source material. drafts/ system a.md system b.md system c.md We can then evaluate every draft using the same specification. python from pathlib import Path results = for path in sorted Path "drafts" .glob " .md" : article = path.read text encoding="utf-8" evaluation = evaluate article article, spec results.append { "system": path.stem, evaluation } for result in results: print result This works regardless of whether the drafts came from an API, a commercial writing platform or a locally hosted model. For meaningful comparisons, keep the task instructions, source documents and editorial requirements consistent. Some of the most important writing characteristics cannot be reliably assessed through simple automated rules. We can create a separate human evaluation rubric. @dataclass class HumanReview: accuracy: int relevance: int originality: int clarity: int editing minutes: int def post init self : scores = self.accuracy, self.relevance, self.originality, self.clarity if any not 1 <= score <= 5 for score in scores : raise ValueError "Scores must be 1–5" if self.editing minutes < 0: raise ValueError "Invalid editing time" def quality score self : return self.accuracy + self.relevance + self.originality + self.clarity / 4 Reviewers can score each dimension from one to five. Where possible, remove product names from the drafts before reviewing them. This reduces the influence of existing preferences about particular software providers. Editing time should be recorded separately rather than treated as a direct measure of writing quality. A useful evaluation framework should detect deliberately incomplete articles. python import unittest class EvaluationTests unittest.TestCase : def test missing section self : article = " Overview\nExample text." result = evaluate article article, spec self.assertFalse result "checks" "section coverage" def test unresolved claim self : article = "Example claim SOURCE NEEDED " result = evaluate article article, spec self.assertFalse result "checks" "no unresolved markers" def test missing source self : article = "An article without references." result = evaluate article article, spec self.assertFalse result "checks" "source presence" if name == " main ": unittest.main Run the tests whenever you change the evaluation rules. You can extend the suite with passing examples, malformed Markdown and boundary cases involving word counts. Evaluating one generated article tells you relatively little about the reliability of an AI writing system. A better evaluation dataset might include: Repeat each assignment several times where practical, since generative systems can produce different outputs from identical instructions. Track the model version, prompt version, generation settings and date of evaluation. Otherwise, it becomes difficult to reproduce results or identify regressions. A production content pipeline should include independent source verification. For example, reviewers can extract factual claims from a draft and classify each one as supported, contradicted or insufficiently supported by the available evidence. Google'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. Structural validation is useful, but it should never be mistaken for a complete editorial quality assessment. The objective of evaluating an AI writing system shouldn't be to identify whichever tool produces the most convincing prose. It should be to understand which system reliably helps produce accurate, relevant and useful content for a defined audience. A combination of deterministic checks, human review and repeatable evaluation datasets provides a more meaningful starting point than subjective first impressions.