Skip to content

Clarify tool execution and reaction reply contracts - #285

Merged
iamwavecut merged 1 commit into
mainfrom
fix/tool-call-prompt-contract
Oct 28, 2026
Merged

iamwavecut merged 1 commit into
mainfrom
fix/tool-call-prompt-contract

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

The dialog instructions disagree about text beside tool calls and describe the reaction exception too broadly. The session engine carries text into a final reply only when every call in the batch is react_to_message; text beside a mixed batch is not published.

This change aligns the shared prompt, AI Farm prompt, and reaction tool description with that behavior. It also distinguishes native tool execution from user-requested code/JSON examples, uses explicit conditions for action and freshness tools, and states that queued does not confirm artifact completion or delivery. Runtime execution and textual-call recovery remain unchanged.

Validation:

  • cargo fmt --all and git diff --check passed.
  • cargo clippy --workspace --all-targets -- -D warnings passed.
  • cargo test --workspace: 2,682 passed, 0 failed, 10 ignored.
  • 64 synthetic responses from gemma-4-26b-hauhaucs through its existing GPU0 endpoint, with native tool schemas and no real tool side effects. The initial paired set scored 18/20 for both baseline and candidate. Four variants on six focused cases each scored 4/6. No regressions appeared in this sample; these results do not establish a native tool-calling accuracy improvement.
  • The persistent failures were textual calls for an announcement followed by drawing and for memory lookup. Existing parser recovery handled both candidate outputs. Extra Russian/English end-of-prompt reminders did not fix them and are not included.

The prompts clarify the existing protocol; they do not replace provider parsing or runtime validation. Production verification will use SAFE virtual dialogs after deployment.

@github-actions

Copy link
Copy Markdown
Warnings
⚠️ Prompt files are cache-sensitive contracts; confirm prompt shape and role markers were preserved intentionally.
Messages
📖 Danger checked 3 changed file(s).

Generated by 🚫 dangerJS against 5f2be49

@iamwavecut

Copy link
Copy Markdown
Owner Author

Confirmed: this change intentionally updates instruction text only. The shared_core partial, Handlebars conditions, template inputs, native tool schemas, and role boundaries are unchanged. Prompt rendering tests and the full workspace suite pass. The paired GPU probe rendered both prompt versions with the same variables and tool schemas, apart from the corrected reaction description. No explicit cache identifiers or request layout changed.

@iamwavecut
iamwavecut merged commit 7970c21 into main Oct 28, 2026
12 checks passed
@iamwavecut
iamwavecut deleted the fix/tool-call-prompt-contract branch October 28, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant