Improve search tool to extract resolved urls #28
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 a major overhaul to the Google Search tool for agentic evaluation, shifting from returning redirect URLs to providing actual, fetchable URLs for agent workflows. It adds robust redirect resolution utilities, updates the tool to use Gemini search with grounding, and ensures the agent can verify sources directly. The changes also update dependencies and tests to support the new workflow.
Search Tool Redesign and Redirect Resolution:
aieng/agent_evals/tools/_redirect.pyproviding sync and async utilities to resolve Vertex AI grounding redirect URLs to their final destinations, with caching, retries, and robust error handling.aieng/agent_evals/tools/search.pyto implement a new search tool using Gemini with Google Search grounding, extracting actual URLs, resolving redirects, and returning structured results for agent verification. The legacyGoogleSearchToolusage was removed. [1] [2] [3]Testing and Interface Updates:
tests/aieng/agent_evals/tools/test_search.pyto validate that the new search tool returns real URLs, is wrapped in aFunctionTool, and provides the correct response structure for agent workflows. [1] [2] [3]Dependency and Version Updates:
aieng-eval-agents/pyproject.tomlto bump the package version to 0.2.0 and add new dependencies:httpx,tenacity,python-dotenv,html-to-markdown, andpypdffor improved web and PDF handling. Also added a CLI script entry point. [1] [2]Agent Evaluation Compatibility:
implementations/report_generation/evaluate.pyto support bothExperimentItemand legacy dataset item types for agent evaluation, improving compatibility with Langfuse experiments. [1] [2] [3]Minor Cleanup:
weaviate-clientdependency from the rootpyproject.toml.