Verified AI writing: code computes, AI writes, a verifier checks

Language models are good at sentences and unreliable at arithmetic. In results sections, one wrong decimal can change a conclusion, so numbers should never come from the model.

The workflow

  • Statistics are computed by code and stored as named values (t, df, p, mean_diff…).
  • The AI receives only the names and their meanings — never the values or the data rows — and writes with placeholders such as {t} and {p}.
  • The app fills in the values with APA formatting.
  • A verifier extracts every number from the final text, including Arabic-Indic digits, and checks it against the computed values within display rounding. It also checks direction words and significance claims against the results.

A real example

In a hospital analysis, an AI-written sentence said average stay fell by 0.98 days because it subtracted two rounded numbers; the code said 0.99. A verifier flags that sentence before anyone publishes it.

Frequently asked questions

What happens when a number does not match?

The section is marked Needs review, the number is highlighted, and publishing is blocked until you fix it or explicitly confirm it.

Try it with your data See a sample dashboard

Related