Skip to content
AI & detection

How AI-powered content generation actually works

Alex Mitchell

Alex Mitchell

7 min
How AI-powered content generation actually works

When people hear "AI-generated content," they usually picture a chatbot spitting out generic paragraphs. The reality of modern content pipelines is far more sophisticated — and the output quality reflects that. Here is a look at how systems like Newsmill actually work under the hood.

Stage 1: Intelligent Scraping

The first challenge is getting clean text from web pages. This sounds simple, but modern websites are complex: JavaScript-rendered content, cookie walls, dynamic loading, anti-bot protections, and wildly inconsistent HTML structures.

Newsmill uses a four-level scraping cascade:

  • Structured extraction — If the page uses standard article markup (like Schema.org or Open Graph tags), we extract directly from the structured data. This is the fastest and most reliable method.
  • Readability parsing — For pages without structured data, we use readability algorithms that identify the main content block by analyzing DOM density, text-to-HTML ratios, and element positioning.
  • Headless browser rendering — When content is loaded via JavaScript, a headless browser renders the page first, then applies extraction. This handles SPAs, lazy-loaded content, and interactive elements.
  • LLM-assisted extraction — For edge cases where traditional methods fail, we send the rendered page to a language model that identifies and extracts the article content. This is the slowest method but handles virtually any page layout.

Each level is tried in order. If one fails or produces low-confidence results, the system falls through to the next. The result is reliable extraction across thousands of different website designs.

Stage 2: Deduplication via Vector Similarity

Once content is scraped, the next problem is deduplication. When a major story breaks, dozens of outlets publish articles with similar content. Publishing multiple versions of the same story wastes resources and frustrates readers.

Newsmill converts every article into a vector embedding using models like OpenAI's text-embedding-3-small. These embeddings capture the semantic meaning of the text, not just surface-level word overlap.

When a new article arrives, its embedding is compared against all articles from the past 24 hours using cosine similarity. If the similarity score exceeds 70%, the article is flagged as a likely duplicate. Editors can review flagged items or configure the system to skip them automatically.

This approach catches duplicates that simple keyword matching would miss — like two articles covering the same earnings report but written with completely different vocabulary.

Stage 3: AI Rewriting with Templates

Raw scraped content cannot be published directly. It needs to match your publication's voice, structure, and editorial standards. This is where AI rewriting comes in.

Rather than feeding content into a generic prompt, Newsmill uses customizable templates that define:

  • Tone — Formal, conversational, authoritative, neutral
  • Structure — Inverted pyramid, feature-style, listicle, analysis
  • Length — Target word count and paragraph density
  • Audience — Technical, general, executive, consumer

The AI model receives the source article along with these constraints and produces original copy that conveys the same information in your publication's style. Because the model works from real source material rather than generating from scratch, the output stays factually grounded.

Stage 4: Humanization

AI-generated text, even from advanced models, carries subtle patterns that experienced readers (and detection tools) can identify. These include repetitive sentence openings, uniform paragraph lengths, predictable vocabulary choices, and overly smooth transitions.

Newsmill's humanization layer addresses this through two mechanisms:

  • Regex-based transformations — A set of pattern-matching rules that introduce natural variation: splitting compound sentences, varying transition phrases, adjusting comma usage, and randomizing synonym selection.
  • T5 model paraphrasing — A fine-tuned T5 model that rephrases sentences to introduce the kind of structural irregularity that characterizes human writing. It occasionally uses shorter sentences. Fragments, even. And it varies paragraph rhythm in ways that rule-based systems cannot replicate.

The combination of these two approaches produces text that reads naturally and resists detection by current AI content classifiers.

Why Pipeline Output Beats Chatbot Output

The key insight is that quality comes from the pipeline architecture, not from any single AI model. A chatbot takes a prompt and produces text in a single pass. A pipeline processes content through multiple specialized stages, each optimized for a specific task.

Scraping ensures factual grounding. Deduplication prevents redundancy. Template-based rewriting enforces editorial standards. Humanization adds natural variation. No single model could do all of these things well simultaneously.

This is why pipeline-generated content consistently outperforms one-shot chatbot output in both quality assessments and detection resistance. The architecture matters as much as the model.

Looking Ahead

AI content generation is evolving rapidly. Models are getting better at producing natural text, detection tools are getting more sophisticated, and publisher expectations are rising. The teams that invest in pipeline infrastructure today — rather than relying on manual prompting — will have a significant advantage as the field matures.

If you want to see how this works in practice, explore our features or get in touch to see a live demo of the Newsmill pipeline. For real-world examples, see how Herald Digital uses the Originals pipeline for AI-assisted research or how Brevity consolidated three tools into a single pipeline.

Stay in the loop

Get product updates and content strategy tips delivered to your inbox. No spam, unsubscribe anytime.