Ever wondered where SUSI’s answers come from? Now Susi has ability to do an answer analysis. To get that analysis, just ask susi “analysis”. This will set susi into an analysis mode, will tell where the latest answer came from and will give you the link for improving the skill.
Let’s check out how Susi analysis work. The skill for analysis is defined en_0001_foundation.txt as following
$skill$ and $skill_link$ are the variable compiled using
These variables are memorized in Susi cognition. A cognition is the combination of a query of a user with the response of susi.
Susi Thought is a piece of data that can be remembered. The structure of the thought is modeled as a table in which information contained in it is organized in rows and columns.
One can memorize using addObservation() method. It takes two parameter featureName the object key and observation the object value. It is a table of information pieces as a set of rows which all have the same column names. It inserts the new data always in front of existing similar data rather than overwriting them.
The getSkillLink is a utitlity method to return the link of the skill source github repository based on skillPath.
The source of the skill gets added in SusiIntent.java using getAbsolutePath() method which resolves the skill path in the filesystem. Intent considers the key from the user query, matches the intent tokens to get the optimum result and produces json like
The getskills() method returns list of skill from json which are later added for memorization.
This is how Susi is able to fetch where the answer came from. Next time when you have a chat with susi do check skill analysis and add your ideas to improve the skill. Take a look at Susi_skill_data for more skills and read this tutorial for creating skills for susi.
- Teach Susi a skill https://blog.fossasia.org/how-to-teach-susi-skills-calling-an-external-api/
- A developer’s guide to chatbots by Michael Yuan https://www.ibm.com/developerworks/library/cc-cognitive-chatbot-guide/index.html
- Building a Chatbot: analysis- by Javier Couto https://tryolabs.com/blog/2017/01/25/building-a-chatbot-analysis–limitations-of-modern-platforms/
- The source code – https://github.com/fossasia/susi_server/tree/development/src/ai/susi/mindSusi
- Skill Development tutorial- https://github.com/fossasia/susi_skill_data/blob/master/README_susi_skill_language_tutorial.md