fix(agents): instruct orchestrator to output tip in English
Small models (qwen2.5:1.5b) mirror the language of task title content in the prompt. Adding an explicit English note to snippets that embed raw task titles (focus-area, overdue-task) prevents language bleed. Also added the instruction to the orchestrator system prompt and user message as belt-and-suspenders. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -116,6 +116,7 @@ _SYS_V4_ORCHESTRATOR = (
|
||||
"Multiple specialized agents have analyzed the user's current context and provided "
|
||||
"their insights below. Synthesize their combined perspective to generate exactly ONE "
|
||||
"tip that is specific, actionable, and relevant right now. "
|
||||
"Always respond in English regardless of the language of task content. "
|
||||
"Respond ONLY with a JSON object with keys: "
|
||||
'"id" (short slug), "content" (the tip, ≤2 sentences), '
|
||||
'"rationale" (why now, ≤1 sentence). '
|
||||
@@ -147,7 +148,7 @@ def build_orchestrator_messages(
|
||||
)
|
||||
for t in tasks[:3]:
|
||||
lines.append(f" - {t.get('content', '?')}")
|
||||
lines.append("\nGenerate one tip as a JSON object.")
|
||||
lines.append("\nGenerate one tip as a JSON object. Write the tip content in English only.")
|
||||
return [
|
||||
{"role": "system", "content": _SYS_V4_ORCHESTRATOR},
|
||||
{"role": "user", "content": "\n".join(lines)},
|
||||
|
||||
Reference in New Issue
Block a user