Create and manage Semantic Encoder (SE) models

Important

A Coveo Machine Learning (Coveo ML) Semantic Encoder (SE) model retrieves items from your index based on semantic similarity with the query.

What does an SE model do?

When an SE model builds, it creates embeddings for the indexed items that you specify in the model settings, and stores the embeddings in the index.

Note

The model is preconfigured to rebuild and update the embeddings weekly based on when the model is created. The model build frequency can’t be changed.

Semantic Encoder model embeddings

An SE model uses a pre-trained sentence transformer language model to create the embeddings. The language model does this by capturing relationships between words, phrases, and sentences in the dataset.

An SE model creates embeddings for only the content in an item’s body. That is, the item’s content that’s mapped to the body field in the Coveo index. For more information, see How SE uses your content.

As shown in the following diagram, the model uses a chunking strategy to create the embeddings. This means that instead of creating a vector for each individual word, a vector is created for a segment of text (chunk) to increase relevance.

Vector space

When a user enters a query in a Coveo-powered search interface that uses an SE model, the query passes through a query pipeline where pipeline rules and machine learning are applied to optimize relevance as it normally does. However, the SE model adds vector search capabilities to the search engine. As shown in the following diagram, the SE model embeds the query in the embedding vector space in the index to find items with high semantic similarity with the query. The search results include items that are based on both semantic and lexical similarity.

Vector space query

In the context of generating an answer using Relevance Generative Answering (RGA), this is referred to as first-stage content retrieval. A list of the most relevant items retrieved during this initial stage are sent to the RGA model. The RGA model then applies second-stage content retrieval to retrieve the most relevant segments of text (chunks) that will be used for answer generation. See RGA overview for more information on how RGA and SE work together in the context of a search session in a Coveo-powered search interface.

Note

The embeddings that are created by the SE model aren’t impacted by usage analytics events.

Prerequisites

Create an SE model

  1. Depending on whether models have already been created in your Coveo organization:

  2. Click Next.

  3. In the Learn from section, select the content that the model will use. You can select the source(s) and apply additional filters using the Standard configuration, or use Advanced mode to define a custom filter expression.

    Important

    You’ll lose the current mode settings when you switch between Standard and Advanced mode.

    Note

    An optimal Relevance Generative Answering (RGA) implementation includes both an RGA model and an SE model. For best results, both models should be configured to use the same content.

    See RGA overview for information on how RGA and SE work together in the context of a search session to generate answers.

    Tip

    The Data volume preview section shows the impact of your settings on the data that’s available to the model.

    • In the Standard tab:

      1. In the Sources dropdown menu, select the sources that contain the items from which you want the model to learn.

        Note

        If your Coveo organization includes multiple indexes, the model can learn only from sources that are linked to the default index.

      2. (Optional) In the Apply filters on dataset section, you can specify a condition to segment the content on which the model should base its training.

        Example

        You want the model to base its training only on items for which the collection field have the FAQ value.

        Therefore, you add a collection is equal to FAQ condition.

        1. Click Add filter(s).

        2. In the Field name input, enter the name of the field that you want to use to segment the dataset.

        3. In the Select an operator dropdown menu, select the desired operator.

        4. In the Value input, enter the value of the field on which you want to segment the dataset.

        5. Click Apply.

    • In the Advanced tab:

      1. Enter a custom filter expression using Coveo query syntax.

      2. Click Apply.

  4. Click Next.

  5. In the Name your model input, enter a meaningful display name for the model, and then click Start building.

  6. You can then associate the model with a pipeline to take advantage of the model in a search interface.

Edit an SE model

  1. On the Models (platform-ca | platform-eu | platform-au) page, click the model you want to edit, and then click Edit in the Action bar.

  2. On the subpage that opens, select the Configuration tab.

  3. In the upper-right corner, click Edit.

  4. Under Name, edit the model’s display name.

  5. In the Learn from section, select the content that the model will use. You can select the source(s) and apply additional filters using the Standard configuration, or use Advanced mode to define a custom filter expression.

    Important

    You’ll lose the current mode settings when you switch between Standard and Advanced mode.

    Note

    An optimal Relevance Generative Answering (RGA) implementation includes both an RGA model and an SE model. For best results, both models should be configured to use the same content.

    See RGA overview for information on how RGA and SE work together in the context of a search session to generate answers.

    Tip

    The Data volume preview section shows the impact of your settings on the data that’s available to the model.

    • In the Standard tab:

      1. In the Sources dropdown menu, select the sources that contain the items from which you want the model to learn.

        Note

        If your Coveo organization includes multiple indexes, the model can learn only from sources that are linked to the default index.

      2. (Optional) In the Apply filters on dataset section, you can specify a condition to segment the content on which the model should base its training.

        Example

        You want the model to base its training only on items for which the collection field have the FAQ value.

        Therefore, you add a collection is equal to FAQ condition.

        1. Click Add filter(s).

        2. In the Field name input, enter the name of the field that you want to use to segment the dataset.

        3. In the Select an operator dropdown menu, select the desired operator.

        4. In the Value input, enter the value of the field on which you want to segment the dataset.

        5. Click Apply.

    • In the Advanced tab:

      1. Enter a custom filter expression using Coveo query syntax.

      2. Click Apply.

  6. Click Save.

Delete an SE model

Important

You must dissociate a model from all its associated query pipelines before deleting it. Models aren’t automatically dissociated from pipelines when they’re deleted.

  1. On the Models (platform-ca | platform-eu | platform-au) page, click the ML model that you want to delete, and then click More > Delete in the Action bar.

  2. In the Delete a Model panel that appears, click Delete model.

Review active model information

On the Models (platform-ca | platform-eu | platform-au) page, click the desired model (must be Active), and then click Open in the Action bar (see Reviewing Coveo Machine Learning model information).

Reference

Model embedding limits

The SE model converts your content’s body text to numerical representations (vectors) in a process called embedding. It does this by breaking the text up into smaller segments called chunks, and each chunk is mapped as a distinct vector. For more information, see Embeddings.

Due to the amount of processing required for embeddings, the model is subject to the following embedding limits:

Note

The same chunking strategy is used for all sources and item types.

  • 1 million items or 10 million chunks

  • 11 chunks per item

    Important

    This means that for a given item, there can be a maximum of 11 chunks. This limit is sufficient in order for the SE model to capture an item’s main concepts through embeddings. If an item is very long with a lot of text, however, such as more than 4000 words or 5 pages, the model will embed the item’s text until the 11-chunk limit is reached. The remaining text won’t be embedded and therefore won’t be used by the model. Use shorter and more focused items to make sure that the entire item’s text is embedded.

  • 500 words per chunk

    Note

    There can be an overlap of up to 20% between chunks. In other words, the last 20% of the previous chunk can be the first 20% of the next chunk.

"Status" column

On the Models (platform-ca | platform-eu | platform-au) page of the Administration Console, the Status column indicates the current state of your Coveo ML models.

The following table lists the possible model statuses and their definitions:

Status Definition Status icon

Active

The model is active and available.

check-circle

Build in progress

The model is currently building.

target16px

Inactive

The model isn’t ready to be queried, such as when a model was recently created or the organization is offline.
Click See more details for additional information (see Review model information).

warningtriangle

Limited

Build issues exist that may affect model performance.
Click See more details for additional information (see Review model information).

warningtriangle

No query pipeline

The model isn’t associated with a query pipeline.
Click Associate with a query pipeline to go to the Query Pipelines page.

warningtriangle

No case assist configuration

The model isn’t associated with a case assist configuration.
Click Associate with a case assist configuration to go to the Case Assist page.

warningtriangle

Soon to be archived

The model will soon be archived because it hasn’t been queried for an extended period of time.
Click Delete to remove the model.
Learn more about archived models.

warningtriangle

Error

An error prevented the model from being built successfully.
If it’s a temporary system error, check back soon. Otherwise, click See more details for additional information (see Review model information).

critical

Archived

The model was archived because it hasn’t been queried for at least 30 days.
Click Delete to remove the model.
Learn more about archived models.

n/a

Required privileges

By default, members with the required privileges can view and edit elements of the Models (platform-ca | platform-eu | platform-au) page.

The following table indicates the privileges required for members to manage Coveo Generic models (see Manage privileges and Privilege reference).

Action Service - Domain Required access level

View models

Machine Learning - Models
Organization - Organization
Search - Query pipelines

View

Manage models

Organization - Organization
Search - Query pipelines

View

Machine Learning - Models

Edit

Machine Learning - Allow content preview

Enable

Content - Sources

View All

Content - Fields

View