1

I wish to make a chatbot using the two services listed in the title. Watson assistant is used to make the dialog for the chatbot while watson discovery allows for finding information in a large variety of documents such as .html, .pdf files. I want to make a chatbot that uses these two services.

The way the chatbot would work is that when a user says something into the chatbot, it will go through watson discovery and run that query which will then return results back to the user.

I currently know how to use Watson Discovery and Watson Assistant but I am unaware how to link them together. I know its possible because I have seen demos on this but the ones who have made those demos give a lack in instructions to produce the chatbot.

data_henrik
  • 16,724
  • 2
  • 28
  • 49

2 Answers2

0

You could link Watson Discovery from within a dialog action of Watson Assistant. I have done that and described that method in the "5 minute barebone news chatbot". That blog post links to the full source code on GitHub.

Basically, within a dialog node I defined a client action. That action performs the call to Watson Discovery and returns the found items to the dialog node. There, it is presented as part of the chatbot response. In a similar way, you could pack that action as Cloud Function and execute it as server action.

"actions": [
        {
          "type": "client", 
          "name": "henriktest", 
          "parameters": {
            "topic": "<? $topic ?>", 
            "input": "<? input ?>"
          }, 
          "result_variable": "myNews"
        }
]
data_henrik
  • 16,724
  • 2
  • 28
  • 49
0

You might want to look at the new "Search Skill" feature in Watson Assistant. Though it is still in Beta phase, it provides a seamless integration between Assistant and Discovery out of the box.

https://cloud.ibm.com/docs/services/assistant?topic=assistant-skill-search-add

It is available to Plus or Premium plan users only.

Alternatively you can check this code out. https://github.com/watson-developer-cloud/assistant-with-discovery