docs(analyze): refresh DEFAULT_SYSTEM_PROMPT doc-comments after prompt swap

The doc-comments still described the old permissive prompt (the c414cf52
sandbox validation, the "AKTIVE KORREKTUR" rationale, the old block layout).
Rewrite them to describe the current "flag, don't guess" prompt and to note
that DEFAULT_SYSTEM_PROMPT and LLAMA_SYSTEM_PROMPT are now content-identical.
This commit was merged in pull request #18.
This commit is contained in:
2026-07-18 14:42:30 +02:00
parent 1a87c6b5ea
commit 65a84655a9
+19 -18
View File
@@ -42,26 +42,27 @@ const LLAMA_FORMAT_INSTRUCTION: &str = "AUSGABEFORMAT: Antworte ausschließlich
/// Default system prompt for the consolidation LLM. Used by all backends /// Default system prompt for the consolidation LLM. Used by all backends
/// unless overridden via `with_system_prompt`. /// unless overridden via `with_system_prompt`.
/// ///
/// Sandbox-validated against case `c414cf52` (3 runs each, fair pipeline /// This is the "flag, don't guess" prompt: the model keeps the dictated
/// with pre- and post-LLM gazetteer pass against the current vocab): /// (ASR) wording verbatim and only wraps uncertain stretches in `==...==`
/// - eliminates two hallucination classes the previous prompt produced — /// for the doctor to check. It must never substitute a term with a guess,
/// unmarked "Hypotonie" when the dictation said "Hypertonie" (0/3 vs 2/3), /// drop a negation / finding / value, invert meaning, or invent facts —
/// and inventing a unit ("35 ng/l") for a dictated value without unit /// term repair is delegated to the gazetteer's pre-LLM pass, so the prompt
/// (0/3 vs 2/3) /// stays purely about clinical fidelity.
/// - keeps Latin terms intact ("Punctum Maximum", "Apex Cordis", "Axilla" ///
/// in 3/3 vs 2/3) /// It replaced an earlier permissive prompt that let the model rewrite
/// - relies on the gazetteer for drug-name correction (Enoxaparin etc.) — /// terms and merely bracket the original — which, when the guess was wrong,
/// the prompt no longer needs a separate "AKTIVE KORREKTUR" hammer-block /// inverted meanings, deleted negations, or invented drugs/doses. A/B'd in
/// because the gazetteer's pre-LLM pass repairs typical typos before the /// the experiments sandbox against 16 real alpha-test cases (full pipeline,
/// LLM ever sees them /// three runs each, independently judged): it cut the per-run dangerous-error
/// - block layout: AUFGABE / QUELLE / KORREKTUR-POLITIK / TREUE / CHRONOLOGIE /// rate several-fold and eliminated the occasional empty-output run
/// / DOSIERUNGSSCHEMA / MARKIERUNGEN — each rule appears exactly once /// (reasoning length-exhaustion) the old prompt produced. Content-identical
/// to [`LLAMA_SYSTEM_PROMPT`].
const DEFAULT_SYSTEM_PROMPT: &str = include_str!("../../prompts/default_system_prompt.md"); const DEFAULT_SYSTEM_PROMPT: &str = include_str!("../../prompts/default_system_prompt.md");
/// Llama-specific system prompt. Currently identical to the default; kept /// Llama system prompt. Content-identical to [`DEFAULT_SYSTEM_PROMPT`] — the
/// as a separate file so adjustments for Llama-3.1's behaviour (e.g. /// default was replaced by this same "flag, don't guess" prompt. Kept as a
/// stricter "do not hallucinate" wording) can be tuned independently of /// separate file so Llama-3.1-specific wording can diverge later without
/// gpt-oss without forking the default for everyone. /// forking the default for everyone.
const LLAMA_SYSTEM_PROMPT: &str = include_str!("../../prompts/llama_system_prompt.md"); const LLAMA_SYSTEM_PROMPT: &str = include_str!("../../prompts/llama_system_prompt.md");
#[derive(Debug)] #[derive(Debug)]