-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
Problem
User feedback in HITL decisions should be attributed as user messages, not embedded in tool messages. Currently, both REJECT and MODIFY flows mix user intent with system status.
Current vs Proposed Message Flow
REJECT
Current:
user: "What about Hansehart?"
assistant: [tool call: search("Hansehart")]
tool: "Tool 'search' rejected by user: I don't want to search, just answer from knowledge" β user feedback hidden in tool msg
assistant: "Hansehart is..."
Proposed:
user: "What about Hansehart?"
assistant: [tool call: search("Hansehart")]
tool: "Tool 'search' rejected by user"
user: "I don't want to search, just answer from knowledge" β proper attribution
assistant: "Hansehart is..."
MODIFY
Current:
user: "What about Hansehart?"
user: "The parameters for tool 'search' were updated to: {query: 'Hansehart founding date'}" β original intent hidden
assistant: [tool call: search("Hansehart founding date")]
tool: [result]
Proposed:
user: "What about Hansehart?"
assistant: [tool call: search("Hansehart")] β original intent visible
tool: "Awaiting user decision"
user: "Make the query more specific: founding date" β user feedback as user msg
assistant: [tool call: search("Hansehart founding date")]
tool: [result]
Why This Matters
- Semantic correctness: User input should have
role: user - LLM behavior: Models weight user messages as instructions
- Transparency: LLM sees what it originally tried + why user intervened
Reference
The MODIFY case already creates a user message for feedback (strategies.py#L629), but REJECT embeds feedback in the tool message (strategies.py#L615). Both should consistently use user messages for user-provided feedback.