Boost Service Accuracy with Synonyms: A Comprehensive Guide

In this tutorial, you will discover how to:

  • Enhance the quality of your service responses by incorporating synonyms.
  • Evaluate the improved response quality using the inspect feature within the Test pane.

This guide will demonstrate the process of elevating your service response quality through the strategic use of synonyms. We address the common challenge where users might not receive precise answers when posing queries using alternative phrasing, synonyms, or acronyms. To tackle this, we’ll leverage the Authoring API to enrich our service with synonyms for key terms, ensuring broader query understanding and improved user satisfaction.

Implementing Synonyms via Authoring API

Let’s enrich our service by adding the following word sets and their variations to refine search results and enhance accuracy. This table outlines the words and their corresponding alterations we will implement as synonyms.

Word Alterations
fix problems troubleshoot, diagnostic
whiteboard white board, white canvas
bluetooth blue tooth, BT
{ "synonyms": [ { "alterations": [ "fix problems", "troubleshoot", "diagnostic", ] }, { "alterations": [ "whiteboard", "white board", "white canvas" ] }, { "alterations": [ "bluetooth", "blue tooth", "BT" ] } ] }

To illustrate the impact of synonyms, we’ll examine the question and answer pair “Fix problems with Surface Pen.” We will compare the service’s response to a query using the synonym “troubleshoot” both before and after synonym implementation.

Response Quality Before Synonym Integration

Enhanced Response Quality After Service Synonym Implementation

As clearly demonstrated, before the inclusion of “troubleshoot” as a service synonym, the query “How to troubleshoot your surface pen” yielded a response with a lower confidence score. However, subsequent to adding “troubleshoot” as a synonym for “fix problems,” the service provided the correct answer with a significantly improved confidence score. This enhancement in result relevance directly contributes to a more positive and efficient user experience.

Important Note:

Synonym matching within the service is case-insensitive. However, using stop words as synonyms might lead to unexpected behavior. A comprehensive list of stop words is available here: List of stop words. For example, if you were to add “IT” as a synonym for “Information Technology,” the system might fail to recognize “Information Technology” because “IT” is classified as a stop word and is typically filtered out during query processing. It’s crucial to be mindful of stop words when defining your service synonyms.

Key Considerations for Service Synonyms

  • The order in which synonyms are added is not significant. The system does not rely on ordering for any computational logic.
  • Synonyms can only be incorporated into a service that already contains at least one question and answer pair. A service needs to be initialized with content before synonyms can be applied.
  • Synonym addition is contingent upon the presence of at least one question and answer pair within the service.
  • Overlapping synonym words across different sets of alterations can lead to unpredictable outcomes and is generally discouraged. It’s best to keep synonym sets distinct and non-overlapping.
  • Special characters are not permitted within synonyms. For hyphenated terms like “COVID-19,” they are treated equivalently to “COVID 19,” with “space” serving as a term separator. The following special characters are not allowed in service synonyms:
Special character Symbol
Comma ,
Question mark ?
Colon :
Semicolon ;
Double quotation mark
Single quotation mark
Open parenthesis (
Close parenthesis )
Open brace {
Close brace }
Open bracket [
Close bracket ]
Hyphen/dash
Plus sign +
Period .
Forward slash /
Exclamation mark !
Asterisk *
Underscore _
Ampersand @
Hash #

Next Steps

To further explore service enhancements and advanced configurations, refer to the comprehensive Authoring API documentation.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *