Use these notes to review a concept or read at your own pace. The interactive workspace above adds predictions, editable code, and actual run results.
IDEA 1
A correction changes the evidence you should use
A newsroom fact check compares specific claims with identified evidence. The designated fixture stores versions of each fact. The readCurrentFact tool selects the highest numeric version, representing the latest correction in this simplified source system. It does not assume every newer document on the internet is more trustworthy.
Two different texts at the same current version are a conflict. The tool reports conflict instead of selecting the most convenient text. The controller should also reject a draft that repeats an older value even when the old note really existed. Evidence can be authentic and still be outdated for the claim being checked.
Follow the designated correction record
- Earlier record. Version 1 states a 3 p.m. start.
- Correction. Version 2 states a 4 p.m. start.
- Compare draft. An old 3 p.m. claim now needs revision.
Version numbers are an authored authority rule for this fictional newsroom.
Check the text after the tool resolves versions
if (fact.status === "ok" && claim.text !== fact.text) {
issues.push("outdated_or_wrong:" + claim.factId);
}The controller checks the actual selected evidence. Calling a source tool without using its result would not verify the claim.
Think it through: Two texts conflict at the designated latest version. What should the checker do?
IDEA 2
Quotes and publication require their own checks
A direct quote claims that a source used particular words. This exercise verifies exact membership in an authored quote list. If the draft's quotation is absent, label it unsupported_quote; do not turn a paraphrase into a quotation by adding quotation marks. The narrow matcher does not replace a real editor's contextual judgment.
A factually checked draft still needs approval for its exact version. The simulation only returns a publication receipt and posts nothing. All people, events, facts, and interview material are fictional; this project does not investigate real classmates or make allegations. The useful agent pattern is separate proposed text, independent evidence checks, and a controlled action boundary.
Keep three review tracks visible
- Facts. Verify claims against current designated records.
- Quote. Find the exact wording in the supplied quote source.
- Editor. Match approval to the reviewed draft version.
- Preview receipt. Simulate the action only after every check passes.
A correct fact cannot compensate for an invented quote or a stale approval.
A quote is not a paraphrase
// Source: "We start at four."
// Draft: "We definitely start at four sharp."
// The longer sentence is not an exact supported quote.Even a similar meaning does not justify attributing added words to the speaker.
Think it through: The facts match, but a draft quote is absent from the supplied interview. What happens?
Put it into practice
Reject old or conflicting facts and unsupported quotes before a version-approved simulated publication.
- Run the corrected-time case and compare the draft with the tool's current fact.
- Insert the actual text comparison.
- Run all cases and inspect the blocked publication traces.
- Try a different exact quote in the custom fixture, then change the draft version.
Your next experiment: Add a new correction at version 3. Which draft field must change, and why would the old approval no longer be enough after that edit?
Read the current designated evidence, preserve conflicts, verify exact quotes, and keep approval tied to the final draft.
Key terms
- Correction
- An explicit update to a previously stated fact.
- Direct quote
- Words attributed to a source as that source's actual wording.
- Conflict
- Evidence records that disagree under the current source-selection rule.
Sources and scope
Original Stemtiq teaching, reviewed 2026-09-14. The named researchers and organizations do not endorse this course. Classroom cases are authored exercises, not published findings.
Lewis et al. · NeurIPS: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
NeurIPS 2020
Combine information retrieval with generation so a model can use external passages while producing an answer.
The paper uses a trained neural retrieval and generation architecture. A keyword lookup illustrates retrieval but neither reproduces that architecture nor proves a retrieved claim true.
Anthropic: Effective context engineering for AI agents
29 September 2025
Curate limited context, retrieve relevant information, and distinguish compaction, external notes, and separate subagent contexts during longer tasks.
Summaries can lose details. Persistent notes do not change model weights or establish truth, and a larger context window does not guarantee perfect recall.
OpenAI: Guardrails and human review
Reviewed 13 September 2026 · undated documentation
Distinguish automatic checks from approval decisions, pause sensitive tool requests, retain state, and resume after an application approves or rejects them.
Model-generated approval text is not authorization. Resume examples that automatically approve a request do not establish that a person reviewed it.
Anthropic: Demystifying evals for AI agents
9 January 2026
Define tasks, trials, and graders; inspect both execution records and final outcomes; repeat trials when model behavior varies.
A score depends on its cases and grading rules. Repeating a deterministic classroom case does not measure the variability of a live model.