Overview
Before a search query is used to retrieve documents, OpenSearch analyzes and processes the semantics of the search query. The synonym configuration feature of OpenSearch retrieves documents based on the synonyms of search queries. This increases the number of documents that are retrieved. Business scenarios vary with industries. To achieve the optimal search performance, you must use a synonym configuration model specific to your application.
OpenSearch provides a wide range of domain-specific synonym configuration models. You can configure and train a custom synonym configuration model based on the corresponding industry-specific analyzer. When you train the synonym configuration model, the system automatically extracts the existing data of your application and analyzes the data based on the business logic of your application. You can also import personalized synonyms to train and optimize the model. For more information, contact technical support.
You are charged for tailored retrieval models based on storage capacity, computing resources, and model training. For more information about billing rules, see Billing overview.
Create and use a tailored retrieval model
To create and use a synonym configuration model, perform the following steps:
Create and train a synonym configuration model.
Configure a query analysis rule and reference the trained synonym configuration model.
Adjust the synonym configuration model as needed by using an intervention dictionary.
Create and train a model
Log on to the OpenSearch console. In the left-side navigation pane, choose OpenSearch Industry Algorithm Edition > Search Algorithm Center > Retrieval Configuration. On the Retrieval Configuration page, click Tailored Retrieval Models in the left-side pane. On the page that appears, select an application and click Create.
Configure the Model Name and Training Fields parameters. Select Synonym Model from the Model Type drop-down list. Then, click Submit.
You cannot change the model name after the model is created.
You can specify only fields of the SHORT TEXT or TEXT data type for the Training Fields parameter.
The synonym configuration model is created. Return to the Tailored Retrieval Models page.
Find the created model and check its status. The Model Status column displays Unavailable, and the Latest Version Status column displays Pending Training. Click Train in the Actions column.
Model training takes a few hours, and the amount of time varies based on the data amount.
You can repeatedly train a model. Each time a model training is complete, a model version is added in the Training History section on the details page of the model. The version numbers increase by increments of 1.
After the synonym configuration model is trained, check its status. The Model Status column displays Available, and the Latest Version Status column displays Trained and Ready.
Configure a query analysis rule
When you configure a query analysis rule, select Synonym, select the custom model type for the Dictionaries parameter, and then select the created model from the Custom Synonym Model drop-down list. Then, select the latest version from the Custom Synonym Model Version drop-down list, select an intervention dictionary as needed, and then click OK.
If no query analysis rule is available, create a query analysis rule first.
For more information about how to create an intervention dictionary and add intervention entries for synonym configuration, see Intervention dictionaries for synonym configuration.
Details pages
Tailored Retrieval Models page
Tailored Retrieval Models page
The Tailored Retrieval Models page displays the information about each model in columns such as Model Name, Model Type, Model Status, Last Training Started At, Latest Version Status, and Actions.
You cannot delete the tailored retrieval models that are referenced by query analysis rules.
Details page of a synonym configuration model
The details page of a synonym configuration model consists of three sections: Basic Information, Configuration Information, and Training History.
1. After a synonym configuration model is trained, you can find the model and click Details in the Actions column. Then, in the Training History section, click View in the Reference Rule column to view the query analysis rules that reference the model.
2. Test the model.
3. Compare the performance of synonym configuration models in typical cases.
You can select a built-in model and different versions of the current model to compare the performance of synonym configuration models.
The Typical Case Comparison section displays a maximum of 200 synonym configuration results, including the text and the results of both synonym configuration models that you selected.
You can enter a search query in the Test Text field to obtain synonym configuration results.
Search Test page
In the left-side navigation pane of the OpenSearch console, choose OpenSearch Industry Algorithm Edition > Feature Extensions > Search Test.
To view the amount of computing resources consumed by each search query, add the custom parameter fetch=result:compute_cost and turn on Source Code Mode.
If two or more models are used for index search, separate them with OR.
Limits
This feature is available only for exclusive applications of Industry Algorithm Edition.
A maximum of five tailored retrieval models can be created for an application. A model can have up to three versions.
A tailored retrieval model is created for a specific application and cannot be configured across applications.