IBM Developer

Tutorial

Integrate NeuralSeek with watsonx Assistant and Watson Discovery

Provide intelligent conversational answers for your customers from your chatbot

By Alexander Dfouni

This tutorial provides an easy-to-follow guide on how to set up and add NeuralSeek's capability of using IBM Watson Discovery to produce intelligent conversational answers for your assistant to provide to customers. The tutorial walks you through how to provision NeuralSeek and integrate it with your existing Watson Discovery instance and project as well as how to integrate and set up NeuralSeek with an IBM watsonx Assistant instance that already has a Search Skill added.

Prerequisites

  • Access to any watsonx Assistant instance on a Lite, Plus Trial, Plus, or Enterprise plan
  • An understanding of the watsonx Assistant user interface
  • Access to an instance of Watson Discovery
  • The Service URL as well as the API Key for your instance of Watson Discovery, found on the Service credentials section of the instance page within IBM Cloud
  • The Project ID for the Project where documents have been loaded within Watson Discovery, found within the Integrate and deploy section of the Project, within the API Information tab

Steps

  1. Sign in to IBM Cloud, search for NeuralSeek from the Catalog, select a plan type (a), agree to the third-party terms (b), and click Create (c) to provision.

    Sign in screen

  2. Open NeuralSeek by clicking Launch NeuralSeek.

    Launch NeuralSeek button

  3. For the Basics step, (a) enter the company name that will be the main focus of the NeuralSeek instance. Usually, this is the name of the company (or department) the Assistant represents. Next, (b) select either Internal or External tuning, depending on if the Assistant will be customer-facing or employee-facing. Click Next (c).

    Open Corporate Knowledgebase

  4. Complete this section with the (a) Service URL, API Key, and Project ID of your Watson Discovery instance and project where your documents are loaded. Click Test (b) to ensure that the connection is set up correctly. Click Next (c).

    Open company preferences

  5. On the About step, NeuralSeek generates a short write-up about your company or organization. Here, you also have the option to replace the generated write-up with your own. After you (a) confirm the write-up is accurate, and (b) ensure that the framework and language selected are correct. Then, click Next (c).

    About step

  6. On the Tune step, (a) select the setting that most resembles your content and data, then (b) choose an option that best describes how up-to-date your content is. Then, click Next (c).

    Integrating watsonx Assistant and NeuralSeek

  7. Click the Seek tab (a), which allows testing questions and viewing responses and their confidence levels. Try asking a question that your assistant normally handles using Watson Discovery, and press Seek (b). In this case, the prompt results in a much more natural response than when using Watson Discovery alone.

    Watson Discovery with NeuralSeek's answer:

    NeuralSeek answer

    Watson Discovery without NeuralSeek's answer:

    Without NeuralSeek answer

  8. You are now ready to integrate watsonx Assistant and NeuralSeek. Within NeuralSeek, navigate to the Integrate tab (a). Copy the API key (b) here for safekeeping. Download the Custom Extension OpenAPI file (c) on the left side. Watsonx Assistant requires both of these to integrate with NeuralSeek.

    Integrating watsonx Assistant and NeuralSeek

  9. Open your instance of watsonx Assistant and navigate to the Integrations tab (a), click Build Custom Extension (b), then click Next.

    Building custom extension

  10. Name the extension NeuralSeek (a), give a brief description (b), then click Next (c).

    Custom extension

  11. Upload your NeuralSeek OpenApi file (a). Click Next (b), then click Finish (c).

    Uploading NeuralSeek file

    Reviewing the extension

  12. On the new NeuralSeek extension tile that appears, click Add (a), Add (b), then Next (c).

    Adding NeuralSeek extension image 1

    Adding NeuralSeek extension image 2

    Adding NeuralSeek extension image 3

  13. On the authentication screen, select API key auth (a), and enter your api key (b) from NeuralSeek (covered in Step 6). Click Next (c), Finish, then Close.

    NeuralSeek authentication image 1

    NeuralSeek authentication image 2

  14. On the Actions tab of watsonx Assistant (a), click New Action (b). Choose Quick start with templates (c).

    Selecting actions image 1

    Selecting actions image 2

  15. Select Do more with starter kits (a), select the NeuralSeek starter kit (b), then select Add templates (c).

    Selecting starter kits

    Selecting NeuralSeek starter kit

  16. After the template is added, you see that the Status has a red indicator. To address this, open the *NeuralSeek search action within the Created by you tab of Actions.

    Status indicator

  17. The third step (a) in the NeuralSeek template needs to be set up. Within the And then section, click Edit extension (b), and select NeuralSeek from the drop-down menu. Click Apply.

    Editing the extension step

    Extension setup

  18. Update the Operation to Seek an answer from NeuralSeek (a). Update the question string to be set to *query_text (b). Update the context string to be set to *query_context (c). Optionally, set the options.language string to an expression "en" (d). Click Apply.

    Updating the extension

  19. Save and then close the action. You see that the status indicator is now green. However, the Assistant doesn't know to use this action yet, so navigate to the Set by assistant section of Actions, and open the No action matches action.

    Opening No action matches

    Set by assistant -no matches

  20. Delete the default steps (a, b). Then, click New step + to add a blank step (c).

    Adding step

  21. After selecting New step + (a), within the And then section, set the Continue to next step (b) to Go to another action (c). Then, select the *NeuralSeek search (d) action from the drop-down list. Save and close the action.

    Go to another action addition

    Go to another action par 2

  22. Optionally, remove actions that were calling Watson Discovery (a, b) by having the And then section search for an answer. Open the Preview (c) window and see how NeuralSeek now handles them as a single fallback action and provides an exceptionally natural response.

    Opening Preview window

    Extension information

Summary

You have successfully integrated IBM watsonx Assistant with NeuralSeek. For many use cases, NeuralSeek alone is enough to deploy an assistant. If you are happy with your assistant, you might want to deploy it for real-world use right away. Use the Analyze page in watsonx Assistant or the Curate page in NeuralSeek to see what kinds of questions users are asking and actions for the common user requests. The Curate page can automate the creation of new actions and generate new example utterances that trigger those actions. It can also merge any existing actions with the actions that it generates so that you can update an existing assistant.

For more information and updates surrounding integrating NeuralSeek with watsonx Assistant, see the NeuralSeek documentation.

Any questions? Reach out to Alexander Dfouni.