Päivitä Platinum palvelu ja hanki oma räätälöity 3D-avatar

What are labels, and how to reuse responses?

tekijä admin Lähetetty Feb 11 2016, 10:20

Bot Libre supports labels. A label lets you name a response and then reuse it just using the name. You can set the label for a response from the Training & Chat Logs page in your bot's Admin Console, or by importing a response list file.

To reference a label just put the label name as the response i.e. #hello (labels must start with a #).

Example labels in response list file

Hello Hello, how may I be of service? label: #hello Hi #hello How is it going? #hello

You can also use AIML or Self SRAI redirects in a response, or in a response list file. Labels are simpler and more efficient than AIML SRAI redirects as they are just an indexed reference to the response, and do not require a recursive evaluation.

You can use Patterns, Formulas, and even AIML in a response list file, and in the Training & Chat Logs.

Example AIML SRAI in a response list file

Hello Hello, how may I be of service? Pattern:"^ hello ^" Formula:"{redirect "hello"}" <pattern>^ hello ^</pattern> <template><srai>hello</srai></template>

by Billnichols posted Feb 12 2016, 11:07

I entered your chat log exactly as posted.

Hello, how may I be of service?
label: #hello


How is it going?

Here is my conversation:

You: hello

Bot: Hello, how may I be of service?

You: hi

Bot: #hello

You: how is it going?

Bot: #hello

So it looks like the label isn't getting picked up as such.  I can't find the version I'm running based on the ant file or other files I've browsed.  I downloaded the engine on Feb 2.


Thumbs up: 1, thumbs down: 1, stars: 3.5
Views: 4491, today: 1, week: 5, month: 31

by admin posted Feb 12 2016, 14:14
I tested the same log on the website and it worked correctly as expected.

Your issue is your are importing the file as a "Chat Log" not as a "Response List". The chat log format is for a conversation log, the bot can learn from a chat log in context when learning is enabled. What you want to load is a response list, which is a list of question/response pairs with additional info like keywords, labels, etc.

The issue is the test GUI that you are using loads files as chat logs, not as response lists.
To fix the issue in the BotFrame class change the following line of code,
getBot().awareness().getSense(TextEntry.class).loadChatFile(file, "Chat Log", "", true, false);


getBot().awareness().getSense(TextEntry.class).loadChatFile(file, "Response List", "", false, true);

The test GUI is just used for testing, so kind of out of date in places. If you would like to updated the UI please feel free to join the project on GitHub.

Updated: Feb 12 2016, 14:15
Thumbs up: 0, thumbs down: 2, stars: 2.0
Views: 4812, today: 1, week: 8, month: 38

Id: 12117061
Tunnisteet: training, aiml, labels, srai, response lists
Lähetetty: Feb 11 2016, 10:20
Päivitetty: Feb 11 2016, 10:21
Vastaukset: 2
Näkymät: 6723, Tänään: 3, Viikolla: 6, Kuukausi: 50
1 0 5.0/5