diff --git a/src/routes/learningAI.js b/src/routes/learningAI.js index 28c40f2f..6184eb62 100644 --- a/src/routes/learningAI.js +++ b/src/routes/learningAI.js @@ -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'; } diff --git a/test/learning-retrieval.test.js b/test/learning-retrieval.test.js index abb6ae2a..451493a5 100644 --- a/test/learning-retrieval.test.js +++ b/test/learning-retrieval.test.js @@ -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.