fix: remove developer note from transfer_to_agent tool description#4731
fix: remove developer note from transfer_to_agent tool description#4731giulio-leone wants to merge 1 commit intogoogle:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Response from ADK Triaging Agent Hello @giulio-leone, thank you for creating this PR! Could you please include a |
There was a problem hiding this comment.
Code Review
This pull request correctly moves a developer-facing note from the transfer_to_agent function's docstring to an inline code comment. This change prevents the note from being part of the tool's schema sent to the LLM, which avoids potential confusion and token wastage, as described in the pull request. The implementation is clean and effectively resolves the stated issue.
707df76 to
f837afa
Compare
The docstring of transfer_to_agent() included a 'Note:' section with developer-facing advice about preferring TransferToAgentTool. Since FunctionTool uses the full docstring as the tool description sent to the model on every invocation, this note was consuming input tokens and adding irrelevant information to the model context. Move the note to an inline comment in the function body so it remains visible to developers but is not included in the tool description. Fixes google#4615
f837afa to
fe7ed77
Compare
The
transfer_to_agenttool's description contains internal developer notes that get passed to the LLM as part of the tool schema. This can confuse models and waste tokens.This PR cleans up the description to only include user-facing information.
Supersedes #4654 (closed due to CLA issue, now resolved).
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com