RAG Overview (Vertex AI)
Vertex AI RAG Engine
Vertex AI RAG Engine is a component of the Vertex AI Platform that facilitates Retrieval-Augmented Generation (RAG) and serves as a data framework for developing context-augmented large language model (LLM) applications.
It enables you to enrich LLM context with your organization’s private knowledge, reducing hallucinations and improving answer accuracy.
The RAG process (in order)
- Data ingestion — Intake data from different sources. For example, local files, Cloud Storage, and Google Drive.
- Data transformation — Conversion of the data in preparation for indexing. For example, data is split into chunks.
- Embedding — Numerical representations of words or pieces of text. These numbers capture the semantic meaning and context of the text. Similar or related words / text tend to have similar embeddings, meaning they’re closer together in the high-dimensional vector space.
- Data indexing — Vertex AI RAG Engine creates an index called a corpus. The index structures the knowledge base so it’s optimized for searching. Think of it like a detailed table of contents for a massive reference book.
- Retrieval — When a user asks a question or provides a prompt, the retrieval component in Vertex AI RAG Engine searches through its knowledge base to find information relevant to the query.
- Generation — The retrieved information becomes context added to the original user query, guiding the generative AI model to generate factually grounded and relevant responses.
See next
- Vertex-AI-RAG-Setup — install Cloud CLI, enable APIs, virtualenv
- Vertex-AI-RAG-Agent — full ADK agent that exposes RAG capabilities
- Vertex-AI-RAG-Tools —
create_corpus,list_corpora,add_data,rag_query, … - Image-Matching-with-Embeddings — similar embedding-search idea applied to images