Vertex AI Search
Vertex AI Search is a Google Cloud retrieval and search service for building searchable data stores and search apps over internal documents, websites, and other content. In the provided notebooks it is used as a Discovery Engine-backed retrieval layer for direct search, Gemini grounding, RAG Engine corpora, LangChain retrievers, Agent Engine agents, ranking, tuning, metadata filtering, and website search workflows. · Official docs
Synthesized across 21 notebooks. See the source pages under Notebooks below for line-level grounding.
Vertex AI Search centers on creating a data store, importing or indexing content, creating a search app or engine, and querying it through the Discovery Engine APIs or higher-level integrations. The notebooks repeatedly use it for unstructured PDFs, website data stores, custom metadata, custom embeddings, search summaries, snippets, citations, extractive answers, facets, filters, boosts, and user events.
For generative AI workloads, Vertex AI Search is the retrieval backend that grounds Gemini responses or powers RAG flows. It appears in direct Gemini grounding, Vertex AI RAG Engine, LangChain VertexAISearchRetriever, Agent Engine deployments, Gemini Enterprise answer APIs, and custom Q&A flows that search first and then summarize retrieved content.
The operational pattern is consistent: enable required APIs, authenticate, choose the correct project and location, create data store and engine resources, wait for long-running creation/import/indexing operations, verify search readiness, then connect retrieval to generation or agent logic. Cleanup matters because many examples create billable cloud resources.
Canonical workflow
- Enable billing and required APIs such as Vertex AI API, Vertex AI Search or Discovery Engine API, Service Usage, Cloud Storage, Resource Manager, and any workflow-specific APIs.
- Authenticate with Colab auth, Application Default Credentials, or gcloud, then set project, location, staging bucket, data store ID, and engine or app ID explicitly.
- Create the Vertex AI Search data store in the intended location, using default_collection paths and regional Discovery Engine endpoints when the location is not global.
- Define schema, metadata fields, embedding vectors, chunking, parser settings, URL patterns, or ranking configuration before importing content when those fields need to affect retrieval.
- Import or ingest documents from Cloud Storage, BigQuery, JSONL, inline rawBytes, website indexing, or custom embedding pipelines, using the reconciliation mode appropriate to the workflow.
- Poll long-running operations and verify readiness with a SearchRequest before wiring the data store into Gemini, RAG Engine, LangChain, Gemini Enterprise, or Agent Engine.
- Configure retrieval quality options such as snippets, summaries with citations, query expansion, spell correction, filters, facets, boosts, extractive answers, grounding metadata, or answer generation.
- Test direct search first, then test grounded generation or agents locally, deploy only after local validation, and delete test engines, data stores, corpora, agents, buckets, and synthetic events when finished.
Best practices
See Vertex AI Search - Best Practices for the full distilled guide.
- Test Vertex AI Search directly with a SearchRequest before using it for grounding, RAG, LangChain retrieval, or an Agent Engine deployment.
- Wait for data store creation, engine creation, schema updates, document import, indexing, and app availability to complete before assuming search or grounding failures are meaningful.
- Use the correct Discovery Engine endpoint for the data store location; global can use the default endpoint, while us, eu, or other regional locations require location-specific client options or hosts.
- Create both a data store and a search app or engine when the integration requires an app; several workflows fail or return errors when only the data store exists.
- Use SEARCH_TIER_ENTERPRISE and SEARCH_ADD_ON_LLM when summaries, extractive answers, grounding quality, or advanced LLM search features are needed.
- Enable snippets, summaries with citations, query expansion, and spell correction when validating search quality and answer grounding.
Key models & APIs
- Discovery Engine API, Vertex AI API, Vertex AI Search API, Vertex AI RAG Engine, Agent Engine, Gemini Enterprise search API, Gemini Enterprise answer API, Discovery Engine Python SDK, google-cloud-discoveryengine, google-cloud-aiplatform, LangChain VertexAISearchRetriever, VertexAiSessionService, reasoning_engines.AdkApp, gemini-3.5-flash, gemini-2.5-flash, gemini-2.0-flash, text-embedding-005, googles/semantic-ranker-default-004, semantic-ranker-default-004, gemini-2.0-flash/answer_gen/v2
Notebooks (21)
Gemini (5)
- Building a Conversational Search Agent with Agent Engine and RAG on Vertex AI Search — Builds and deploys a Gemini movie-search RAG agent with LangChain, Agent Engine, and Vertex AI Search.
- Grounding with Vertex AI Search — Creates a Vertex AI Search engine and uses it to ground a Gemini response with retrieved context.
- Intro to Grounding with Gemini in Vertex AI — Shows how to ground Gemini 3.5 Flash responses with Search, Enterprise Web Search, Maps, and Vertex AI Search.
- Vertex AI RAG Engine with Vertex AI Search — Build a Vertex AI RAG Engine corpus backed by Vertex AI Search and query it with Gemini.
- Building a photo recognition agent: Agent Engine setup — Sets up and deploys a Gemini LangChain agent on Agent Engine with Wikipedia and Vertex AI Search tools.
Vertex AI Search (16)
- Create a Vertex AI Datastore and Search Engine — Creates a Vertex AI Search datastore, imports GCS PDFs, creates an enterprise search engine, and queries it.
- Custom Embeddings with Vertex AI Search — Builds a Vertex AI Search app using custom text-embedding-005 embeddings from Stack Overflow data.
- Clearbox for Ranking Tuning — Tunes Vertex AI Search ranking with ClearBox using BEIR FIQA signals and recall-based validation.
- Gemini Enterprise custom agent with Vertex AI session — Builds a Gemini Enterprise travel agent using ADK sub-agents and persistent Vertex AI sessions.
- Intro to Gemini Enterprise — Shows how to call Gemini Enterprise search and answer APIs with the Discovery Engine Python SDK.
- Setup — Evaluates Discovery Engine semantic ranking on BEIR datasets with NDCG and ROC AUC metrics.
- Search tuning in Vertex AI Search — Tunes Vertex AI Search with JSONL/TSV Q&A data and tests a search app over Cloud Storage PDFs.
- Defining custom attributes based on URL patterns in Vertex AI Search Website Datastores — Shows how to add URL-pattern custom attributes to a Vertex AI Search website datastore.
- Ingestion of Unstructured Documents with Metadata in Vertex AI Search — Ingests PDFs with metadata into Vertex AI Search and queries results with metadata filters.
- Inline Ingestion of Documents into Vertex AI Search — Shows inline rawBytes document ingestion, document operations, search, filters, and cleanup in Vertex AI Search.
- Event-based Triggering of Manual Recrawl for Vertex AI Search Advanced Website Datastores — Automates Vertex AI Search manual recrawl from JSON URL lists uploaded to Cloud Storage.
- Parsing and Chunking in Vertex AI Search: Featuring BYO Capabilities — Retrieves, reviews, exports, and reimports Vertex AI Search parsed and chunked documents with BYOC.
- Query-Level Boosting, Filtering, and Facets for Vertex AI Search Website Datastores — Configures Vertex AI Search website datastore schema, filters, facets, and boosting via REST.
- Recording Real-Time User Events in Vertex AI Search Datastores — Records real-time search and view-item user events for a Vertex AI Search website datastore.
- Q&A Chatbot with Vertex AI Search for summarized website results without advanced indexing — Builds a Q&A flow that searches a Vertex AI Search website data store, fetches the top page, and summarizes it with Gemini.
- Building Search Applications with Vertex AI Search — Builds Vertex AI Search workflows using Search API, Gemini grounding, and LangChain retrieval.
Related concepts
- RAG & Grounding · Applied Use Cases · Agent Engine · Function Calling & Tools · Gemini Capabilities · Evaluation · Getting Started · Embeddings & Vector Search
Part of the Generative AI Google Brain · Vertex AI Search - Best Practices