Skip to content

2. How Skills Work

Gabi Dobocan edited this page Jan 11, 2019 · 1 revision

Niles uses Rasa as the underlying NLU to parse commands. To teach Niles to understand new commands, we'll generate a training dataset containing hundreds of annotated examples, then use that to train a Rasa Tensorflow pipeline.

Each skill is made up of one or more intents, which you can think of as abilities. Each intent is associated with one or more unique commands, and has an action that gets executed upon invoke.

Intents go through an intermediate format named Chatito. Each intent defined within a skill will produce a separate .chatito file, describing the structure of commands to be generated. Key concepts here are:

  • Commands: these are the entrypoints defining basic utterance structure for the generated dataset. A skill intent can have one or more associated commands. These can be plain text strings, or can contain references to aliases and slots. Equivalent to Chatito Intents. Example: intent.command(['~[create] ~[a new?] @[source?] file'])

  • Aliases: these are how you define Chatito synonyms; example: intent.alias('create', ['create', 'make']). To reference an alias from a command, slot or another alias use this format: ~[aliasname]. To make that reference optional in the overall utterance structure, place a question mark next to the alias name: ~[aliasname?].

  • Slots: these are how you define the data you need to extract from a command; example: intent.slot('source', { filePathPattern: true }). To reference a slot from a command or alias, use this format: @[slotname]. To make that reference optional in the overall utterance structure, place a question mark next to the slot name: @[slotname?]. You can provide slots with an array of possible string values (similar to aliases), or you can assign them to one or more predefined pattern generators (filePathPattern, numberPattern etc.);

Read the full Chatito spec.

To create a skill, you will need to:

  • describe its abilities
  • describe usage and provide examples for each individual intent
  • provide code for each action to be performed

Clone this wiki locally