Passage Retrieval (CPR) implementation overview
Passage Retrieval (CPR) implementation overview
This article outlines the minimal steps required to implement Passage Retrieval (CPR) in an LLM-powered application.
Passage Retrieval (CPR) is a paid product extension. Contact Coveo Sales or your Account Manager to add CPR to your organization license. |
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.
Note
An optimal Passage Retrieval (CPR) implementation includes both a CPR model and a Semantic Encoder (SE) model. The same SE model can be used with multiple CPR models. For best results, both the CPR and SE models should be configured to use the same content. See CPR overview for information on how CPR and SE work together in the context of a user query to retrieve passages. |
Step 2: Create a CPR model
Step 3: Associate the CPR model with a query pipeline
When a CPR model is associated with your LLM-powered application’s query pipeline, it is used to retrieve relevant passages for submitted queries.
The CPR model must be associated with the same query pipeline as the Semantic Encoder (SE) model. |
Step 4: Create a Semantic Encoder (SE) model
An SE model adds vector-based search capabilities to an LLM-powered application that uses CPR. Vector search allows finding items based on semantic similarity, not just keyword matches. When a query is submitted in an LLM-powered application, the top search results are sent to the CPR model. The CPR model references only these top search result items to find the most relevant passages. An SE model ensures that CPR always uses the most relevant content to retrieve passages.
Note
An optimal Passage Retrieval (CPR) implementation includes both a CPR model and a SE model. The same SE model can be used with multiple CPR models. For best results, both the CPR and SE models should be configured to use the same content. See CPR overview for information on how CPR and SE work together in the context of a user query to retrieve passages. |
Step 5: Associate the SE model with a query pipeline
Step 6: Implement CPR
Use the Passage Retrieval API to retrieve the most relevant passages that were identified by the CPR model to enhance the generated output of your LLM application.
Note
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. |