Improve search tool to extract resolved urls#28
Merged
Conversation
…val-agents into ak/improve_search_tool
fcogidi
approved these changes
Feb 3, 2026
lotif
reviewed
Feb 3, 2026
aieng-eval-agents/aieng/agent_evals/report_generation/evaluation.py
Outdated
Show resolved
Hide resolved
Collaborator
There was a problem hiding this comment.
Why do we have two pyproject.toml files?
Member
Author
There was a problem hiding this comment.
One for the project as a whole mostly used for development, and one for the package.
Collaborator
There was a problem hiding this comment.
I see. I believe there is a way to do it with a single top level toml file but low priority, we can investigate later.
…val-agents into ak/improve_search_tool
for more information, see https://pre-commit.ci
…val-agents into ak/improve_search_tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the search tool infrastructure and URL handling in the agent evaluation framework, focusing on providing agents with real, fetchable URLs from Google Search. The changes include a new redirect resolution utility, a complete overhaul of the search tool to return actual URLs, dependency updates to support these features, and expanded test coverage. There are also minor improvements and fixes in other modules.
Search tool improvements:
Introduced a new
google_searchfunction and revampedcreate_google_search_toolto useFunctionTool, enabling agents to receive search results with real, resolved URLs instead of redirect links. This supports a research workflow where agents can search, fetch, verify, and answer using actual web sources. (aieng/agent_evals/tools/search.py,aieng/agent_evals/tools/__init__.py,tests/aieng/agent_evals/tools/test_search.py) [1] [2] [3] [4] [5] [6] [7]Added a new
_redirect.pymodule that provides asynchronous utilities for resolving known redirect URLs (such as those from Vertex AI Search) to their final destinations, with caching and retry logic. This is used by the updated search tool to ensure agents get usable URLs. (aieng/agent_evals/tools/_redirect.py)Dependency and configuration updates:
pyproject.tomlto add new dependencies required for HTTP requests, PDF handling, and HTML conversion, and incremented the package version. Also added a new CLI entry point for the knowledge agent. (pyproject.toml) [1] [2]Testing enhancements:
tests/aieng/agent_evals/tools/test_search.py)Other improvements and fixes:
LocalExperimentItemandDatasetItemClienttypes, handling both dict and class attribute access patterns. (aieng/agent_evals/report_generation/evaluation.py) [1] [2] [3] [4]implementations/aml_investigation/agent.py) [1] [2] [3]