--- title: Passage Retrieval (CPR) implementation overview slug: oaoe7068 canonical_url: https://docs.coveo.com/en/oaoe7068/ collection: leverage-machine-learning source_format: adoc --- # Passage Retrieval (CPR) implementation overview This article outlines the steps required to implement [Passage Retrieval (CPR)](https://docs.coveo.com/en/oaie5277/). > **Important** > > Passage Retrieval (CPR) is a paid product extension. > Contact [Coveo Sales](https://www.coveo.com/en/contact) or your Account Manager to add CPR 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 a CPR model](#step-2-create-a-cpr-model) * [Step 3: Associate the CPR model with a query pipeline](#step-3-associate-the-cpr-model-with-a-query-pipeline) > **Note** > > This is only required if you're using the [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) with the Passage Retrieval API to feed your custom [RAG](https://docs.coveo.com/en/p8ie0159/) system LLM application with relevant passages. > It's not required when using the [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) with the [Coveo Search Agent](https://docs.coveo.com/en/q2pe0294/) in a Coveo-powered search interface. * [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: Integrate the Passage Retrieval API into your RAG system](#step-6-integrate-the-PR-API) > **Note** > > This is only required if you're using the [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) with the Passage Retrieval API to feed your custom [RAG](https://docs.coveo.com/en/p8ie0159/) system LLM application with relevant passages. > It's not required when using the [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) with the [Coveo Search Agent](https://docs.coveo.com/en/q2pe0294/) in a Coveo-powered search interface. ## Step 1: Choose the content to use The content that you choose for CPR will be used as the raw data from which passages are retrieved. See [Passage Retrieval (CPR) content requirements and best practices](https://docs.coveo.com/en/oaod5329/). > **Note** > > A [Passage Retrieval (CPR)](https://docs.coveo.com/en/oaie5277/) implementation must include both a [CPR](https://docs.coveo.com/en/oaie9196/) [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/). > Both the CPR and SE models must be configured to use the same content. ## Step 2: Create a CPR model A [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) retrieves passages based on the content specified in the model settings. The CPR model then uses the embedding [vector](https://docs.coveo.com/en/nccf9008/) space to find the most relevant passages ([chunks](https://docs.coveo.com/en/oaie5277#chunking)) that your LLM application will use to generate the output. See [Create and manage Passage Retrieval (CPR) models](https://docs.coveo.com/en/oaie5476/). ## Step 3: Associate the CPR model with a query pipeline When a [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) is associated with your LLM-powered application's [query pipeline](https://docs.coveo.com/en/180/), it's used to retrieve relevant passages for submitted queries. > **Note** > > This is only required if you're using the [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) with the Passage Retrieval API to feed your custom [RAG](https://docs.coveo.com/en/p8ie0159/) system LLM application with relevant passages. > It's not required when using the [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) with the [Coveo Search Agent](https://docs.coveo.com/en/q2pe0294/) in a Coveo-powered search interface. See [Associate a Passage Retrieval (CPR) model with a query pipeline](https://docs.coveo.com/en/oaie6403/). > **Important** > > The [CPR](https://docs.coveo.com/en/oaie9196/) [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 during [first-stage content retrieval](https://docs.coveo.com/en/oaie5277#relevant-content-retrieval) for CPR. An [SE](https://docs.coveo.com/en/nbtb0041/) [model](https://docs.coveo.com/en/1012/) ensures that CPR always uses the most relevant content from which to retrieve passages. See [Create and manage Semantic Encoder (SE) models](https://docs.coveo.com/en/nb890247/). > **Note** > > A [Passage Retrieval (CPR)](https://docs.coveo.com/en/oaie5277/) implementation must include both a [CPR](https://docs.coveo.com/en/oaie9196/) [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/). > Both the CPR and SE models must be configured to use the same content. ## Step 5: Associate the SE model with a query pipeline 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 [query pipeline](https://docs.coveo.com/en/180/). 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 that's used by the [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/). ## Step 6: Integrate the PR API [Use the Passage Retrieval API](https://docs.coveo.com/en/o86c8334/) to retrieve the most relevant passages that were identified by the CPR [model](https://docs.coveo.com/en/1012/) to enhance the generated output of your LLM application. > **Note** > > This is only required if you're using the [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) with the Passage Retrieval API to feed your custom [RAG](https://docs.coveo.com/en/p8ie0159/) system LLM application with relevant passages. > It's not required when using the [CPR](https://docs.coveo.com/en/oaie9196/) [model](https://docs.coveo.com/en/1012/) with the [Coveo Search Agent](https://docs.coveo.com/en/q2pe0294/) in a Coveo-powered search interface. > **Important** > > Coveo doesn't manage the creation of the prompt that's sent to the LLM for output generation, or the component that displays the output.