feat(dataplex): improve dataplex params#2855
Conversation
Remove redundant name parameter and derive it from entry parameter.
Remove redundant name parameter and derive it from resources parameter.
This is done to make dataplex tool param descriptions more clear to the agents.
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 significantly refines the Dataplex tools to enhance their usability and accuracy for AI agents. By removing redundant parameters, automating resource path derivation, and implementing robust input validation, the changes aim to make tool selection more precise and reduce potential errors. The improved descriptions also provide clearer guidance, ultimately leading to a more efficient and reliable interaction with Dataplex services. Highlights
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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the Dataplex lookup_entry and lookup_context tools by removing the explicit name parameter, now deriving the project and location from the entry or resources fields. It introduces validation for resource name formats and ensures consistency across multiple resources for lookup_context. Tool and parameter descriptions were also updated for clarity. A review comment suggests improving error handling in dataplexlookupentry.go by immediately checking the error from parameters.ConvertAnySliceToTyped for better readability and adherence to the "fail fast" principle.
internal/tools/dataplex/dataplexlookupentry/dataplexlookupentry.go
Outdated
Show resolved
Hide resolved
internal/tools/dataplex/dataplexlookupcontext/dataplexlookupcontext.go
Outdated
Show resolved
Hide resolved
internal/tools/dataplex/dataplexsearchentries/dataplexsearchentries.go
Outdated
Show resolved
Hide resolved
|
/gcbrun |
|
/gcbrun |
internal/tools/dataplex/dataplexlookupcontext/dataplexlookupcontext_test.go
Outdated
Show resolved
Hide resolved
internal/tools/dataplex/dataplexlookupentry/dataplexlookupentry_test.go
Outdated
Show resolved
Hide resolved
|
@sumedhdk22 seems like dataplex integration tests is failing~ |
|
/gcbrun |
|
/gcbrun |
## Description feat(dataplex): refine dataplex tools for better agent usability Refines the parameters and descriptions for Dataplex tools to reduce redundancy and improve tool selection accuracy for AI agents. Key changes: - Removed the redundant 'name' parameter from 'lookup_entry' and 'lookup_context' tools. - Implemented automatic derivation of the parent resource path (project and location) from the 'entry' or 'resources' arguments. - Added validation logic to ensure provided resource names follow the correct format and that all resources in a batch request belong to the same project and location. - Enhanced tool and parameter descriptions across 'search_entries', 'lookup_entry', and 'lookup_context' to provide clearer instructions and search syntax examples. - Updated integration tests and YAML configurations to align with the new schema. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here> 409a354
## Description feat(dataplex): refine dataplex tools for better agent usability Refines the parameters and descriptions for Dataplex tools to reduce redundancy and improve tool selection accuracy for AI agents. Key changes: - Removed the redundant 'name' parameter from 'lookup_entry' and 'lookup_context' tools. - Implemented automatic derivation of the parent resource path (project and location) from the 'entry' or 'resources' arguments. - Added validation logic to ensure provided resource names follow the correct format and that all resources in a batch request belong to the same project and location. - Enhanced tool and parameter descriptions across 'search_entries', 'lookup_entry', and 'lookup_context' to provide clearer instructions and search syntax examples. - Updated integration tests and YAML configurations to align with the new schema. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here> 409a354
Description
feat(dataplex): refine dataplex tools for better agent usability
Refines the parameters and descriptions for Dataplex tools to reduce redundancy
and improve tool selection accuracy for AI agents.
Key changes:
from the 'entry' or 'resources' arguments.
and that all resources in a batch request belong to the same project and location.
and 'lookup_context' to provide clearer instructions and search syntax examples.
PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #<issue_number_goes_here>