Skip to main content

Function Calling Hooks

1 requirement · 4 scenarios

Edit Tool Reflection Prompt

JR-function-calling-hooks-001
After edit tool execution, the system SHALL inject an edit verification prompt to ensure the LLM confirms all requested edits were properly implemented.

The edit reflection prompt SHALL instruct the LLM to:
1. Review what changes were applied
2. Verify the edit succeeded without errors
3. Confirm ALL requested changes were implemented
4. Check if any remaining instances should have been edited
5. Assess whether the result satisfies the user's original intent

The prompt SHALL be injected when ANY tool in the execution round has tool_kind == "edit".

When both edit tools AND information-gathering tools execute in the same round, both reflection prompts SHALL be injected (edit reflection first, then info-gathering reflection).
4 test scenarios
  • Edit tool triggers edit reflection prompt JR-function-calling-hooks-001.1
  • Non-edit tools do not trigger edit reflection JR-function-calling-hooks-001.2
  • Batch with edit and info-gathering tools triggers both reflections JR-function-calling-hooks-001.3
  • Custom edit reflection template is used when configured JR-function-calling-hooks-001.4