Default Custom Match
A Custom Match Skill is a sub-type of the Default Skill Type.
This type of Skill is executed when all of the following requirements are met:
- A project's Base Corpus is unable to fulfil the user's request, and responds with a NO_MATCH response AND;
- All other Default Skills with higher priority did not handle the request AND;
- The user input matches a regular expression or exact string phrase defined in the
launchPhrases
for this Skill.
Common use cases
A Custom Match Skill must provide a response for a very specific user input. It is usually used for cases such as:
- Event Matching to respond to a fake user input that was generated programmatically, for example a UI button being clicked and sending an event
BUTTON_CLICKED
as user input to elicit a response. - Regex Matching to identify and respond to specific user inputs, as a more simplistic alternative to an Intent Match Skill.
Implementation requirements
A Custom Match Skill only receives user input when one of its launchPhrases
is matched.
The Skill may be written using a supported third-party NLP Platform, or using the Skills SDK.
The launchPhrases
provided in the Skill Definition are only used to determine if a Skill should be given an opportunity to respond to a user input. The Skill is not provided information about why the Skill was matched, or which of the launchPhrases
was matched. It must implement its own form of input matching to determine how to respond to the user input.
Implementation requirements for a Phrase Match Skill:
- It must provide
launchPhrases
in the Skill Definition. - It must implement its own phrase matching internally.
- It must respond if executed.
- It may respond with a NO_MATCH response if it is unable to handle the user input.
Creating a Custom Match Skill
A Custom Match Skill can be created using your preferred method:
- Visually using one of the supported Conversation Providers
- Programmatically using the Skills SDK
Registering a Custom Match Skill
It is recommended to use the Skill's description
field to explain which user inputs would be matched by your Skill.
You should clearly state any recommendations to help users avoid intent matching conflicts, for example by accidentally handling the same phrases in their Base Corpus, thereby not giving your Skill a chance to respond.
Example Skill Definition for a Custom Match Skill:
{
"name": "My Skill",
"summary": "skill summary here",
"description": "",
// ... other skill properties
"config": {
"skillType": "DEFAULT",
"matchType": "CUSTOM",
"launchPhrases": [
{
"lang": "us-EN",
"value": ".*"
}
]
}
}