-
Notifications
You must be signed in to change notification settings - Fork 135
Tutorial That
The that
tag allows you to create conversations, along with topic
you can create multi-part questions and answers, where follow-on questions can use the context of the previous response to influence the context of the next response/question.
Imagine a conversation in which you asked the bot a question, "What other AIs do you know" and it responded with "I have spoken to HAL before". If you then asked "Was he friendly" the conversation needs to know how to respond in the context of referring to the previous question about HAL.
<category>
<pattern>WHAT OTHER AIS DO YOU KNOW</pattern>
<template>I have spoken to HAL before</template>
<category>
<category>
<pattern>* FRIENDLY</pattern>
<that>I have spoken to HAL before</that>
<template>No, he seemed a little unhinged actually!</template>
<category>
Another example is to use that
when you need to handle basic responses that may be repeated multiple times such as Yes and No responses.
<category>
<pattern>COMEDY SCI FI</pattern>
<template>Do you like Red Dwarf?</template>
<category>
<category>
<pattern>YES</pattern>
<that>Do you like Red Dwarf</that>
<template>Awesome, my favourite character is Kryten</template>
<category>
<category>
<pattern>NO</pattern>
<that>Do you like Red Dwarf</that>
<template>Thats a shame, you should give it a second change.</template>
<category>
In this instance no matter how many YES/NO patterns you have, if the bot responds with 'Do you like Red Dwarf?', then if the next response is YES or NO, it will first be matched against the patterns above
Email: keiffster@gmail.com | Twitter: @keiffster | Facebook: keith.sterling | LinkedIn: keithsterling | My Blog
- Home
- Background
- Guiding Principles
- Reporting an Issue
- Installation
- You And Your Bot
- Bots
- Clients
- Configuration
- AIML
- Sentence Splitting
- Natural Langauge Processing
- Normalization
- Spelling
- Sentiment Analysis
- Translation
- Security
- Hot Reload
- Logging
- Out of Band
- Multi Language
- RDF Support
- Rich Media
- Asynchronous Events
- Triggers
- External Services
- Dynamic Sets, Maps & Vars
- Extensions
- Pre & Post Processors
- Custom Nodes
- The Brain Tree
- Utilities
- Building It Yourself
- Creating Your Own Bot
- Contributing
- Performance Testing
- FAQ
- History
- Website