|
|
ADK with Vertex AI Search for Knowledge Retrieval
Author: Venkata Sudhakar
ADK agents equipped with general language model knowledge can answer broad questions, but they lack access to company-specific documents, product catalogues, and internal policies. Vertex AI Search provides a fully managed enterprise search service that can index private documents and return grounded, relevant passages to ADK agents at query time.
ShopMax India maintains an internal knowledge base containing product manuals, warranty policies, return procedures, and store guidelines. By connecting an ADK agent to Vertex AI Search, customer service agents can retrieve authoritative answers directly from these documents instead of relying on model training data that may be outdated or incorrect.
The below example shows how to create a Vertex AI Search tool for an ADK agent and query the ShopMax India product knowledge base.
It gives the following output,
SearchServiceClient initialised: project=shopmax-india
Data store: shopmax-knowledge-base (global)
FunctionTool registered: search_knowledge_base
Knowledge agent ready with Vertex AI Search grounding.
Model: gemini-2.0-flash | Tools: [search_knowledge_base]
The below example shows the agent answering a ShopMax India customer query using retrieved knowledge base passages as grounding context.
It gives the following output,
Customer: What is the warranty period for Samsung 55 inch QLED TVs at ShopMax?
Agent: Based on the ShopMax India Warranty Policy (doc: warranty-policy-2024.pdf),
Samsung 55 inch QLED TVs carry a 2-year comprehensive warranty covering
manufacturing defects, with an optional 3rd year extension available
at ShopMax service centres in Mumbai, Bangalore, Hyderabad, and Delhi.
Customer: How do I claim a warranty for a product purchased online?
Agent: Per the ShopMax India Returns and Warranty Guide (doc: returns-guide-v3.pdf),
online warranty claims can be initiated via the ShopMax app or website.
You will need your order ID, product serial number, and purchase date.
A service engineer will contact you within 48 business hours.
Vertex AI Search with ADK gives ShopMax India agents answers grounded in authoritative internal documents rather than general model knowledge. As the knowledge base is updated - new products launched, policies revised - the agent answers stay current automatically without any retraining or prompt engineering.
|
|