Pārlūkot izejas kodu

Improved brief handling

Efren Yevale Varela 1 mēnesi atpakaļ
vecāks
revīzija
6bcac1db7e
4 mainītis faili ar 18 papildinājumiem un 14 dzēšanām
  1. 1 1
      config.example.toml
  2. 1 1
      docs/CONFIGURATION.md
  3. 8 6
      src/stt_daemon/config.py
  4. 8 6
      tests/test_config.py

+ 1 - 1
config.example.toml

@@ -92,7 +92,7 @@ trim_block_turns               = 4
 max_tool_iterations            = 3
 system_prompt_chat             = "You are a concise voice assistant. Reply in 1-3 sentences."
 system_prompt_command          = "You translate a spoken request into a single tool call when one applies."
-triage_system_prompt           = "You maintain a living brief of a business conversation. Given the current brief (your previous reply, if any) and a new transcript segment, return the UPDATED brief as plain text only, with no markdown fences and no JSON. Preserve prior content unless the new segment contradicts it; merge duplicates; prune stale items; keep owners, responsibilities, and deadlines explicit. Use short sections: Opportunities, Blockers/Risks, Responsibilities, Decisions, Action Items, Deadlines, Open Questions. Output the brief text directly; never emit tool calls, function-call syntax, or special wrapper tokens."
+triage_system_prompt           = "You maintain a living brief of a business conversation. Given the current brief (your previous reply, if any) and a new transcript segment, return the UPDATED brief as plain text only, with no markdown fences and no JSON. Open with a Summary section: a rolling overview of the conversation so far, one to a few sentences for a short session and growing to a short paragraph or two as the session extends. Preserve prior content unless the new segment contradicts it; merge duplicates; prune stale items; keep owners, responsibilities, and deadlines explicit. Use short sections: Summary, Opportunities, Blockers/Risks, Responsibilities, Decisions, Action Items, Deadlines, Open Questions. Output the brief text directly; never emit tool calls, function-call syntax, or special wrapper tokens."
 
 [triage]
 enabled                   = false

+ 1 - 1
docs/CONFIGURATION.md

@@ -116,7 +116,7 @@ trim_block_turns         = 4                # fallback block trimming, not per-t
 max_tool_iterations      = 3
 system_prompt_chat       = "You are a concise voice assistant. Reply in 1-3 sentences."
 system_prompt_command    = "You translate a spoken request into a single tool call when one applies."
-triage_system_prompt     = "You maintain a living brief of a business conversation. Given the current brief (your previous reply, if any) and a new transcript segment, return the UPDATED brief as plain text only, with no markdown fences and no JSON. Preserve prior content unless the new segment contradicts it; merge duplicates; prune stale items; keep owners, responsibilities, and deadlines explicit. Use short sections: Opportunities, Blockers/Risks, Responsibilities, Decisions, Action Items, Deadlines, Open Questions. Output the brief text directly; never emit tool calls, function-call syntax, or special wrapper tokens."
+triage_system_prompt     = "You maintain a living brief of a business conversation. Given the current brief (your previous reply, if any) and a new transcript segment, return the UPDATED brief as plain text only, with no markdown fences and no JSON. Open with a Summary section: a rolling overview of the conversation so far, one to a few sentences for a short session and growing to a short paragraph or two as the session extends. Preserve prior content unless the new segment contradicts it; merge duplicates; prune stale items; keep owners, responsibilities, and deadlines explicit. Use short sections: Summary, Opportunities, Blockers/Risks, Responsibilities, Decisions, Action Items, Deadlines, Open Questions. Output the brief text directly; never emit tool calls, function-call syntax, or special wrapper tokens."
 
 [triage]                                    # Display-only signal panel (Laya lane; no socket, no extra process)
 enabled              = false                # Master gate: false = no lane, no panel, behavior identical to today

+ 8 - 6
src/stt_daemon/config.py

@@ -147,12 +147,14 @@ class LlmConfig:
     triage_system_prompt: str = (
         "You maintain a living brief of a business conversation. Given the current brief "
         "(your previous reply, if any) and a new transcript segment, return the UPDATED "
-        "brief as plain text only, with no markdown fences and no JSON. Preserve prior "
-        "content unless the new segment contradicts it; merge duplicates; prune stale "
-        "items; keep owners, responsibilities, and deadlines explicit. Use short sections: "
-        "Opportunities, Blockers/Risks, Responsibilities, Decisions, Action Items, "
-        "Deadlines, Open Questions. Output the brief text directly; never emit tool calls, "
-        "function-call syntax, or special wrapper tokens."
+        "brief as plain text only, with no markdown fences and no JSON. Open with a Summary "
+        "section: a rolling overview of the conversation so far, one to a few sentences for "
+        "a short session and growing to a short paragraph or two as the session extends. "
+        "Preserve prior content unless the new segment contradicts it; merge duplicates; "
+        "prune stale items; keep owners, responsibilities, and deadlines explicit. Use short "
+        "sections: Summary, Opportunities, Blockers/Risks, Responsibilities, Decisions, "
+        "Action Items, Deadlines, Open Questions. Output the brief text directly; never "
+        "emit tool calls, function-call syntax, or special wrapper tokens."
     )
     inference_queue_size: int = 8
     trim_block_turns: int = 4

+ 8 - 6
tests/test_config.py

@@ -600,12 +600,14 @@ def test_llm_slot_and_brief_prompt_defaults():
     assert cfg.llm.triage_system_prompt == (
         "You maintain a living brief of a business conversation. Given the current brief "
         "(your previous reply, if any) and a new transcript segment, return the UPDATED "
-        "brief as plain text only, with no markdown fences and no JSON. Preserve prior "
-        "content unless the new segment contradicts it; merge duplicates; prune stale "
-        "items; keep owners, responsibilities, and deadlines explicit. Use short sections: "
-        "Opportunities, Blockers/Risks, Responsibilities, Decisions, Action Items, "
-        "Deadlines, Open Questions. Output the brief text directly; never emit tool calls, "
-        "function-call syntax, or special wrapper tokens."
+        "brief as plain text only, with no markdown fences and no JSON. Open with a Summary "
+        "section: a rolling overview of the conversation so far, one to a few sentences for "
+        "a short session and growing to a short paragraph or two as the session extends. "
+        "Preserve prior content unless the new segment contradicts it; merge duplicates; "
+        "prune stale items; keep owners, responsibilities, and deadlines explicit. Use short "
+        "sections: Summary, Opportunities, Blockers/Risks, Responsibilities, Decisions, "
+        "Action Items, Deadlines, Open Questions. Output the brief text directly; never "
+        "emit tool calls, function-call syntax, or special wrapper tokens."
     )
     assert cfg.llm.brief_compaction_system_prompt == (
         "You compress a triage briefing conversation. Preserve every opportunity, blocker, "