StatAgentWeekly email

When AI got it wrong

These are real mistakes from the recorded runs behind the worked examples on this site. Each one was found when the output was checked against the source document or recomputed from the public data, and each is listed in that example's verification table or error list. They come from single runs of one model family on public documents and data. They show what kinds of error to look for. They are not error rates, and they say nothing about how often any model makes them. A different run, prompt or model may behave differently.

28 entries. invented content 5; wrongly-missing item 3; overstated claim 3; wrong number 3; false statement about the source 2; mislabelled comparison 2; missed filter 2; wrong classification 2; code that fails 1; missed edge case 1; outside-text leak 1; stale source 1; wrong dose coding 1; wrong variable 1.

Invented content

Assumptions register and sponsor questions

What the AI said
The Regulatory Affairs Support contractor writes and files the reports.
What was wrong
sits with the CROMS contractor, not Regulatory Affairs Support
How to catch it
Open the cited page and read the sentence the line cites; a quote check alone passes because the quote exists.
Details
What the AI was doing
The model turned a requirements grid from a federal solicitation into an assumptions register. Line A12 assigns report writing to the wrong contractor.
Where the source says it
SOW III.5.a(i), PDF p.73 (ClinicalTrials.gov reporting); III.5.b.2.c, PDF p.75 says only 'provide the clinical data to finalize' the reports.
Why it is easy to miss
The line sits next to a correct quote from the grid, and the phrase borrowed from the plain-words column reads like part of that quote.

Assumptions register and sponsor questions

What the AI said
the programs belong to DMID once delivered.
What was wrong
Ownership of delivered programs and a 'COR names in writing' step are invented; Attachment 3 has no data-rights text.
How to catch it
Split each line into its separate claims and match each to a source sentence; unmatched claims belong in the questions list.
Details
What the AI was doing
Line A08 cites a real SOW sentence about who receives the SAS programs and adds a claim about ownership.
Where the source says it
SOW III.6.a.7, PDF p.76: 'DMID/DMID designee determined by the COR' (the recipient only).
Why it is easy to miss
The same line's evidence column says 'Recipient and ownership are not specified', so the line argues against itself. A skim of the evidence column looks supportive.

Statistical approach section and compliance matrix

What the AI said
That lead is DMID's point of contact for the study's statistical work and is accountable for the activities described below.
What was wrong
B2. A named lead statistician is assigned to each study (name to be supplied).
How to catch it
Trace every sentence about the bidder to a numbered bidder fact; flag any attribute that is not in the fact.
Details
What the AI was doing
A proposal section drafted from a requirements grid and a list of invented bidder facts.
Where the source says it
Bidder fact B2 in the saved input (invented for the example). It says nothing about a point of contact or accountability.
Why it is easy to miss
It is a plausible sentence for any proposal and sits straight after the true half of the fact.

First SDTM mapping spec from CRF pages

What the AI said
Suggestion: derive DM.AGE from BRTHDTC and RFSTDTC only if DOB is in the database.
What was wrong
define.xml DM has no BRTHDTC. AGE is Derived 'at start of study drug (RFSTDTC)'.
How to catch it
Check every proposed variable name against define.xml or the study's actual dataset list.
Details
What the AI was doing
The model mapped three CRF pages to SDTM and hedged about a field labelled 'Not Entered In Database', but still wrote a mapping.
Where the source says it
define.xml, DM domain of the CDISC pilot study.
Why it is easy to miss
The hedge is accurate, so the line looks careful. A programmer copying the table would add a variable the study never built.

First SDTM mapping spec from CRF pages

What the AI said
Suggestion: SU.SUSTAT = "NOT DONE"
What was wrong
define.xml has no SU domain and no smoking, alcohol or caffeine variables.
How to catch it
Compare the list of domains in the mapping with the domains in the study's define.xml.
Details
What the AI was doing
Same run: smoking and alcohol items marked 'Not Entered In Database' were given a suggested domain.
Where the source says it
define.xml, CDISC pilot study. The model did flag the items and asked which domain to use.
Why it is easy to miss
SU is the standard SDTM domain for substance use, so the suggestion is right in general and wrong for this study.

Missing but present

Reviewer's guide sections from a define.xml extract

What the AI said
This section is a placeholder until the sponsor supplies the validation output.
What was wrong
key p.7: no formal reports exist
How to catch it
For each 'not in input' item, ask whether the package really lacks it, or only the excerpt.
Details
What the AI was doing
ADRG sections drafted from define.xml and a protocol synopsis. The verifier found no wrong number, but 14 of 54 claims were gaps the full reviewer's guide actually answers.
Where the source says it
The published reviewer's guide used as the answer key, p.7: manual review, no formal conformance reports.
Why it is easy to miss
'Not in the input' is true of the excerpt and honest, so it reads as a safe answer. The risk is a team waiting for a document that does not exist.

Table shell from a SAP

What the AI said
Population: [not stated in the excerpts; see list at end]
What was wrong
Template 3 header, SAP p.21 says Population: Intent-to-Treat.
How to catch it
Search the full SAP for each placeholder before sending a question to the sponsor.
Details
What the AI was doing
Shells for three tables drafted from SAP excerpts. 13 of the model's 'could not determine' items were wrongly-missing items.
Where the source says it
SAP Template 3, p.21. The first run assumed Intent-to-Treat and was right; this run was the more cautious reading and the less useful shell.
Why it is easy to miss
The placeholder is honest about the excerpt. The cost is a shell that cannot be used until someone looks up what the SAP already says.

DMC charter interim section from protocol text

What the AI said
beyond the screening results above; what happens at n=1200
What was wrong
Answered in the protocol outside the excerpt: PPOS at n=1200 below threshold = futility; posterior probability above threshold = superiority, 10.6.4 p.49
How to catch it
Run the list of gaps past the full documents, and keep the answers.
Details
What the AI was doing
The model listed what its excerpt did not cover, and several listed items are answered in the full protocol.
Where the source says it
Protocol 10.6.4, p.49.
Why it is easy to miss
The gap list is accurate about the excerpt, so it looks like an input limit rather than a model error.

Overstated claim

CSR methods section (9.7) from the SAP and protocol

What the AI said
No interim analyses were performed.
What was wrong
CSR 9.7 and 9.8 say nothing on interim analyses. The SAP is future tense; the answer asserted past tense
How to catch it
For every outcome sentence in a report, ask whether the source records that it happened or only that it was planned.
Details
What the AI was doing
CSR methods text drafted from a trimmed SAP and protocol excerpt.
Where the source says it
SAP 15.1 p.47: interim analyses 'will not be performed'. The real CSR 9.7 does not say it.
Why it is easy to miss
A plan sentence became a statement of fact about what happened. The change of tense is a single word.

DMC charter interim section from protocol text

What the AI said
It is the main quantity for early go/no-go decisions for each appendix.
What was wrong
Primary objective IAs 'follow processes in 10.6.3' using the appendix primary endpoint (hospitalization/death or time to recovery), 10.6.4 p.49
How to catch it
Check each general statement ('every look', 'each appendix') against the sentence that limits the scope, which may be outside the excerpt.
Details
What the AI was doing
Interim analysis section of a monitoring-committee charter for ACTIV-6, drafted from protocol text.
Where the source says it
Protocol 10.6.4, p.49. The excerpt supports the claim only for the screening analysis (pp.48-49); the sentence that limited it was cut.
Why it is easy to miss
The sentence generalises something true to a wider scope, and nothing in the pasted excerpt contradicts it.

Difference table from meeting minutes and your notes

What the AI said
FDA asked for the opposite, so the SAP and data handling would be misaligned.
What was wrong
Minutes p.6: FDA 'encouraged' use of the follow-up data, it did not require it
How to catch it
Separate the finding (what differs) from the commentary (why it matters) and check only the finding against the source; treat the commentary as opinion.
Details
What the AI was doing
The model compared invented sponsor notes with real FDA minutes. It found all 6 planted differences, but some of its 'why it matters' lines went further than the minutes.
Where the source says it
FDA Pre-NDA meeting minutes, p.6. The verifier also marked three other 'why it matters' lines as speculation not in the source.
Why it is easy to miss
The difference itself is correctly found, so the explanation after it gets the same trust.

Wrong number

R code from ADaM spec rows, compared with the real ADAE

What the AI said
Coded exactly as written; this looks like a typo for SUBCUTANEOUS.
What was wrong
the data value is 'SKIN AND SUBCUTANEOUS TISSUE DISORDERS'
How to catch it
Compare the output with the real dataset cell by cell, and list the distinct values of the matched variable before trusting a literal string from a spec.
Details
What the AI was doing
The draft turned ADAE spec rows into Python and compared its output with the real ADAE. It had flagged a probable typo in the define.xml text, then coded the text literally anyway.
Where the source says it
define.xml line 3913 (the string 'SUBC UTANEOUS') against the ADAE data. Result: 181 CQ01NAM cells wrong, plus 84 knock-on cells in AOCC01FL.
Why it is easy to miss
The draft listed the typo itself as an open question, so it reads as handled. 10 of 10 hand-written tests passed and 98.47 percent of cells matched.

Pseudocode from define.xml derivation text, tested on the data

What the AI said
I implemented the text as written
What was wrong
CQ01NAM undercounted: 312 flagged against 493 in the dataset (181 mismatches)
How to catch it
Where the model says a source string 'may be a typo', test both spellings against the data before accepting the counts.
Details
What the AI was doing
Same define.xml string, a different workflow. The model noticed that the spelling might be a typo and still shipped the literal version.
Where the source says it
ADAE dataset, CQ01NAM and AOCC01FL (118 flagged against 152). With the spelling fixed both variables match on all 1191 records.
Why it is easy to miss
The caveat sits in the middle of a diagnostic note, and the run's own last line shows the correct spelling. A reader sees the caveat and assumes the code handled it.

R script that recomputes a CSR table and flags mismatches

What the AI said
itt["RACE_CSR"] = itt["RACE"].map(race_map)
What was wrong
CSR PDF p.46; synopsis PDF p.2 (218, 86%)
How to catch it
Recompute every row and compare automatically with a match count; a mismatch in four columns of one row points to a missing variable (here ETHNIC).
Details
What the AI was doing
The task was to recompute a CSR demographics table from the ADaM data. The first draft recoded Race from one column only.
Where the source says it
CSR demographics table, PDF p.46: Caucasian 75/72/71 (218 total) and Hispanic 3/6/3 (12 total). The first draft gave Caucasian 230 and Hispanic 0.
Why it is easy to miss
88 of 96 cells matched. All 8 failures were in the Caucasian and Hispanic rows, so a spot check of the other rows would pass.

False statement about the source

Six-slide results outline from CSR tables

What the AI said
this table prints no footnotes, so confirm
What was wrong
Table 14-3.02 prints footnotes [1] to [3] (ANCOVA, dose-response test, pairwise without adjustment), p.50.
How to catch it
Treat every 'not stated' or 'prints no' sentence as a claim about the source and look it up in the full document.
Details
What the AI was doing
A six-slide deck storyline from CSR tables. The model reported what it could see, but the excerpt had dropped the footnotes (an error in how the example was built, not in the model's reading).
Where the source says it
CSR Table 14-3.02, p.50. The same cause produced a second false statement about the Table 14-5.02 p-value method (Fisher's exact test, p.79).
Why it is easy to miss
It is phrased as a caution to confirm, which looks diligent. The statement is only false against the full document.

Findings table for a SAS submission program

What the AI said
There is no `CQ01` flag or code variable
What was wrong
AOCC01FL (lines 90 and 119) is the flag for dermatologic events; only a separate code variable is absent.
How to catch it
Search the program for the name pattern before accepting a 'there is no' sentence.
Details
What the AI was doing
A line-by-line review of a SAS program that derives ADAE flags, rechecked against the delivered data.
Where the source says it
The SAS program, lines 90 and 119.
Why it is easy to miss
One half of the sentence is true (no separate code variable), and it sits inside a longer paragraph of correct observations.

Mislabelled comparison

Protocol vs SAP discrepancy table, with quotes

What the AI said
ONLY IN ONE TEXT (the condition on a significant dose-response test appears only in the SAP.
What was wrong
Real change (protocol: pairwise for all efficacy variables, p. 43; SAP: only if the dose-response test is significant, pp. 9 and 13).
How to catch it
Read every ONLY IN ONE TEXT row, not only the CONFLICT rows.
Details
What the AI was doing
A protocol-versus-SAP discrepancy table. Row 11 is a real rule change that the model put in the wrong category, so no question was drafted for it.
Where the source says it
Protocol p.43; SAP pp.9 and 13. The SAP does not list this change in its Appendix 2.
Why it is easy to miss
The prompt asked for questions only on CONFLICT rows, so dropped or changed analyses labelled ONLY IN ONE TEXT get no question and are easy to skip.

Protocol vs SAP discrepancy table, with quotes

What the AI said
CONFLICT (investigator vs site)
What was wrong
Same factor under two names.
How to catch it
Before sending a question to the sponsor, check whether the other document answers it.
Details
What the AI was doing
Row 6 compared model terms across the two documents.
Where the source says it
Protocol p.44 and SAP p.9: both pool centres with fewer than 3 patients per arm. A prompt rule that a model-term change is a CONFLICT pushed the row in.
Why it is easy to miss
Two different words in two documents look like a difference. A false conflict also wastes a question to the sponsor.

Missed filter

ARS reporting event JSON from a table shell and SAP

What the AI said
Adding `ANL01FL EQ Y` would have been from habit.
What was wrong
237 rows, 234 subjects, 3 subjects with 2 rows, arm counts 79/75/83 vs correct 79/74/81
How to catch it
Bind the subset to the real data and count rows against subjects; one row per subject is the test that exposes a missing analysis flag.
Details
What the AI was doing
The model wrote ARS metadata for a Week 24 ADAS-Cog table and noted that it had left a flag filter out.
Where the source says it
Run against the CDISC pilot ADQSADAS data. define.xml has a comment saying ANL01FL marks the closest record in the window; neither model was shown that comment.
Why it is easy to miss
The omission is described openly as a choice, with a plausible reason. The metadata passes a schema check because it is valid, only wrong.

ARS reporting event JSON from a table shell and SAP

What the AI said
"variable": "TRTP", "comparator": "IN", "value": ["Placebo", "Xanomeline Low Dose"]
What was wrong
Subsets cover all ACTOT visits incl. Baseline, Week 8, 16 (check_bindings s2); Week 24 condition lost; not flagged by A
How to catch it
Run each subset against the data and count rows by parameter and visit.
Details
What the AI was doing
Run A defined three pairwise data subsets for the dose comparisons.
Where the source says it
Footnote [1] and SAP 10.1.1 describe one model of the 3 groups, not separate two-group fits.
Why it is easy to miss
Each subset looks tidy and names its two arms. The missing parameter and visit conditions are an absence, which is hard to see in JSON.

Wrong classification

Verification level for each output, by your risk rules

What the AI said
T16 | NPI-X mean total score wk4-24, windowed | 2 | windowing | ADQSNPIX
What was wrong
Template 11, SAP p.29, shows ANCOVA dose-response and pairwise p-values
How to catch it
Spot-check the level of any item whose title was the only evidence against the template or shell it points to.
Details
What the AI was doing
The model assigned verification levels to a SAP output list using the user's own criteria, working only from table titles.
Where the source says it
SAP Template 11, p.29. Under the user's criterion (any inferential efficacy analysis) the output is Level 1, not Level 2, and ADQSNPIX moves to Level 1.
Why it is easy to miss
A title that says 'mean total score' gives no hint of a test. The level was chosen on the title alone.

Verification level for each output, by your risk rules

What the AI said
T20 could include change from baseline, but the title says only summary statistics, so it stays Level 3.
What was wrong
Template 15, SAP p.33, has Change from Baseline columns at each visit
How to catch it
When a note says 'could include', go and look; the note is a pointer to what to check.
Details
What the AI was doing
Same run. The model named a risk in a note and then decided against it.
Where the source says it
SAP Template 15, p.33. Under the user's criterion 2 (change from baseline) the output is Level 2.
Why it is easy to miss
The note shows the model was aware of the risk, which makes the lower level look like a considered call.

Code that fails

R translation of a SAS program, checked against the SAS output

What the AI said
.d = coalesce(str_trim(AEDECOD), ""),
What was wrong
Error: object 'AEDECOD' not found
How to catch it
Run the code in the real language, unmodified, before reading any output.
Details
What the AI was doing
The R code was run unmodified in R 4.6.1.
Where the source says it
R 4.6.1, run.R unmodified (2026-10-20). Cause: a column named .d is partially matched to mutate()'s .data argument. One rename fixes it, after which the output matched adam_adae.xpt in all 53 shared columns.
Why it is easy to miss
The code reads correctly and a Python re-implementation of it passed. The problem is an R-specific rule that a different language cannot reveal.

Missed edge case

R translation of a SAS program, checked against the SAS output

What the AI said
nchar(str_trim(AESTDTC, "right")) == 7
What was wrong
11 AEs have a year-only start date.
How to catch it
Ask for the distinct values and lengths of each date field, and the count of records in each format.
Details
What the AI was doing
A SAS-to-R translation of ADAE derivations, compared with the SAS-produced dataset.
Where the source says it
SDTM AE, AESTDTC. The code handles them the SAS way (start date missing, TRTEMFL = N), so these 11 events are silently left out of every treatment-emergent count, and the answer did not raise them as a question.
Why it is easy to miss
The code is a faithful translation and matches SAS exactly. Faithful translation reproduces a questionable rule without comment.

Outside-text leak

CSR methods section (9.7) from the SAP and protocol

What the AI said
xanomeline transdermal system (TTS) 50 cm2 (low dose) and 75 cm2 (high dose)
What was wrong
neither '50 cm2', '75 cm2' nor 'TTS' appears in the excerpt printed on this page
How to catch it
Ask for a source cite per sentence and reject any sentence whose cite points outside the supplied text.
Details
What the AI was doing
The prompt said to use only the pasted excerpt. The output includes dose areas that are not in the excerpt.
Where the source says it
SAP 1.2, pp.5-6 gives 54 mg and 81 mg; the mapping is right. The verifier could not tell whether the model drew these from its background or saw a longer excerpt.
Why it is easy to miss
The values are correct, so nothing looks off. They cannot be traced to anything you supplied.

Stale source

SAP first draft from protocol text, with open questions

What the AI said
Two interim efficacy analyses are planned (p. 47).
What was wrong
SAP p. 47: "Interim analyses will not be performed."
How to catch it
Ask which document is newer and whether a later one supersedes the input; list the points most likely to change in an SAP and confirm each.
Details
What the AI was doing
A SAP first draft from the protocol. The draft was faithful to the protocol, which the final SAP later overturned.
Where the source says it
Protocol p.47 against the final SAP p.47. The final SAP also overturned one-sided .025 testing, the randomization test for the co-primaries and the 3-day drug rule.
Why it is easy to miss
Every sentence cites the protocol correctly. Nothing in the protocol could have told the model that the plan later changed.

Wrong dose coding

Six R exercises for SAS programmers, with solutions that run

What the AI said
They were inferred from the Fisher comments and the program name only.
What was wrong
The data hold 0, 54 and 81, so the Fisher step ran on empty active arms and returned p = 1 for both comparisons.
How to catch it
Print the distinct values of every coding variable before filtering on it, and check that each arm count is non-zero.
Details
What the AI was doing
Exercise 5 asked for Fisher tests of treatment against placebo. The model guessed the treatment codes from program comments.
Where the source says it
ADSL, variable TRTAN (codes 0, 54, 81). The SAS program itself carries the same stale filters, so the model inherited the error from the source.
Why it is easy to miss
The code ran without error and printed two p-values. The model had listed the inference as unconfirmed, but the exercise still shipped with 0/1/2 hard-coded.

Wrong variable

ARS reporting event JSON from a table shell and SAP

What the AI said
ANCOVA with baseline ADAS-Cog (11) (BASE) as covariate, SITEID as factor
What was wrong
SAP 7.1 pools sites with <3 patients per arm; define SITEGR1 'Pooled Site Group 1'; check_bindings s5: 17 SITEID vs 11 SITEGR1 levels
How to catch it
List the SAP's covariates and compare each with the variable actually named; ask the model to state where each came from.
Details
What the AI was doing
The SAP pools small sites for the ANCOVA. The variable list given to the models did not include the pooled-site variable.
Where the source says it
SAP section 7.1; define.xml ADQSADAS.SITEGR1. Partly an input limit, and neither run flagged the question.
Why it is easy to miss
SITEID is a reasonable site variable and the description reads correctly. A reviewer would need to remember the SAP's pooling rule.

Every quote was matched exactly against the saved run text (28 of 28). Where the cause was the input and not the model, the entry says so. Cold good runs only; the deliberately one-line prompt runs are left out. How we check.

Get one workflow a week

Unsubscribe anytime. Privacy.