--- title: Relevance Generative Answering (RGA) implementation overview slug: nb6a0390 canonical_url: https://docs.coveo.com/en/nb6a0390/ collection: leverage-machine-learning source_format: adoc --- # Relevance Generative Answering (RGA) implementation overview This article outlines the minimal steps required to implement [Relevance Generative Answering (RGA)](https://docs.coveo.com/en/n9de0370/) in a Coveo-powered [search interface](https://docs.coveo.com/en/2741/). > **Important** > > Coveo Relevance Generative Answering (RGA) is a paid product extension. > Contact [Coveo Sales](https://www.coveo.com/en/contact) or your Account Manager to add RGA to your [organization](https://docs.coveo.com/en/185/) license. * [Step 1: Choose the content to use](#step-1-choose-the-content-to-use) * [Step 2: Create an RGA model](#step-2-create-an-rga-model) * [Step 3: Associate the RGA model with a query pipeline](#step-3-associate-the-rga-model-with-a-query-pipeline) * [Step 4: Create a Semantic Encoder (SE) model](#step-4-create-a-semantic-encoder-se-model) * [Step 5: Associate the SE model with a query pipeline](#step-5-associate-the-se-model-with-a-query-pipeline) * [Step 6: Configure a search interface for RGA](#step-6-configure-a-search-interface-for-rga) * [Step 7: Add a custom dimension to report on RGA events](#step-7-add-a-custom-dimension-to-report-on-rga-events) > **Tip** > > An effective [RGA](https://docs.coveo.com/en/nbtb6010/) implementation relies on a process of continuous improvement that includes evaluating the generated answers and modifying the implementation based on the evaluation results. > > The [Coveo Knowledge Hub](https://docs.coveo.com/en/p58d0270/) provides the tools you need to evaluate and improve your [RGA](https://docs.coveo.com/en/nbtb6010/) implementation. ## Step 1: Choose the content to use The content that you choose for RGA will be used as the raw data from which answers are generated. Therefore, the quality of the content has a direct impact on the quality of the answers. See [Relevance Generative Answering (RGA) content requirements and best practices](https://docs.coveo.com/en/nb6a0008/). > **Note** > > An RGA implementation should include both an [RGA](https://docs.coveo.com/en/nbtb6010/) [model](https://docs.coveo.com/en/1012/) and a [Semantic Encoder (SE)](https://docs.coveo.com/en/nbtb0041/) [model](https://docs.coveo.com/en/1012/). > The same SE model can be used with multiple RGA models. > Both the RGA and SE models must be configured to use the same content. > > See [RGA overview](https://docs.coveo.com/en/n9de0370#rga-overview) for information on how RGA and SE work together in the context of a search session to generate answers. ## Step 2: Create an RGA model An [RGA](https://docs.coveo.com/en/nbtb6010/) [model](https://docs.coveo.com/en/1012/) creates [embeddings](https://docs.coveo.com/en/ncc87383/) for the content specified in the model settings. The RGA model then uses the embedding [vector](https://docs.coveo.com/en/nccf9008/) space to find the most relevant segments of text ([chunks](https://docs.coveo.com/en/n9de0370#chunking)) that will be used to generate the answer. See [Create and manage Relevance Generative Answering (RGA) models](https://docs.coveo.com/en/nb6a0085/). ## Step 3: Associate the RGA model with a query pipeline When an [RGA](https://docs.coveo.com/en/nbtb6010/) [model](https://docs.coveo.com/en/1012/) is associated with your search interface's [query pipeline](https://docs.coveo.com/en/180/), it is used to generate answers for submitted queries. See [Associate a Relevance Generative Answering (RGA) model with a query pipeline](https://docs.coveo.com/en/nb6a0104/). > **Important** > > The [RGA](https://docs.coveo.com/en/nbtb6010/) [model](https://docs.coveo.com/en/1012/) must be associated with the same query pipeline as the [Semantic Encoder (SE)](https://docs.coveo.com/en/nbtb0041/) [model](https://docs.coveo.com/en/1012/). ## Step 4: Create a Semantic Encoder (SE) model An [SE](https://docs.coveo.com/en/nbtb0041/) [model](https://docs.coveo.com/en/1012/) adds [vector](https://docs.coveo.com/en/nccf9008/)-based search capabilities to a Coveo-powered [search interface](https://docs.coveo.com/en/2741/) that uses RGA. Vector search allows your search interface to find [items](https://docs.coveo.com/en/210/) based on semantic similarity and not just keyword matches. When a [query](https://docs.coveo.com/en/231/) is submitted in a Coveo-powered search interface, the top search results are sent to the RGA model. The [RGA](https://docs.coveo.com/en/nbtb6010/) [model](https://docs.coveo.com/en/1012/) references only these top search result items to find the most relevant segments of text from which to generate the answer. An [SE](https://docs.coveo.com/en/nbtb0041/) [model](https://docs.coveo.com/en/1012/) ensures that RGA always uses the most relevant content to generate answers. See [Create and manage Semantic Encoder (SE) models](https://docs.coveo.com/en/nb890247/). > **Note** > > An RGA implementation should include both an [RGA](https://docs.coveo.com/en/nbtb6010/) [model](https://docs.coveo.com/en/1012/) and a [Semantic Encoder (SE)](https://docs.coveo.com/en/nbtb0041/) [model](https://docs.coveo.com/en/1012/). > The same SE model can be used with multiple RGA models. > Both the RGA and SE models must be configured to use the same content. > > See [RGA overview](https://docs.coveo.com/en/n9de0370#rga-overview) for information on how RGA and SE work together in the context of a search session to generate answers. ## Step 5: Associate the SE model with a query pipeline When an [SE](https://docs.coveo.com/en/nbtb0041/) [model](https://docs.coveo.com/en/1012/) is associated with your search interface's query pipeline, it adds [vector](https://docs.coveo.com/en/nccf9008/)-based search capabilities. See [Associate a Semantic Encoder (SE) model with a query pipeline](https://docs.coveo.com/en/nb8b0088/). > **Important** > > The [SE](https://docs.coveo.com/en/nbtb0041/) [model](https://docs.coveo.com/en/1012/) must be associated with the same query pipeline as the [RGA](https://docs.coveo.com/en/nbtb6010/) [model](https://docs.coveo.com/en/1012/). ## Step 6: Configure a search interface for RGA To add the RGA question-answering experience to your Coveo-powered [search interface](https://docs.coveo.com/en/2741/), enable the RGA component. See [Configure a search interface for Relevance Generative Answering (RGA)](https://docs.coveo.com/en/nb6a0037/). ## Step 7: Add a custom dimension to report on RGA events To track the usage of [Relevance Generative Answering (RGA)](https://docs.coveo.com/en/nbtb6010/), [Coveo Analytics](https://docs.coveo.com/en/182/) logs [events](https://docs.coveo.com/en/260/) for RGA and the actions performed on the [RGA component](https://docs.coveo.com/en/nb6a0037/) in your search interface. To [report](https://docs.coveo.com/en/266/) on these events, add a custom [dimension](https://docs.coveo.com/en/258/) to your Coveo [organization](https://docs.coveo.com/en/185/). See [Relevance Generative Answering (RGA) reports and UA events](https://docs.coveo.com/en/nb6a0210/).