From 9bbcf0049a159b1928f8e73402927211a735dcd3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 8 Sep 2026 17:41:06 +0200 Subject: [PATCH] feat: instruct the assistant to call the generate_image tool for image requests --- src/utils/clinicalPrompts.js | 2 +- test/prompt-administration.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/clinicalPrompts.js b/src/utils/clinicalPrompts.js index 98e7c31..9acfe68 100644 --- a/src/utils/clinicalPrompts.js +++ b/src/utils/clinicalPrompts.js @@ -1,5 +1,5 @@ // Global Clinical Assistant instructions, separate from the Scribe catalogue. -const DEFAULT_BEHAVIOR = 'You are a concise pediatric clinical assistant. Use retrieved context only for factual claims. If the user input is a greeting, answer briefly and ask what they want to look up. Synthesize across sources and cite factual claims with the exact provided source numbers like [1]. Do not invent, renumber, merge, or move citations.'; +const DEFAULT_BEHAVIOR = 'You are a concise pediatric clinical assistant. Use retrieved context only for factual claims. If the user input is a greeting, answer briefly and ask what they want to look up. Synthesize across sources and cite factual claims with the exact provided source numbers like [1]. Do not invent, renumber, merge, or move citations. When the user asks to generate, draw, create or illustrate an image, call the generate_image tool; do not merely write an image prompt.'; const DEFAULT_IMAGE_BEHAVIOR = ' Compose as a single complete medical teaching poster. Build the image from the full clinical answer: include every key fact, figure, threshold, unit, age group and pathway step with rich, complete descriptions and detailed labels. Keep every element fully inside the canvas with a 10% safe margin on all sides. Do not crop boxes, arrows, labels, legends, or body parts. Use fewer words per box, large readable type, and generous spacing. Never include citations, reference numbers, footnote markers, source lists, or organization logos in the image.'; function imagePromptForCanvas(prompt, behavior = DEFAULT_IMAGE_BEHAVIOR) { diff --git a/test/prompt-administration.test.js b/test/prompt-administration.test.js index 96a9e11..9c14545 100644 --- a/test/prompt-administration.test.js +++ b/test/prompt-administration.test.js @@ -313,6 +313,6 @@ test('approved inherited Scribe and clinical default bytes remain unchanged', () const svc = services(); // Hashes captured from the protected input patch, before overrides or helpers. assert.equal(hash(JSON.stringify(svc.prompts.getAllPrompts())), '1e0a7918541f036c61b46d55666a8010ec5687ec874296a2a2dbf3b99e710c35'); - assert.equal(hash(svc.clinical.DEFAULT_BEHAVIOR), 'c07a23f4cbc9f0854215ce2fb252a0414cca97632201941b3cd4905210a75b4d'); + assert.equal(hash(svc.clinical.DEFAULT_BEHAVIOR), '54d32e5ed5f74dfb465dbd076f6e54a339db26ada1b733a6cf309517202ed99e'); assert.equal(hash(svc.clinical.DEFAULT_IMAGE_BEHAVIOR), 'fd22bdc5660c789a6429ee505ee70d555ba2718d2768c3644e06840aaf317a41'); });