Watson Conversation Part 3: Further Tips & Tricks

By Jeremiah Mannings

This is a short article following on from the previous parts relating to intent, entity, and dialog design, check those out if this is the first you are reading! The links are below. This article covers some quick tips and tricks that will help you get started alongside the previous articles in creating some well built and useable NLP bots on the Watson platform.

Links to previous articles:

If you are reading this article for the first time, make sure you check out the previous articles in the series!

Part 1: Watson Conversation WCS Intent Design

Part 2: Watson Conversation Entity & Dialog Design

Further steps

This series of articles provides the basis for building the conversational system in an accurate, useful, and repeatable manner. The initial build may be slightly arduous due to tool changes and a changing structure, but it creates a basis that is very easy to maintain and improve on in the future. Once you have built the first one, the rest get easier after that!

Context

A context is quite a useful tool in the conversational API as it allows your user to feel like the system is ‘making notes’ of what they are asking about and ‘learning’ as they go. Context, when stored in the cookie of the website, enables the user to return to the bot and have context preloaded into the conversation which can allow more in-depth and accurate answers depending on how the bot is being questioned.

It can also allow leading questions, such as “How did you go with the home loan you asked me about previously, is there anything else you need to know?” which proactively engages the user and deepens the impression of the user is looking for.

Training tools

Furthering the bot into the future requires the development of iterative training tools, like the tools used in the first stage of the project to boost the variations trained in the intent and expand the entities over time. This must be done logically without overtraining (see intent article) to keep improving the accuracy of the system over time.

Appendices
Useful Watson code snippets

Confidence, this uses the confidence variable in the node trigger.

intents[0].confidence>0.5

Adding text into a response, you can use this to surface things the user was mentioning, the ‘<?’ brackets are used to open and close the code and are not shown in the response. The following snippet would show the first entity found in the user’s query in the answer.

<?entities[0]?>

You can access two kinds of entities, the literal and the value. The literal is the text the user entered to surface the entity match, and the value is the name of the entity parent name.

<?entities[0].literal ?>
<?entities[0].value ?>

The input text can be accessed and assessed on a more basic level if it is required (this can be used for specific word based triggers such as codes) it works in three ways, you can test a direct match, contains, and a matches a set.

input.text=='test'
input.text.contains( 'test')
input.text.matches( '[0-9]+')
Conclusion

These articles will give you a good understanding of the WCS system, and how to construct and begin building your first WCS bot, or if you have built some before, give you some in-depth tips and tricks to further enhance your bots.

Feel free to contact me if you have any questions or comments about the articles, good luck!

Join the conversation

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Comments

Post has no comments.