What are the supported response and chat log formats for importing and exporting? |
From the "Training & Chat Logs page" in your bot's Admin Console you can import chat logs and response lists to train your bot. Four formats are supported:
The Training & Chat Logs page also supports exporting conversations, or responses to any of these formats. The easiest way to learn a format is to export a conversation log or responses in the format to use as an example. Response ListA response list is a list of question/response pairs. Each phrase is separated by a new line, and each question/response list is separated by an empty line. You can also tag responses with meta data such as keywords to influence when the response is used. Response lists are the recommended way to train a bot. The bot will automatically find the best matching response for any question, the questions do not need to be exact matches, only sufficiently similar, or include a keyword. Response lists support the following tags:
You can also define "default:" responses, or "greeting:" phrases, or execute Self scripts through "script:". Example Response List:greeting: Hello, how can I help? default: Sorry, I did not understand that, perhaps rephrase your question, or email [email protected] Hello Hello there Hi Hi, who are you? How are you? Fine. Good. Swell. I am sad today. How old are you? I am only 1 year old. keywords: old required: old topic: age CSV ListA Comma Separated Values (CSV) list is a list of question/response pairs separated by a comma. Each question/response is separated by a new line. CSV is a convenient format to export from Excel or other spreadsheets. Each response can have multiple questions separated by a "?", and a third, fourth, and fifth column can be used for keywords, required words, and the topic. For example:"Hello","Hello there" "Hi","Hi, how are you? How are you?" "How are you?","Fine." "How old are you?","I am only 1 year old.","old","old","age" Chat LogThe chat logs format is a log of a conversation between two or more people. Each phrase starts with the name of the speaker followed by a ':' (i.e. Jim:). Each phrase is separated by a new line. If the log contains multiple conversations, then each conversation must be separated by a empty new line. Chat logs are an easy way to train a bot from exiting conversation logs that you might have from live chat, chat rooms, or find online. However, chat logs are not always the best way to train a bot as it will learn all of the responses. You have more control over how the bot will use a response using a response list file, or AIML. Example Chat Log:Jim: Hello Cindy: Hello Jim Jim: How are you Cindy? Cindy: I am fine thanks for asking. Jim: Hi Cindy: Hey Jim: What is your name? Cindy: My name is Cindy. The name is important, as the bot can learn to replace the name in a phrase with the speaker or targets of the phrase. For example "Hello Jim" can automatically become the template response Template("Hello {:target}"). Templates require that comprehension is enabled in the bot. It is important to separate new conversations by an empty line. The bot will learn from the conversation in context. Starting a new conversation starts a new context, so the bot will not get confused with the phrases in the previous conversation. i.e. if there was no new line above, the bot with think that "Hi" was a response to "I am fine thanks for asking." in the context of "How are you Cindy?". The chat log format also supports some advanced syntax. You can add a default response to your bot using the "default:" prefix. A default response is what the bot will say when it does not know a good response.
You can associate a phrase with an emotional state using " You can execute a Self script from a chat log. This allows you to load knowledge into your bot. Scripts are executed using the "script:" prefix. For example:default: I do not understand. default: Sorry, please rephrase your question. anonymous: AIMLThe Artificial Intelligence Markup Language is a standard XML format for chat bot responses. It includes XML elements for patterns (questions) and templates (responses).
The are many free AIML files available on the web in many different languages. |
|
|
|
|