About Smart Snippets
About Smart Snippets
Coveo Machine Learning (Coveo ML) Smart Snippet models provide users with answers to their queries directly on the results page by displaying a snippet of the most relevant result item. This allows users to quickly find answers without having to open links from the results page.
Specifically, Coveo ML Smart Snippet models scan the items returned by the index to find which one is the most relevant according to the query. This item is then pushed to the top of the results list in the main snippet section, and its result template displays the content that is the most likely to answer the query.
Coveo ML Smart Snippets also provides additional questions and topics in a "Related Content" (People also ask) section that users can click to find further information related to their query without leaving the results page.
Members with the required privileges can configure and manage Coveo ML Smart Snippets.
How Coveo ML Smart Snippets work
To provide users with the most relevant snippet of content, Coveo ML Smart Snippets leverage a machine learning algorithm that’s backed by a large language model (LLM) to compute a similarity score between a user query and the headings of the items in a results list. If the similarity score meets a predefined minimum threshold, Coveo ML Smart Snippets will use the content attached to the header that matches the user query, and renders the information in the related search result.
A Coveo ML Smart Snippet model returns snippets of content for HTML items only. |
Note
To avoid unrelated snippets, a Smart Snippet model will never return a main snippet result for a single-word query. However, the model will still return a related content (People also ask) section for a single-word query. |
In your support website, you have an FAQ page that is configured to leverage Coveo ML Smart Snippets. The FAQs appear on the page as headers (within <h2>
tags) whereas the answers appear in paragraphs (within <p>
tags).
One of the FAQs that appears on the page is: How to synchronize my Speedbit with my computer?
A user accesses your support website’s main page and enters the following query in the search bar: Synchronizing Speedbit with computer
.
Since the Smart Snippet model calculated a high similarity score between the user query and the How to synchronize my Speedbit with my computer?
header, the user obtains the FAQ page as the top result.
The result template also displays the content that appears in the paragraph attached to the How to synchronize my Speedbit with my computer?
header on the FAQ page.
Similarity score thresholds
Depending on the similarity score the model established between a query and the header of the items that appear in the results list, the model either displays the best snippet at the top of the results page, shows the snippet as a related question, or doesn’t display the snippet at all.
The following table indicates the thresholds used by the model to determine whether to display a snippet:
Similarity score | Result |
---|---|
0.7 and above |
The answer is displayed as a snippet at the top of the results page. |
Between 0.5 and 0.7 (0.7 excluded) |
The answer is displayed as a related question. |
Below 0.5 (0.5 excluded) |
The answer is not displayed by the model. |
Notes
|
Inspect similarity scores
You can inspect the score computed for a given snippet by inspecting the call to the Search API:
-
Access a search interface which contains the required components, and in which the traffic is directed to the query pipeline that you associated with your Coveo ML Smart Snippet model.
-
In the search box, perform a query that would likely trigger a snippet to appear in the search results.
-
In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain
/rest/search/v2
. -
Select the Preview tab.
-
Find and expand the
questionAnswer
property. It provides detailed information about the model’s output for this specific query. This property won’t appear if the model can’t provide snippets for the current query. -
You can now inspect the similarity score that the model gave to the displayed snippets:
-
To inspect the score of the top snippet, look at the
score
value. -
To inspect the score of the related questions for the same query:
-
Expand the
relatedQuestions
property. -
You should now see the list of headers for which the model can provide snippets. Expand the desired
question
property, and then inspect the associatedscore
value.
-
-