Build a FAQ Chatbot with Oracle Digital Assistant in 15 minutes

Update: There is a new approach for building FAQ’s by using answer intents instead of the QnA module. This approach is deprecated. I will write a post on it soon. Meanwhile have a read here and here.

The fastest way to get value out of the Digital Assistant is by implementing a Q&A or FAQ chatbot. Most organizations already have an internal FAQ for multiple purposes (IT helpdesk, employee onboarding, processes etc). You can create a better user experience by exposing all of those assets via any channel you want with a chatbot.

I will show how to create a working FAQ Chatbot in less than 15 minutes!

For this use case I will create a Glossary for the Oracle Cloud Infrastructure (OCI). This information can be found here.

Wally Replaces Himself With Chatbot - Dilbert by Scott Adams
from dilbert.com

The Data Source

The core part for this entire exercise is the data and the file where we will store everything.

The data source should have 3 columns:

  1. Category_path
  2. Questions
  3. Content

I only set 1 category, but in a real use case, it would be advisable to separate the questions into categories.

Create a Skill with Q&A

We can have skills with regular intents and also answer (q&a) intents, and create a dialog flow that handles the intent resolution correctly. For this particular case I will create a skill with only Q&A.

We can open the Skill and the Q&A tab, and then add the data source.

If your business runs with a different language, do not worry, as the NLP engine now supports other languages (Portuguese/Spanish/German/French/Arabic etc.). Check the documentation for the latest list.

Simple enough 🙂 This now provides a much easier UI to manage those questions.

Alternative Questions

The same way as with Intents and Utterances, there can be many ways of asking for the same thing. For that purpose, we should provide alternative questions.

The Bot needs Training before being ready to be used.

And in a similar fashion as with Intents, we can try out and add questions that don’t resolve to a particular one.

Below you see 2 examples of ambiguous questions. When we ask for Domain, there are many possibilities.

The good thing is the Q&A in this case will show all the 3 answers, and let the user pick the one that he wants.

Another helpful capability is where we can provide Synonyms, Abbreviations and Ignored Words. This can help the engine in understanding a more realistic way of human interaction.

For this OCI Glossary we have plenty of acronyms which we would manage as a synonyms list. OCI and Oracle Cloud Infrastructure would be recognized as the same. It’s easier to manage this in the configurations rather than adding alternative questions for every single item.

Dialog Flow

This is a very simple dialog flow, with a qna and an unresolved states.

name: OCIFAQ
states:
  
  qna:
    component: "System.QnA"
    transitions:
      actions:
        none: "unresolved"
      next: "qna"
  unresolved:
    component: "System.Output"
    properties:
      text: "Well done, you managed to break me! Let's start again!"
    transitions:
      return: "done"

FAQ Chatbot ready

When I ask for Domain, there are several possible Q&A answers.

Optional – Create a channel

In this post I covered the necessary steps to create a Web based channel.

This is how this bot would look like using Oracle’s Redwood Theme for the Widget!

Conclusion and More Resources

This has been a very simplified approach to FAQ implementation, but it covers the main steps and how one can set something up in less than 15 minutes 🙂

For more detailed information you can check this: https://blogs.oracle.com/mobile/techexchange%3a-building-a-frequently-asked-question-skill-using-a-programming-by-convention-approach. It’s a very detailed guide that shows how to customize the answer based on the user channel.