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

  1. 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.
  2. Authenticate with Colab auth, Application Default Credentials, or gcloud, then set project, location, staging bucket, data store ID, and engine or app ID explicitly.
  3. 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.
  4. Define schema, metadata fields, embedding vectors, chunking, parser settings, URL patterns, or ranking configuration before importing content when those fields need to affect retrieval.
  5. 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.
  6. 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.
  7. Configure retrieval quality options such as snippets, summaries with citations, query expansion, spell correction, filters, facets, boosts, extractive answers, grounding metadata, or answer generation.
  8. 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)

Vertex AI Search (16)


Part of the Generative AI Google Brain · Vertex AI Search - Best Practices