This article walks you through creating a matching model, from importing your records to measuring its accuracy. If you are not yet sure whether matching is the right model type, read What is a matching model? first.
Prerequisites
Before you begin, make sure you have:
- Access to the Models section of the Tekst platform.
- Your master data as a CSV or JSON file, with one column that uniquely identifies each record.
- A few example messages in mind, each with the record you would expect it to match.
Step 1: Create the model
- Go to the Models section and select Add model.
- Choose Matching model as the type.
- Select Let's get started.
- Enter a Model name and an optional Model description.
- Optionally upload your master data file now by dragging a CSV or JSON file into the upload area. You can also do this later.
- Select Create Model.
Tekst creates the model and opens its detail page.
Step 2: Import your records
If you did not upload a file when creating the model, do it now from the Records section of the model's settings. For a full explanation of importing, updating, and re-importing records, see Managing master data records.
Step 3: Set the unique identifier column
Select Settings in the model header and, on the General tab, choose the column that uniquely identifies each record under Unique identifier. The list is only available once records have been uploaded, because the options come from the columns in your file.
This is required before you can add test items, because the unique identifier is how Tekst knows which exact record a match refers to.
Step 4: Add domain knowledge
Capture any synonyms, rules, and exceptions that should guide the model toward the right record. Domain knowledge is a written context document that you build by describing what you want in the assistant chat next to it, rather than by filling in fields. On the model's page the document is shown under Model context, with the Edit context chat beside it.
Good domain knowledge is often the difference between a model that handles your real-world data well and one that struggles with abbreviations and edge cases. For guidance, see Using domain knowledge to guide matching.
Step 5: Build a test set
A test set is a collection of messages for which you have confirmed the correct record. It is how Tekst measures accuracy.
- Select the Accuracy figure in the model header and open the Test set tab.
- Select Add and enter an example Input, the way a customer would write it.
- Under Ground truth record, search for and select the correct record, then select Add test item.
- Repeat for a spread of examples, including tricky ones with unusual wording.
Step 6: Review accuracy
Once you have imported records and added test items, Tekst evaluates the model automatically and reports its accuracy. Select the Accuracy figure in the model header to see how it is performing and where it is going wrong. Each test item shows the expected and the predicted record, and Show details adds a field-by-field comparison and the model's reasoning.
For a full explanation of how the score is calculated, see How matching accuracy is measured.
What happens next
As your team confirms or corrects matches, those corrections improve the model over time. You can also refine results by updating your domain knowledge or re-importing your records when your master data changes.
0 comments
Please sign in to leave a comment.