Skip to main content

Understanding Skill Types

The concept of "Skill Types" in the Skill SDK is different from "Skill Categories" in DDNA Studio. It is important to understand these differences before embarking on writing your own Skill.

In the Skill SDK, the skillType of a particular Skill determines which part of the Skills Platform lifecycle will execute the Skill. In other words, a Skill's skillType determines the role it plays in generating a response for a Digital Person to speak in response to user input.

In DDNA Studio, Skills are not so clearly differentiated, with only the types "Base Conversation" and "Skills" made clear in the user interface. Skill Categories in DDNA Studio do not have a 1:1 relationship with Skill Types in the Skill SDK.

The different types of Skills are discussed in detail below to help you understand how Skill Types in the Skill SDK relate to Skill Categories in DDNA Studio.

Skill Types in the Skill SDK

In the Skill SDK, the skillType of a Skill determines where in the Skills lifecycle it is executed. In the case of skillType: DEFAULT, there is an additional matchType property which further modifies where that Skill executed in the lifecycle.

Possible values for skillType and matchType:

skillTypematchTypeDocs
BASE_CORPUSnoneBase Corpus Skills
DEFAULTINTENTIntent Match Skills
DEFAULTFALLBACKFallback Match Skills
DEFAULTCUSTOMCustom Match Skills
PRE_PROCESSnonePre-Process Skills
POST_PROCESSnonePost-Process Skills
PRE_POST_PROCESSnonePre and Post-Process Skills
INTENT_MATCHER [PRIVATE]nonenone

The skillType and matchType combination determines when and how a Skill is executed. These values must be provided by the Skill developer in the JSON Skill Definition when the Skill is registered in DDNA Studio.

The diagram below shows the Skills Platform lifecycle, and indicates how the skillType and matchType determine when a Skill may be executed. Click the image for a larger view of the Skills lifecycle.

skill types

Base Corpus

  • skillType: BASE_CORPUS

A Skill which can be used as a project's Base Conversation.

Read more: Base Corpus Skills

Default

  • skillType: DEFAULT
  • matchType: INTENT | FALLBACK | CUSTOM

A Skill which may be executed if the Base Conversation does not provide a valid response.

Read more:

Pre-Process

  • skillType: PRE_PROCESS

A Skill which executes for every user input. Is able to observe or modify the Skill SDK request payload, including the user's input, before the Base Conversation or other Skills receive the request.

Read more: Pre-Process Skills

Post-Process

  • skillType: POST_PROCESS

A Skill which executes for every Skills Platform output. Is able to observe or modify the Skill SDK response payload, including a Skill's output, before the Digital Person speaks the response.

Read more: Post-Process Skills

Pre and Post-Process

  • skillType: PRE_POST_PROCESS

A Skill which executes for every Skills Platform input and output. Is able to observe or modify Skill SDK request and response payloads. A Skill which encompasses both Pre-Process and Post-Process functionality.

Read more: Pre and Post-Process Skills

Intent Matcher (PRIVATE)

  • skillType: INTENT_MATCHER

A Skill which determines precedence for execution of DEFAULT Skills. This type of Skill is internal to Soul Machines nd can not be modified or swapped, but is mentioned here for completeness.

Not to be confused with a DEFAULT Skill with matchType INTENT, which is a Skill that executes when a particular user intent is matched.

Skill Categories in DDNA Studio

When a project is being configured in DDNA Studio, the Skills and Conversation section allows the project creator to choose multiple Skills. There are some rules around this.

  1. They must choose one Base Conversation for their project
  2. They may optionally add any number of non-conflicting General Skills
  3. They may optionally add any number of Pre or Post-Process Skills
  4. They may optionally add one Fallback Skill

Base Conversation

  • skillType: BASE_CORPUS

In DDNA Studio, a project must have a Base Conversation. It may only have one Base Conversation. This conversation will be treated as the primary conversational content.

Learn more about the Base Conversation Skill type.

General Skills

A project may optionally have any number of Skills which are not classified as a Base Conversation.

In DDNA Studio, all General Skills are grouped together in the user interface. To help users understand how to consume your Skill, it is recommended that you name the Skill in such a way that its usage is communicated clearly, and that the description explains how and when the Skill will be executed.

A Skill in DDNA Studio may be any of the following sub-types:

Intent Match

  • skillType: DEFAULT
  • matchType: INTENT

This type of Skill is only executed when the user's input is matched to a specific pre-defined intent that is known to the Skills Platform. Intents defined in a third-party service are not taken into consideration.

Learn more about the Default Intent Match Skill types.

Fallback Match

  • skillType: DEFAULT
  • matchType: FALLBACK

This type of Skill is only executed if none of the other Skills or Base Conversation were able to respond to the user's input. This is the last Skill to be called in the life cycle.

Learn more about the Default Fallback Match Skill types.

Custom Match

  • skillType: DEFAULT
  • matchType: CUSTOM

This type of Skill is only executed if the user's input matches a specific Regular Expression.

Learn more about the Default Custom Match Skill types.

Pre and Post-Process

  • skillType: PRE_PROCESS / POST_PROCESS / PRE_POST_PROCESS

This type of Skill is executed for every user input and/or Skill output, depending on whether it is registered as Pre-Process, Post-Process, or both. A Pre- or Post-Process Skill is used to manipulate or observe inputs and outputs of the Skill Platform.

Skill Use Cases

There are some common use cases for Skills, but it can be tricky to understand the relationship between skillType, matchType and the actual Skill you want to build. Let's look at a few common scenarios.

NLP Adapter

A Skill which maps between the Soul Machines SkillSDK and some third-party conversational content provider. For example, an integration with VoiceFlow, Watson or Dialogflow is an NLP Adapter.

This kind of Skill enables DDNA Studio projects to consume content from any external source that provides a well-defined API for conversational content.

An NLP Adapter Skill should be configured to accept inputs such as an API Key and Project ID, which can be provided by a user in the DDNA Studio project form. The Skill itself should not define any conversational content, but instead sources that content from a conversational corpus in the connected conversation provider.

You can register an NLP Adapter Skill as a:

  • Base Conversation
    • skillType: BASE_CORPUS
  • Fallback Match
    • skillType: DEFAULT
    • matchType: FALLBACK

Intent-Based Conversation

A Skill which can only handle a specific set of pre-defined intents.

This type of Skill is very similar to an NLP Adapter Skill. The difference is that this type of Skill's conversational content is pre-defined and can not be edited by the person consuming the Skill from DDNA Studio.

With this type of Skill, every project that uses the Skill would be ultimately using the same conversation corpus in the background.

Most handwritten reusable or "pluggable" conversations fit this type of Skill, whether the conversation corpus has been designed via a graphical user interface like Dialogflow, or is programmatically defined like a Rasa corpus.

Generative Conversation

A Skill which can respond reasonably to anything the user says.

This type of Skill will usually be implemented with a LLM (Large Language Model) such as GPT-3 or similar.

Be cautious when using generative conversations as a Base Conversation, as their ability to respond to every user input means that they will never give any other Skills an opportunity to respond. This type of Skill is much more suitable as a Fallback, where having every user input handled is desirable.

You can register a Generative Conversation Skill as a:

  • Fallback
    • skillType: DEFAULT
    • matchType: FALLBACK

Caution: For Base Conversations, take extra care to ensure that the Skill returns a NO_MATCH in some cases to allow other Skills to execute:

  • Base Conversation
    • skillType: BASE_CORPUS

Fallback

A Skill which should be able to appropriately respond to any user input.

This type of Skill offers a final opportunity in the Skill life cycle to handle any previously unhandled user input.

A Fallback Skill is the equivalent of a whole Skill dedicated to handling "I'm sorry, I don't understand". This Skill type can be used for creatively managing the NO_MATCH case that is commonly encountered with hand-written conversations, when none of the defined intents are able to handle the user's input.

  • Fallback
    • skillType: DEFAULT
    • matchType: FALLBACK