Skip to content

Design Repeatable Story Templates for Recurring Housing, Weather, or Earnings Drops

Constrain automated first drafts strictly to structured JSON/CSV inputs, explicit null-handling rules, and varied phrasing so zero unverified claims creep in.

Copy the prompt and paste it into the AI assistant you already use.

Engineering rules for hallucination-free structured news templates

  1. 01

    Forbid outside 'world knowledge' beyond the supplied JSON payload

    Instruct the generator to use strictly facts present in the verified input payload—never guessing why home sales dipped based on generic training data.

  2. 02

    Pre-compute all percentages and rankings in deterministic code

    Never ask an LLM to compute year-over-year percentage changes or sort county rankings on the fly—pass pre-computed, rounded numbers in your JSON.

  3. 03

    Build explicit quarantine triggers on anomalous outliers

    If median home price jumps 400% or a score reads `-1`, halt draft generation and flag an editor—raw government CSVs contain frequent fat-finger typos.

  4. 04

    Define graceful omission rules when optional fields are null

    Specify that missing re-inspection dates or missing prior-year comps omit that clause cleanly rather than printing `'N/A'` or inventing placeholders.

How it works in practice

Verified JSON payload (math pre-computed in code)

`{"county": "Wake", "month": "October 2026", "median_price": 462000, "yoy_price_pct": 3.4, "closed_sales": 1180, "yoy_sales_pct": -4.1, "inventory_months": 2.9, "prior_inventory_months": 2.2}`

Constrained, zero-speculation 95-word draft + QA check

Home prices in Wake County edged higher in October even as closed sales slowed and active inventory expanded, according to regional MLS figures. The county's median sale price reached $462,000, up 3.4% from a year earlier, while closed transactions fell 4.1% to 1,180 homes. Housing supply stood at 2.9 months of inventory, up from 2.2 months last October. • Automated QA Gate: All 6 numerals match input JSON; zero unverified causal claims ('because of mortgage rates') injected.

Doing arithmetic in code and restricting prose strictly to supplied fields eliminates the two biggest sources of automated news errors.

Good to know

Why have wire services like AP used structured data journalism for years?

Recurring quarterly earnings, minor-league scores, and municipal datasets follow predictable schemas—automating clean baseline briefs frees human reporters for investigative enterprise.

Why shouldn't you let a language model calculate percentages directly from raw tables?

Token predictors occasionally slip decimals or confuse base denominators; five lines of deterministic JavaScript/Python math guarantees 100% arithmetic accuracy first.

How do you keep monthly automated briefs from reading identically every month?

Branch lead framing based on directional regime (price up/volume down vs both rising vs inventory crossing 4.0 months) and rotate approved syntactic patterns.

Learn more

Related guides and background articles for this task