Using the Google Search tool, you can connect your agent to the power of Grounding with Google Search. With this connection, your agent can base its responses on up-to-date information from the web, effectively grounding the conversation in real-world data. This tool is ideal for scenarios requiring world knowledge, current events, or a broad range of topics.
Terms and billing
When using the Google Search tool, be aware of the following terms:
- The Service-specific terms for "Grounding with Google Search" apply in addition to the Google Cloud Terms of Service.
- When this tool is used in a conversational turn, and it returns search queries and the response, you must display the search suggestions. For details, see Use Google Search suggestions. These suggestions link directly to the Google Search results page. For purely voice-based agents, showing Search suggestions is not required.
- Requests to the Google Search tool will be charged as described in Vertex AI pricing.
Configuration
When creating this tool, you provide the following:
- Name: A display name for this tool instance. For example, "Product Information Search".
- Description: A brief description of the tool. This description is read by other agents when determining tools to call.
- Excluded domains: An optional list of domains to exclude from the search results. This is useful for filtering out irrelevant or unwanted sources. For example: "www.example.com". You can supply a maximum of 2000 excluded domains. Excluded domains don't appear in search results.
- Preferred domains: An optional list of domain names that you want to prioritize during the search. These are provided as hints to the search algorithm to favor certain domains. This is a best-effort hint to the model, and results are not guaranteed to come exclusively from these domains.
- URLs for context: An optional list of specific URLs to fetch content directly for grounding. The model will use content from these pages as context. For more information, see URL context.
Settings precedence
The following defines the order of precedence for domain and URL fields:
- URLs for context have the highest precedence. This content will always be fetched, regardless of other fields.
- Excluded domains are next in the order of precedence. These domains are filtered regardless of the preferred domains settings.
- Preferred domains are last in the order of precedence. These domains are suggested to the search model.
Runtime context URLs
In addition to the URLs for context you provide in configuration, you can instruct your agent to inject other URLs for context at runtime. For example, you can provide the following in your instructions:
If the user query is about x, look into these urls url1, url2, url3 using
the 'Product Information Search' tool.