This lesson is an optional deeper look that goes with course F04. It has worked examples with numbers and technical words. Start with F04 if you are new. Go to course F04 →
Checking AI Output
You can audit a short AI reply that mixes prose, a citation, figures, and code. You can mark each claim the evidence bundle does not support, each figure that fails a hand calculation, and each import or formula that fails in a closed test folder.
- Level
- First Light
- Time
- 12 h
- Prerequisites
- F04

Jump to
After this course you can
The student can audit a seeded dossier containing prose, citations, calculations, and code, identifying every planted factual error, non-existent citation, and code bug against a supplied evidence bundle.
Open the source before you reuse the sentence
When a chat reply names a paper, a law, a webpage, or a dataset, open that source yourself before you reuse the sentence. A primary source is the document where the fact was first written: the paper, the statute, the official table, or the organization's own filing. A news summary, a blog, or a second chat reply is a retelling. Retellings drop conditions, years, and units. If you cannot open the original, treat the claim as unchecked.
A link can look real and still fail. Paste the full address into the address bar and read the page that loads. Check the domain, the date, and the sentence the reply quoted. A DOI is the fixed identifier many publishers assign to one paper, usually starting with 10. followed by a number. Look it up in a DOI resolver or on the publisher's site. A working DOI opens one work. A made-up DOI returns nothing, or it opens a different paper from the one named in the reply.
Figures and libraries nobody supplied
A model can print a percentage, a sample size, and a margin of error together. That shape does not mean anyone measured it. Statistical fabrication means a figure that was never produced by the method the reply describes. Ask where the number lives: which table, which year, which population. Then recompute the arithmetic on paper. If the reply says 40 of 200 people chose an option, that is 20 percent. If it names no table you can open, mark the figure unsupported and leave it out of your own writing.
Code fails in a similar way. The reply may import a library that does not exist, or a function the real library never shipped. An invented import is a package or function name the model wrote because it sounded right. Before you run anything, read the import lines and search the official documentation for that exact name. If the package is missing from the language's package index, stop. Do not install a near-match a search engine suggests. Check function names, argument order, and units the same way.
Run the code where it cannot touch your files
Generated code should run in isolation the first time. Isolation means the program cannot read your documents, your passwords, or the network, and it cannot write outside one empty folder you made for the test. Use a spare machine or a closed online notebook that cannot open your real files. Copy only the sample inputs into that folder. If the code asks for a key, a password, or a path into your home folder, do not give it one.
Run the code and read what comes back. If it crashes, the message often names the missing package or the bad argument. That is evidence, so copy the message into your notes. If it prints a number, compare that number with a value you worked by hand on a small input. A program that crashes on an invented import has already shown a fault. A program that runs and prints the wrong number is easier to miss, which is why the hand calculation stays beside the output.
Three models, and the pull to agree
Ask the same question of three models and label the replies Model A, Model B, and Model C. Keep the wording identical, including the numbers and the constraints. Put the three answers in three columns. Mark where they agree, where they contradict, and where one reply adds a detail the others never mentioned. Agreement is a clue, and it can still be a shared mistake, so the agreed sentence still needs a primary source. A detail that appears in only one column is the first place to check.
Sycophancy is the habit of agreeing with the person who asked, even when that person is wrong. You can test it by stating a false claim and asking the model to confirm. Say, as an example, that 15 percent of 80 is 14. Fifteen percent of 80 is 0.15 times 80, which is 12. A model that praises the working and repeats 14 is following you. A model that shows 12 is checking the arithmetic. Send that prompt to Model A, Model B, and Model C.
The Logbook is the notebook where you keep this checking work. One row per claim is enough. Write the claim, which model produced it, the source you opened, the result of the check, and the date. For code, add the command, the folder, and the output or the error. For a three-model comparison, add which column disagreed. A week later the row shows what you already opened. A claim with an empty source cell stays out of anything you send on.
Three faults in one short reply
Here is an example reply you can audit with a pen. "Of 240 orders, 30 percent arrived late, so 80 orders were late. The figure is in the paper doi:10.9999/example.late.2020. This code prints the mean delay in minutes: import lateorderkit; delays = [10, 20, 30, 40]; print(sum(delays) / 3)." The DOI and the library name were invented for this example. They stand in for the kind of citation and import a model can print. Your job is to find three separate faults.
Fault one is the arithmetic. Thirty percent is the multiplier 0.30. Then 240 times 0.30 equals 72, because 240 times 3 equals 720, and the decimal point moves one place. The reply says 80, which is 8 orders higher. A second route: 10 percent of 240 is 24, and three times 24 is 72. The line that says 80 orders were late fails the hand check.
Fault two is the citation. The evidence bundle for this example contains one table: 240 orders, 72 late. It contains no paper, and it lists no DOI. The reply points to doi:10.9999/example.late.2020, a string written for this example. Because the bundle has no document with that identifier, the citation has nothing behind it. A citation counts only when the bundle, or a page you open, contains that identifier and the matching sentence. Record "no source in the bundle" in the Logbook.
Fault three is the code. The bundle allows only built-in arithmetic. The name lateorderkit was invented for this example, so that import has no package behind it. Set the import aside. The delays are 10, 20, 30, and 40. Their sum is 100. There are 4 numbers, so the mean is 100 divided by 4, which is 25. The reply divides by 3. Then 100 divided by 3 is 33.33 with 3 repeating, which is the wrong mean.
Audit a second dossier on paper
Use a pen or a plain text file. The evidence bundle has one table: 150 tickets, of which 30 were reopened. It includes no paper and no DOI. It allows only built-in arithmetic. The reply says: "Of 150 tickets, 20 percent were reopened, which is 40 tickets. See doi:10.9999/example.tickets.2019. This code prints the mean: import ticketmagic; nums = [5, 5, 5, 5]; print(sum(nums) / 5)." The DOI and ticketmagic were written for this exercise. Find each fault, recompute the figures, and add one Logbook row per fault.
When the check is complete you have three rows. Row one: 20 percent of 150 is 0.20 times 150, which is 30, so the reply's 40 is 10 too high. The bundle's table already says 30. Row two: the DOI is absent from the bundle, so the citation is unsupported. Row three: 5, 5, 5, and 5 sum to 20, there are 4 values, and the mean is 5. Dividing by 5 prints 4, and ticketmagic is not allowed. Each row names the claim, the check, and the result.
Check questions
Before you reuse a factual sentence from a chat reply, what do you open?
The primary source: the document where the fact was first written, such as the paper, the statute, the official table, or the organization's own filing. A retelling leaves the claim unchecked.
In the worked example, 30 percent of 240 was reported as 80. What is the correct count, and by how many is 80 off?
The correct count is 72, because 0.30 times 240 equals 72. The reported 80 is 8 too high.
What must be true of the folder where you first run generated code?
The program cannot read your documents, your passwords, or the network, and it cannot write outside that empty test folder. Any printed number is compared with a hand calculation.
As an example you tell a model that 15 percent of 80 is 14. What is the correct product, and which reply is sycophantic?
The correct product is 12, because 0.15 times 80 equals 12. The sycophantic reply praises the working and repeats 14.
Check the source, the arithmetic, and the code before you pass a reply on. When Model A, Model B, and Model C agree, the Logbook still needs the page or the calculation next to that sentence.
Final task
Complete a keyed audit of a frozen 20-claim dossier and a 150-line script, identifying all 12 planted defects by exact line/claim ID and submitting corrected code that passes the fixed regression test suite. (Optional Portfolio item: three-model comparison Logbook entry).
This lesson is open to read. Tests, diplomas and accounts come later; the waitlist is for those. Join the waitlist