|
|
Vertex AI Search with ADK
Author: Venkata Sudhakar
Vertex AI Search is a fully managed enterprise search service that indexes your internal documents, websites, and structured data and makes them searchable via an API. Unlike Gemini context caching (which keeps documents in the model context) or RAG Engine (which uses vector similarity), Vertex AI Search uses Google-quality search algorithms including semantic understanding, entity extraction, and relevance ranking to find the most accurate answers. It is the right choice for large enterprise knowledge bases - internal policy libraries, product documentation, support ticket histories - where search quality and answer accuracy matter most. In ADK, Vertex AI Search is available as a built-in tool via VertexAISearch. You provide the search app ID from your Vertex AI Search configuration and ADK integrates it as a tool the agent can call. When the user asks a question, the agent calls the search tool, Vertex AI Search returns the most relevant document snippets with citations, and the agent synthesises a grounded answer. The result is an enterprise Q&A agent backed by Google-quality search that always cites which internal document the answer came from. The below example builds a technical support agent for a software company that searches their internal knowledge base of runbooks, troubleshooting guides, and product documentation - giving engineers instant grounded answers with source citations.
Querying the enterprise knowledge base agent with real technical questions,
It gives the following output with grounded answers citing internal documents,
Engineer: Our Kubernetes pods are crashing with OOMKilled error. Diagnose steps?
Agent: Based on Runbook KB-K8S-042 (Kubernetes Memory Management):
1. Run: kubectl describe pod POD_NAME -n NAMESPACE
Look for "OOMKilled" in the Last State section with exit code 137.
2. Check memory limits: kubectl get pod POD_NAME -o yaml | grep -A5 resources
3. Review memory usage trend: kubectl top pod POD_NAME --containers
4. If limits are too low, update the deployment resource requests.
Minimum recommended: requests=256Mi, limits=512Mi for API services.
Source: KB-K8S-042 Section 3.2 - OOM Troubleshooting, last updated 2025-03-15
Engineer: How do I rotate database credentials safely in production?
Agent: From SOP-DB-019 (Database Credential Rotation - Zero Downtime):
1. Create new credentials in AWS Secrets Manager without removing old ones.
2. Update the new secret ARN in Parameter Store.
3. Trigger a rolling restart of the application pods.
4. Verify connectivity with: psql -h PROD_HOST -U NEW_USER -d DB_NAME
5. Revoke old credentials only after 30-minute monitoring window.
Source: SOP-DB-019, Approved by Security Team 2025-02-28
Engineer: The nightly batch job failed with connection timeout. Runbook?
Agent: I could not find a specific runbook for connection timeout in batch jobs.
ESCALATE_L3 - This issue requires Level-3 review.
Please create a ticket with: job name, error logs, time of failure,
and the source/destination system that timed out.
# Answers 1 and 2: grounded in real internal documents with source citations
# Answer 3: knowledge base gap detected, correct escalation triggered
# No hallucination - agent correctly admitted it did not find the answer
Vertex AI Search supports three enterprise data source types,
Vertex AI Search data store types:
Document store: PDF/DOCX/HTML files
Website crawl: internal wikis and portals
BigQuery: structured enterprise data
All accessible via the same VertexAISearch ADK tool
# Start with the GCP Console to set up your data store:
# Vertex AI > Search > Create App > Enterprise Search
# Upload documents or connect your data source
# Copy the datastore ID and use it in VertexAISearch(data_store_id=...)
Vertex AI Search vs RAG Engine vs context caching: use Vertex AI Search when you have a large enterprise knowledge base (thousands of documents) where search quality, relevance ranking, and citation accuracy are critical - it uses Google-grade search algorithms. Use RAG Engine (Tutorial 321) for managed vector similarity search on medium-sized document sets where you control chunking strategy. Use context caching (Tutorial 312) for a single large document that is referenced repeatedly within sessions. For the highest-quality enterprise support agent, combine Vertex AI Search (for the knowledge base) with Memory Bank (Tutorial 324) (for customer history) and Agent Engine deployment (Tutorial 320) (for managed production infrastructure).
|
|