Skip to content

align query tool name#1

Merged
rejojer merged 1 commit intodevfrom
fix/query-tool-name-alignment
Apr 5, 2026
Merged

align query tool name#1
rejojer merged 1 commit intodevfrom
fix/query-tool-name-alignment

Conversation

@rejojer
Copy link
Copy Markdown
Member

@rejojer rejojer commented Apr 5, 2026

Summary

This PR aligns the long-document retrieval tool name exposed by the query agent with the name referenced in the agent instructions.

What Changed

  • renamed the internal PageIndex retrieval implementation to a private helper to avoid naming conflicts
  • exposed the query agent tool as pageindex_retrieve so the registered tool name matches the prompt instructions
  • updated query tests to assert the new tool name and added a guard that checks the instructions and registered tool stay aligned

Why

The query agent instructions told the model to call pageindex_retrieve, but the actual registered tool name was retrieve. That mismatch made long-document retrieval less reliable because the model could be instructed to call a tool name that did not exist.

Validation

  • `python3 -m pytest -q tests/test_query.py -k 'TestBuildQueryAgent or TestPageindexRetrieve'

@rejojer rejojer changed the title [codex] align query tool name align query tool name Apr 5, 2026
@rejojer rejojer marked this pull request as ready for review April 5, 2026 15:21
@rejojer
Copy link
Copy Markdown
Member Author

rejojer commented Apr 5, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@rejojer rejojer merged commit 959692a into dev Apr 5, 2026
KylinMountain pushed a commit that referenced this pull request Apr 6, 2026
@rejojer rejojer deleted the fix/query-tool-name-alignment branch April 7, 2026 22:24
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