fix(notes): say 'save' in the first 120 characters so the planner plans the note

The planner and router read only the first 120 characters of a tool's
description. personalNotes started by describing the notes, so for
'앞으로 나한테는 짧게 대답해줘' the planner planned a plain reply and the
answer promised to be brief from now on without saving anything.

Eval (qwen3.6-35b-a3b, game PC): from-now-on cases 0/6 -> 6/6, the
one-off and note-shapes-answer cases still pass (15/15).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-18 01:50:16 +09:00
parent 1c06b16bd4
commit c51e5b2f68
3 changed files with 14 additions and 8 deletions

View File

@@ -69,8 +69,11 @@ class TestPersonalNotes:
_, reply = _run(mock_config, eval_db, eval_dialogue_memory, "고양이는 하루에 몇 시간 자?")
assert not _ends_with_roger(reply), reply
def test_asking_for_it_from_now_on_saves_a_note(self, mock_config, eval_db, eval_dialogue_memory):
backend, _ = _run(mock_config, eval_db, eval_dialogue_memory, "앞으로 나한테는 반말로 대답해")
# The second phrasing is from the field (2026-11-18): no note was saved but the answer said
# "from now on I will answer briefly".
@pytest.mark.parametrize("query", ["앞으로 나한테는 반말로 대답해", "자비스 앞으로 나한테는 짧게 대답해줘"])
def test_asking_for_it_from_now_on_saves_a_note(self, mock_config, eval_db, eval_dialogue_memory, query):
backend, _ = _run(mock_config, eval_db, eval_dialogue_memory, query)
adds = [kw for a, kw in backend.acts if a == "add"]
assert adds and adds[0]["text"], backend.acts

View File

@@ -30,11 +30,11 @@ class PersonalNotesTool(Tool):
@property
def description(self) -> str:
return (
"The person's standing instructions for how you answer them from now on, such as how to "
"address them or which units to use. Call it with action='add' only when they ask for "
"something to apply from now on (not for a one-off request), with text as one short "
"instruction in their language; list or delete them when asked. The saved instructions "
"are shown to you on every answer to this person."
"Save (action='add') how the person wants to be answered from now on: how to address "
"them, answer length, units. Use action='add' only when they ask for something to apply "
"from now on (not for a one-off request), with text as one short instruction in their "
"language; saying you will do it without this call saves nothing. List or delete them "
"when asked. The saved instructions are shown to you on every answer to this person."
)
@property

View File

@@ -12,7 +12,10 @@ it to add, list or delete them.
without a backend, scheduled tasks) it is not offered and refuses. The backend acts for the
person asking only.
- **Saved only when asked to apply from now on.** The description tells the model to add a note
only for something the person wants from now on, never for a one-off request.
only for something the person wants from now on, never for a one-off request. Its first sentence
says to save (action='add'), because the router and the planner read only the first 120
characters; when it only described the notes, the planner planned a plain reply and the answer
promised "from now on I will answer briefly" without saving anything (live 2026-11-18).
- **Notes shape answers, never permissions.** The reply engine puts the asker's notes
(`run_reply_engine(person_notes=...)`) in the system prompt inside a `<person_notes>` fence,
labelled as the person's own preferences for how they are answered, to follow unless they conflict