Vertex AI offers a suite of APIs to help you build Retrieval-Augmented Generation (RAG) applications or a search engine. This page introduces those APIs.
Retrieval and generation
RAG is a methodology that enables Large Language Models (LLMs) to generate responses that are grounded to your data source of choice. There are two stages in RAG:
- Retrieval: Getting the most relevant facts quickly can be a common search problem. With RAG, you can quickly retrieve the facts that are important to generate an answer.
- Generation: The retrieved facts are used by the LLM to generate a grounded response.
Vertex AI offers options for both stages to match a variety of developer needs.
Retrieval
Choose the best retrieval method for your needs:
Agent Search: Agent Search is a Google Search-quality information retrieval engine that can be a component of any generative AI application that uses your enterprise data. Agent Search works as an out-of-the-box semantic & keyword search engine for RAG with the ability to process a variety of document types and with connectors to a variety of source systems including BigQuery and many third party systems.
For more information, see Agent Search.
Build your own retrieval: If you want to build your semantic search, you can rely on Vertex AI APIs for components of your custom RAG system. This suite of APIs provide high-quality implementations for document parsing, embedding generation, vector search, and semantic ranking. Using these lower-level APIs gives you full flexibility on the design of your retriever while at the same time offering accelerated time to market and high quality by relying on lower-level Vertex AI APIs.
For more information, see Build your own Retrieval Augmented Generation.
Bring an existing retrieval: You can use your existing search as a retriever for grounded generation. You can also ground responses using RAG to upgrade your existing search to higher quality. For more information, see Grounding overview.
Vertex AI RAG Engine: Vertex AI RAG Engine provides a fully-managed runtime for RAG orchestration, which lets developers build RAG for use in production and enterprise-ready contexts.
For more information, see Vertex AI RAG Engine overview in the Generative AI on Vertex AI documentation.
Google Search: When you use Grounding with Google Search for your Gemini model, then Gemini uses Google Search and generates output that is grounded to the relevant search results. This retrieval method doesn't require management and you get the world's knowledge available to Gemini.
For more information, see Grounding with Google Search in the Generative AI on Vertex AI documentation.
Generation
Choose the best generation method for your needs:
Ground with your data: Generate well-grounded answers to a user's query. The grounded generation API uses specialized, fine-tuned Gemini models and is an effective way to reduce hallucinations and provide responses grounded to your sources or third-party sources including references to grounding support content.
For more information, see