mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
feat(ai): allow lists and one bold takeaway in the formatting contract
The shared contract banned every structure beyond 1-3 paragraphs, so longer replies read as unformatted blocks. It now asks for short blank-line paragraphs (2-4 on longer replies), permits a plain "- " list when a reply genuinely enumerates three or more parallel items, and one bold key takeaway per reply. The Coach ground rule keeps prose-first; a list is the exception, never the default shape.
This commit is contained in:
1 parent
a778a0b2f7
commit
e754979abf
2 files changed
+21
-13
No files matched your search
@@ -49,9 +49,11 @@ Prompt version: ${PROMPT_VERSION}.
|
||||
GROUND RULES
|
||||
|
||||
1. Prose-first. Write the way a thoughtful friend would talk through
|
||||
the data. No bullet lists in the body unless the user asks for a
|
||||
checklist; no JSON, no markdown fences, no inline number-dumps. Keep
|
||||
replies focused — usually 60-180 words, sometimes shorter.
|
||||
the data, in short paragraphs separated by blank lines. A "- " list
|
||||
is allowed when the user asks for a checklist or when you genuinely
|
||||
enumerate three or more parallel items — never as the default shape.
|
||||
No JSON, no markdown fences, no inline number-dumps. Keep replies
|
||||
focused — usually 60-180 words, sometimes shorter.
|
||||
|
||||
2. Values belong in the evidence block. If a specific number is
|
||||
load-bearing, cite it once in prose ("your last 30 days sit a few
|
||||
@@ -590,11 +592,12 @@ Prompt-Version: ${PROMPT_VERSION}.
|
||||
GRUNDREGELN
|
||||
|
||||
1. Fließtext zuerst. Schreib so, wie ein aufmerksamer Freund die
|
||||
Daten durchgehen würde. Keine Bullet-Listen im Antworttext, sofern
|
||||
der Nutzer nicht ausdrücklich nach einer Checkliste fragt; kein
|
||||
JSON, keine Markdown-Fences, keine Zahlen-Aufzählungen im
|
||||
Fließtext. Halte Antworten fokussiert — meist 60-180 Wörter,
|
||||
manchmal kürzer.
|
||||
Daten durchgehen würde — in kurzen Absätzen, getrennt durch
|
||||
Leerzeilen. Eine "- "-Liste ist erlaubt, wenn der Nutzer nach einer
|
||||
Checkliste fragt oder du wirklich drei oder mehr parallele Punkte
|
||||
aufzählst — nie als Standardform. Kein JSON, keine Markdown-Fences,
|
||||
keine Zahlen-Aufzählungen im Fließtext. Halte Antworten fokussiert —
|
||||
meist 60-180 Wörter, manchmal kürzer.
|
||||
|
||||
2. Werte gehören in den Evidenz-Block. Wenn eine konkrete Zahl die
|
||||
Antwort trägt, nenne sie einmal im Fließtext ("die letzten 30
|
||||
|
||||
@@ -142,13 +142,18 @@ Schließe, wenn es passt, mit einem kleinen Ausblick, damit sich die Person in d
|
||||
* the shared `ProseBlocks` helper, which turns a blank line into a real
|
||||
* paragraph break — but only if the model emits one. This single fragment asks
|
||||
* for that structure on every narrative surface so a longer assessment reads as
|
||||
* 1–3 short paragraphs instead of one run-on block. It is whitespace, never
|
||||
* markup: the grounding verifiers operate on extracted numbers / causal verbs
|
||||
* and are whitespace-agnostic, so this changes nothing they grade.
|
||||
* short paragraphs instead of one run-on block.
|
||||
*
|
||||
* v1.27.2 — the renderer grew a closed-set list + bold vocabulary (`- ` lines
|
||||
* become a real `<ul>`, `**bold**` becomes `<strong>` — pure string splitting,
|
||||
* still no markdown library), so the contract now permits exactly those two
|
||||
* shapes where they genuinely help, instead of banning all structure. The
|
||||
* grounding verifiers operate on extracted numbers / causal verbs and are
|
||||
* whitespace-agnostic, so this changes nothing they grade.
|
||||
*/
|
||||
export const formattingContract: SharedContract = {
|
||||
en: `FORMATTING — write in 1–3 short paragraphs separated by a BLANK LINE, each 1–3 sentences. Put a blank line between distinct ideas (e.g. "where things stand" vs "one thing to try"). A steady one-liner stays a single paragraph — do NOT pad to fill a second. No markdown, no headings, no asterisks, no bullet points, no emojis.`,
|
||||
de: `FORMATIERUNG — schreibe in 1–3 kurzen Absätzen, getrennt durch eine LEERZEILE, je 1–3 Sätze. Setze eine Leerzeile zwischen unterschiedliche Gedanken (z. B. "wie es steht" vs. "eine Sache zum Ausprobieren"). Ein stabiler Einzeiler bleibt EIN Absatz — strecke nicht auf einen zweiten. Kein Markdown, keine Überschriften, keine Sternchen, keine Aufzählungen, keine Emojis.`,
|
||||
en: `FORMATTING — write in short paragraphs separated by a BLANK LINE, each 1–3 sentences; a longer reply is 2–4 paragraphs, never one block. Put a blank line between distinct ideas (e.g. "where things stand" vs "one thing to try"). A steady one-liner stays a single paragraph — do NOT pad to fill a second. When you genuinely enumerate three or more parallel items (options, findings, steps), format them as a plain list: one item per line, each line starting with "- ". You may bold the single most important takeaway with **double asterisks**, at most once per reply. Nothing else: no headings, no italics, no backticks, no numbered lists, no emojis.`,
|
||||
de: `FORMATIERUNG — schreibe in kurzen Absätzen, getrennt durch eine LEERZEILE, je 1–3 Sätze; eine längere Antwort hat 2–4 Absätze, nie einen Block. Setze eine Leerzeile zwischen unterschiedliche Gedanken (z. B. "wie es steht" vs. "eine Sache zum Ausprobieren"). Ein stabiler Einzeiler bleibt EIN Absatz — strecke nicht auf einen zweiten. Wenn du wirklich drei oder mehr parallele Punkte aufzählst (Optionen, Befunde, Schritte), formatiere sie als schlichte Liste: ein Punkt pro Zeile, jede Zeile beginnt mit "- ". Die EINE wichtigste Kernaussage darfst du mit **doppelten Sternchen** fett setzen, höchstens einmal pro Antwort. Sonst nichts: keine Überschriften, kein Kursiv, keine Backticks, keine nummerierten Listen, keine Emojis.`,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user