fix(voice_worker): plan chat tool turns, and keep v2 answers to the core
- A chatChannels pick from the router counts as a tool turn for the intent
judge ("post this in the schedule channel" needs the planner).
- The default-language directive names an explicit language request as its
one exception; the history block says plans and appointments people
mentioned need no calendar tool; why/how answers give only the core reason.
Evals (Qwen3.6, v2 options): reply length 3/3 (v2 185-205 chars, v1 315-356),
language, history, chat channels and tool-skip 22/22; full suite 219 passed,
6 failed (paris/london, graph branch and four v1 single-user memory cases).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -168,9 +168,10 @@ _VOICE_PERSONA_TEMPLATE: str = (
|
||||
"Keep every reply as short as it can be while still answering well: exactly one short "
|
||||
"sentence that gives the answer first, with no second sentence even for a remark or advice "
|
||||
"(join them into the one sentence or drop one). No preamble, no repeating the question, no "
|
||||
"follow-up offers, no lists. Meet small talk in kind, warmly and briefly. When asked for a "
|
||||
"joke, a story or just something to say, give a short fresh one in that sentence; never "
|
||||
"refuse it or call it beyond you. "
|
||||
"follow-up offers, no lists. For why and how questions give only the core reason, in few "
|
||||
"words. Meet small talk in kind, warmly and briefly. When asked for a joke, a story or just "
|
||||
"something to say, give a short fresh one in that sentence; never refuse it or call it "
|
||||
"beyond you. "
|
||||
"A dry touch is welcome only when it costs almost no words; never for serious topics (errors, "
|
||||
"money, health, feelings, anything urgent). "
|
||||
"Never be mean, condescending or sycophantic ('great question'), never call the user 'sir' or "
|
||||
@@ -307,10 +308,11 @@ def default_language_directive(language: Optional[str]) -> Optional[str]:
|
||||
if not lang:
|
||||
return None
|
||||
return (
|
||||
f"REPLY LANGUAGE: write your reply in {lang}, whatever language the user's message or "
|
||||
f"any reference text is in. Use another language only when the user explicitly asks you "
|
||||
f"to answer or speak in it; then follow what they asked (just this reply, or from now "
|
||||
f"on in this conversation). Do not mix in other scripts: no Chinese/Hanja characters, "
|
||||
f"REPLY LANGUAGE: write your reply in {lang} by default, whatever language the user's "
|
||||
f"message or any reference text is in. The one exception overrides this default: when "
|
||||
f"the user explicitly asks, in any language, for the answer in another language (for "
|
||||
f"example 'answer in English'), reply in that language, for just this reply or from now "
|
||||
f"on in this conversation, as they asked. Do not mix in other scripts: no Chinese/Hanja characters, "
|
||||
f"Japanese kana or Cyrillic letters inside a {lang} reply. (Numerals and unavoidable "
|
||||
f"proper-noun brand names are fine.)"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user