fix(reply): known user location reaches getWeather; retries are not blocked by the previous reply
- Drop the engine's deterministic Korean weather shortcut. It bypassed the chat model and the tool runner, so a location the user had stated could never be used. The tool already returns one clean Korean sentence. - getWeather and the tool-argument prompts pass the place the user has said they are (conversation or memory) and leave the argument empty otherwise, so the detected location is not copied into it. - getWeather retries a "district, city, country" name with its leading parts dropped when the geocoder finds nothing. - The planner gets the live time/location line and plans searchMemory topic='where the user lives' only when the location is unknown or disabled. - The per-reply repeat guard counts only this reply's tool messages, so calls carried over from the previous reply no longer block a retry the user asks for. - Memory extractor: the context block sits after the examples and the no-location example uses a different query, so a location already in context is not asked for again. New counterpart eval checks that it is still asked for when the context has none. - Tool retry eval fails every call in turn 1, so a model that retries by itself inside turn 1 still exercises the user's "try again". - Specs (planner, reply), docs/llm_contexts.md and the roadmap updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,11 @@ one turn's allow-list.
|
||||
|
||||
### Prompt contract (plan_query)
|
||||
|
||||
The planner's user message also carries a `LIVE CONTEXT:` line: the
|
||||
engine's live time/location string (`_live_time_location_string`), passed
|
||||
as `plan_query(..., live_context=...)`. It lets the planner tell a known
|
||||
location from an unknown one without seeing any memory content.
|
||||
|
||||
The planner's AVAILABLE TOOLS lines come from `planner_tool_catalog(schema)`:
|
||||
the tool's first description line plus its argument names, e.g.
|
||||
`getWeather: Weather only ... (args: location)`. Without the argument names
|
||||
@@ -83,6 +88,11 @@ The planner prompt instructs the model to emit:
|
||||
when** answering requires information the user shared in prior
|
||||
conversations. Omit otherwise — every extra directive is an
|
||||
avoidable LLM call downstream.
|
||||
- The same directive (`searchMemory topic='where the user lives'`) before a
|
||||
tool step that needs a fact about the user themself, such as where they
|
||||
are, when neither the LIVE CONTEXT nor the dialogue gives it (the live
|
||||
context says `Location: Unknown` or `Location: Disabled`). When the live
|
||||
context gives a location, a plain weather ask stays memory-free.
|
||||
- Tool names from the provided catalog only (exact match), for any
|
||||
concrete tool step.
|
||||
- Concrete arguments composed against dialogue context, not the raw
|
||||
|
||||
Reference in New Issue
Block a user