Vertex AI는 자체 검색 증강 생성(RAG) 애플리케이션을 빌드하거나 자체 검색엔진을 빌드하는 데 도움이 되는 API 모음을 제공합니다. 이 페이지에서는 이러한 API를 소개합니다.
검색 및 생성
대규모 언어 모델(LLM)은 RAG를 통해 사용자가 선택한 데이터 소스에 그라운딩된 응답을 생성할 수 있습니다. RAG에는 두 가지 단계가 있습니다.
검색: 가장 관련성 있는 사실을 빠르게 가져오는 것이 일반적인 검색 문제일 수 있습니다. RAG를 이용하면 답변을 생성하는 데 중요한 사실을 빠르게 검색할 수 있습니다.
생성: LLM은 검색된 사실을 이용해서 그라운딩된 응답을 생성합니다.
Vertex AI는 다양한 개발자 요구사항에 맞게 두 단계 모두에 옵션을 제공합니다.
검색
필요에 따라 가장 적합한 검색 방법을 선택하세요.
Vertex AI Search: Vertex AI Search는 Google 검색 수준의 정보 검색 엔진으로, 엔터프라이즈 데이터를 사용하는 모든 생성형 AI 애플리케이션의 구성요소가 될 수 있습니다.
Vertex AI Search는 다양한 문서 유형을 처리할 수 있는 기능과 BigQuery 및 여러 서드 파티 시스템을 비롯한 다양한 소스 시스템에 연결하는 커넥터를 갖춘 즉시 사용 가능한 RAG용 시맨틱 및 키워드 검색엔진으로 작동합니다.
자체 검색 빌드: 시맨틱 검색을 빌드하려면 커스텀 RAG 시스템의 구성요소에 Vertex AI API를 사용할 수 있습니다. 이 API 모음은 문서 파싱, 임베딩 생성, 벡터 검색, 시맨틱 순위에 관한 고품질 구현을 제공합니다. 이러한 하위 수준 API를 사용하면 검색기 설계를 완전히 유연하게 할 수 있으며 동시에 하위 수준 Vertex AI API를 사용하여 TTM(time to market) 속도를 높이고 품질을 높일 수 있습니다.
Google 검색: Gemini 모델에 Google 검색을 사용한 그라운딩을 사용하면 Gemini가 Google 검색을 사용하고 관련 검색 결과에 그라운딩된 출력을 생성합니다. 이 검색 방법은 관리가 필요하지 않으며 Gemini에서 사용할 수 있는 전 세계의 지식을 얻을 수 있습니다.
Grounded Generation API(허용 목록이 포함된 GA): Grounded Generation API를 사용하여 사용자의 쿼리에 대한 적절하게 그라운딩된 답변을 생성합니다. 이 API는 특수화되고 미세 조정된 Gemini 모델을 사용하며, 할루시네이션을 줄이고 소스, 서드 파티 소스 또는 Google 검색에 그라운딩된 응답을 제공하는 효과적인 방법입니다(그라운딩 지원 콘텐츠 참조 포함).
그라운딩용 커스텀 RAG 시스템을 개발하면 프로세스의 모든 단계에서 유연성과 제어 기능을 제공할 수 있습니다. Vertex AI는 자체 검색 솔루션을 만드는 데 도움이 되는 API 모음을 제공합니다. 이러한 API를 사용하면 RAG 애플리케이션의 설계를 완전히 유연하게 할 수 있으며 동시에 하위 수준의 Vertex AI API를 사용하여 TTM(time to market) 속도를 높이고 품질을 높일 수 있습니다.
Document AI 레이아웃 파서
Document AI 레이아웃 파서는 다양한 형식의 문서를 구조화된 표현으로 변환하여 단락, 표, 목록과 같은 콘텐츠와 제목, 페이지 헤더, 바닥글과 같은 구조적 요소에 액세스할 수 있도록 하고 다양한 생성형 AI 및 탐색 앱에서 정보 검색을 용이하게 하는 컨텍스트 인식 청크를 만듭니다.
벡터 검색. 검색 엔진은 RAG 또는 검색 애플리케이션의 핵심 부분입니다. Vertex AI 벡터 검색은 수십억 개의 의미상 유사하거나 관련된 항목을 대규모로 검색할 수 있는 검색 엔진으로 높은 초당 쿼리 수(QPS), 높은 재현율, 낮은 지연 시간, 뛰어난 비용 효율성을 제공합니다. 밀집 임베딩을 검색할 수 있으며 공개 미리보기에서 희소 임베딩 키워드 검색 및 하이브리드 검색을 지원합니다.
Ranking API
Ranking API는 문서 목록을 가져와 문서가 특정 쿼리와 얼마나 관련성이 있는지에 따라 문서의 순위를 다시 지정합니다. 문서와 쿼리의 시맨틱 유사성만을 고려하는 임베딩과 비교하여 Ranking API는 문서가 특정 쿼리에 얼마나 잘 대답하는지에 대한 더 정확한 점수를 제공할 수 있습니다.
Grounded Generation API Grounded Generation API를 사용하여 사용자의 프롬프트에 대한 적절하게 그라운딩된 답변을 생성합니다. 그라운딩 소스는 Vertex AI Search 데이터 스토어, 제공한 커스텀 데이터 또는 Google 검색일 수 있습니다.
Check Grounding API
Check Grounding API는 지정된 참조 텍스트 집합에서 지정된 텍스트가 얼마나 그라운딩되었는지 확인합니다. 이 API는 참조 텍스트에서 참조 인용을 생성하여 참조 텍스트에서 특정 텍스트가 지원되는 위치를 나타낼 수 있습니다. 이 API는 RAG 시스템의 응답의 그라운딩 정도를 평가하는 데 사용할 수 있습니다. 또한 실험용 기능으로 API는 주어진 텍스트와 참조 텍스트가 일치하지 않는 부분을 보여주는 상반된 인용문을 생성합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(UTC)"],[[["\u003cp\u003eVertex AI provides APIs for building Retrieval-Augmented Generation (RAG) applications and search engines, supporting both retrieval and generation stages.\u003c/p\u003e\n"],["\u003cp\u003eFor retrieval, options include Vertex AI Search, building your own using Vertex AI APIs, using an existing search engine, Vertex AI RAG Engine, or leveraging Google Search for Gemini models.\u003c/p\u003e\n"],["\u003cp\u003eFor generation, options include the Grounded Generation API, using Gemini with built-in Google Search grounding, or using models from the Vertex AI Model Garden for full customization.\u003c/p\u003e\n"],["\u003cp\u003eVertex AI's suite of APIs includes the Document AI Layout Parser, Embeddings API, Vector Search, and Ranking API, enabling users to create custom RAG systems with flexibility and control.\u003c/p\u003e\n"],["\u003cp\u003eThe Vertex AI workflow for generating grounded responses from unstructured data involves importing documents, processing with the layout parser, creating text embeddings, indexing with Vector Search, ranking chunks, and generating grounded answers.\u003c/p\u003e\n"]]],[],null,["# Vertex AI APIs for building search and RAG experiences\n\nVertex AI offers a suite of APIs to help you build Retrieval-Augmented\nGeneration (RAG) applications or a search engine. This page introduces those\nAPIs.\n\nRetrieval and generation\n------------------------\n\nRAG is a methodology that enables Large Language Models (LLMs) to generate\nresponses that are grounded to your data source of choice. There are two stages\nin RAG:\n\n1. **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.\n2. **Generation:** The retrieved facts are used by the LLM to generate a grounded response.\n\nVertex AI offers options for both stages to match a variety of\ndeveloper needs.\n\nRetrieval\n---------\n\nChoose the best retrieval method for your needs:\n\n- **Vertex AI Search:** Vertex AI Search is a\n Google Search-quality information retrieval engine that can be a\n component of any generative AI application that uses your enterprise data.\n Vertex AI Search works as an out-of-the-box semantic \\& keyword\n search engine for RAG with the ability to process a variety of document\n types and with connectors to a variety of source systems including\n BigQuery and many third party systems.\n\n For more information, see\n [Vertex AI Search](/enterprise-search).\n- **Build your own retrieval:** If you want to build your semantic search, you\n can rely on Vertex AI APIs for components of your custom RAG\n system. This suite of APIs provide high-quality implementations for document\n parsing, embedding generation, vector search, and semantic ranking. Using these\n lower-level APIs gives you full flexibility on the design of your retriever\n while at the same time offering accelerated time to market and high quality\n by relying on lower-level Vertex AI APIs.\n\n For more information, see\n [Build your own Retrieval Augmented Generation](#build-rag).\n- **Bring an existing retrieval** : You can use your existing search as a\n retriever for [grounded generation](/generative-ai-app-builder/docs/grounded-gen).\n You can also use the Vertex APIs for RAG\n to upgrade your existing search to higher quality. For more information, see\n [Grounding overview](/vertex-ai/generative-ai/docs/grounding/overview).\n\n- **Vertex AI RAG Engine**: Vertex AI RAG Engine\n provides a fully-managed runtime for RAG orchestration, which lets\n developers build RAG for use in production and enterprise-ready contexts.\n\n For more information, see [Vertex AI RAG Engine\n overview](/vertex-ai/generative-ai/docs/rag-overview) in the Generative AI\n on Vertex AI documentation.\n- **Google Search**: When you use Grounding with\n Google Search for your Gemini model, then Gemini\n uses Google Search and generates output that is grounded to the\n relevant search results. This retrieval method doesn't require management\n and you get the world's knowledge available to Gemini.\n\n For more information, see [Grounding with\n Google Search](/vertex-ai/generative-ai/docs/multimodal/ground-gemini)\n in the Generative AI on Vertex AI documentation.\n\nGeneration\n----------\n\nChoose the best generation method for your needs:\n\n- **Ground with your data**:\n Generate well-grounded answers to a user's query. The grounded generation\n API uses specialized, fine-tuned Gemini models and is an effective\n way to reduce hallucinations and provide responses grounded to your sources\n or third-party sources including references to grounding support content.\n\n For more information, see\n [Generate grounded answers with RAG](/generative-ai-app-builder/docs/grounded-gen).\n\n You can also ground responses to your Vertex AI Search data using\n Generative AI on Vertex AI. For more information, see\n [Ground with your data](/vertex-ai/generative-ai/docs/multimodal/ground-with-your-data).\n- **Ground with Google Search:** Gemini is Google's most capable\n model and offers out-of-the-box grounding with Google Search. You\n can use it to build your fully-customized grounded generation solution.\n\n For more information, see [Grounding with Google Search](/vertex-ai/generative-ai/docs/multimodal/ground-gemini) in\n the Generative AI on Vertex AI documentation.\n- **Model Garden:** If you want full control and the model of your choice,\n you can use any of the models in\n [Vertex AI Model Garden](/model-garden) for generation.\n\nBuild your own Retrieval Augmented Generation\n---------------------------------------------\n\nDeveloping a custom RAG system for grounding offers flexibility and control at\nevery step of the process. Vertex AI offers a suite of APIs to help you\ncreate your own search solutions. Using those APIs gives you full flexibility on\nthe design of your RAG application while at the same time offering accelerated\ntime to market and high quality by relying on these lower-level\nVertex AI APIs.\n\n- **The Document AI Layout Parser.**\n The Document AI Layout Parser transforms documents in various\n formats into structured representations, making content like paragraphs,\n tables, lists, and structural elements like headings, page headers, and\n footers accessible, and creating context-aware chunks that facilitate\n information retrieval in a range of generative AI and discovery apps.\n\n For more information, see [Document AI Layout Parser](/document-ai/docs/layout-parse-chunk) in the\n *Document AI* documentation.\n- **Embeddings API:** The Vertex AI embeddings APIs let you create\n embeddings for text or multimodal inputs. Embeddings are vectors of\n floating point numbers that are designed to capture the meaning of their\n input. You can use the embeddings to power semantic search using Vector\n search.\n\n For more information, see [Text embeddings](/vertex-ai/generative-ai/docs/embeddings/get-text-embeddings) and\n [Multimodal embeddings](/vertex-ai/generative-ai/docs/embeddings/get-multimodal-embeddings) in the Generative AI on\n Vertex AI documentation.\n- **Vector Search.** The retrieval engine is a key part of your RAG\n or search application. Vertex AI Vector Search is a\n retrieval engine that can search from billions of semantically similar or\n semantically related items at scale, with high queries per second (QPS), high\n recall, low latency, and cost efficiency. It can search over dense\n embeddings, and supports sparse embedding keyword search and hybrid search in\n Public preview.\n\n For more information, see: [Overview of Vertex AI\n Vector Search](/vertex-ai/docs/vector-search/overview) in the\n Vertex AI documentation.\n- **The ranking API.**\n The ranking API takes in a list of documents and reranks those documents\n based on how relevant the documents are to a given query. Compared to\n embeddings that look purely at the semantic similarity of a document and a\n query, the ranking API can give you a more precise score for how well a\n document answers a given query.\n\n For more information, see\n [Improve search and RAG quality with ranking API](/generative-ai-app-builder/docs/ranking).\n- **The grounded generation API.** Use the grounded\n generation API to generate\n well-grounded answers to a user's prompt. The grounding sources can be your\n Vertex AI Search data stores, custom data that you provide, or\n Google Search.\n\n For more information, see [Generate grounded answers](/generative-ai-app-builder/docs/grounded-gen).\n- **The generate content API.** Use the generate content API to generate\n well-grounded answers to a user's prompt. The grounding sources can be your\n Vertex AI Search data stores or Google Search.\n\n For more information, see\n [Ground with Google Search](/vertex-ai/generative-ai/docs/multimodal/ground-with-google-search) or\n [Ground with your data](/vertex-ai/generative-ai/docs/multimodal/ground-with-your-data).\n- **The check grounding API.**\n The check grounding API determines how grounded a given piece of text is in a\n given set of reference texts. The API can generate supporting citations from\n the reference text to indicate where the given text is supported by the\n reference texts. Among other things, the API can be used to assess the\n grounded-ness of responses from a RAG systems. Additionally, as an\n experimental feature, the API also generates contradicting citations that\n show where the given text and reference texts disagree.\n\n For more information, see [Check grounding](/generative-ai-app-builder/docs/check-grounding).\n\nWorkflow: Generate grounded responses from unstructured data\n------------------------------------------------------------\n\nHere's a workflow that outlines how to integrate the Vertex AI RAG APIs\nto generate grounded responses from unstructured data.\n\n1. Import your unstructured documents, such as PDF files, HTML files, or images with text, into a Cloud Storage location.\n2. Process the imported documents using the [layout parser](/document-ai/docs/layout-parse-chunk). The layout parser breaks down the unstructured documents into chunks and transforms the unstructured content into its structured representation. The layout parser also extracts annotations from the chunks.\n3. [Create text embeddings](/vertex-ai/generative-ai/docs/embeddings/get-text-embeddings) for chunks using Vertex AI text embeddings API.\n4. [Index and retrieve](/vertex-ai/docs/vector-search/create-manage-index) the chunk embeddings using Vector Search.\n5. [Rank the chunks](/generative-ai-app-builder/docs/ranking) using the ranking API and determine the top-ranked chunks.\n6. Generate grounded answers based on the top-ranked chunks using the [grounded generation API](/generative-ai-app-builder/docs/grounded-gen) or using the [generate content API](/vertex-ai/generative-ai/docs/multimodal/ground-with-your-data).\n\nIf you generated the answers using an answer generation model other than the\nGoogle models, you can [check the grounding](/generative-ai-app-builder/docs/check-grounding) of these answers\nusing the check grounding method."]]