fix: references at the end, never in the body
Some checks failed
Forgejo Docker Build / Build Docker image (push) Blocked by required conditions
Forgejo Docker Build / Deploy to the host (push) Blocked by required conditions
Forgejo Android APK / Root app tests (push) Successful in 46s
Forgejo Docker Build / Root app tests (push) Successful in 54s
Forgejo Android APK / Build signed APK (push) Has been cancelled

A slide carrying [1] markers is unreadable from the back of a room, and an
article that cites inline reads as a paper rather than as teaching material. The
model is now told explicitly not to cite in the body — no bracketed numbers, no
parenthetical "(Nelson, p. 2604)" inside sentences — and to put everything it
drew on in a References section at the end, which in a presentation is the final
slide.

Checked rather than assumed: a six-slide deck generated through the grounded
path contains zero in-text citation markers, and ends with a References slide.
The prose keeps the specificity that grounding is for — bilirubin produced at
two to three times the adult rate, conjugation immature until about two weeks,
thresholds in mg/dL — without a single marker interrupting it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
This commit is contained in:
Daniel 2026-09-11 14:37:47 +02:00
parent f7cd8b39a3
commit 94f1290aae
2 changed files with 12 additions and 4 deletions

View file

@ -152,9 +152,12 @@ function buildGeneratePrompt(opts) {
source += '\nThe following excerpts come from this institution\'s indexed clinical library. ' +
'Prefer them over your own recall wherever they disagree, and do not contradict them. ' +
'They are reference material, not a template: write the resource in your own words.\n\n' +
'End the resource with a short References section listing only the excerpts you actually ' +
'drew on, by title and page. In a presentation this is the final slide, titled References. ' +
'Do not invent references, and do not list an excerpt you did not use.\n\n' +
'Do NOT cite in the body: no [1] markers, no bracketed numbers, no parenthetical ' +
'"(Nelson, p. 2604)" inside sentences. Teaching material reads as prose, and a slide ' +
'carrying citation markers is unreadable from the back of a room.\n\n' +
'Instead, end the resource with a short References section listing only the excerpts you ' +
'actually drew on, by title and page. In a presentation this is the final slide, titled ' +
'References. Do not invent references, and do not list an excerpt you did not use.\n\n' +
'LIBRARY EXCERPTS:\n"""\n' + corpusContext + '\n"""\n';
}

View file

@ -113,7 +113,12 @@ test('the corpus block tells the model to prefer it over recall', () => {
assert.match(route, /reference material, not a template/, 'so it writes rather than copies');
// Provenance a clinician can check, on the deck itself rather than only in a
// log. Restricted to excerpts actually used, and explicitly not invented.
assert.match(route, /In a presentation this is the final slide, titled References/);
// References belong at the end, never in the body: a slide carrying [1]
// markers is unreadable from the back of a room, and an article reads as
// prose, not as a paper.
assert.match(route, /Do NOT cite in the body: no \[1\] markers, no bracketed numbers/);
assert.match(route, /In a presentation this is the final slide, titled/);
assert.match(route, /'References\. Do not invent references/);
assert.match(route, /Do not invent references, and do not list an excerpt you did not use/);
// Opt in: a resource on something the library does not cover is better
// written without it than padded with the nearest unrelated excerpts.