Global AI and Data Science

 View Only

Answering watsonx.ai questions using a foundation model

By Sarah Packowski posted Fri July 07, 2023 11:02 AM

  

What’s new?

When you search the IBM watsonx.ai product documentation, a large language model generates a short answer to supplement the usual search results. This solution can answer factual questions like "What does top-p mean?" and "What are all the foundation models available in watsonx.ai?"

Note: This feature is only available when you view the documentation while logged in to watsonx.ai.  Asking questions using this feature does not cost you anything and does not consume your monthly foundation model tokens.

How does it work?

We leverage our existing documentation search and prompt a foundation model in watsonx.ai:

  1. Someone reading the watsonx.ai product documentation types a question in the search bar
  2. The documentation search runs as usual, returning matching topics
  3. We extract the contents of the topics in the top few search results as plain text
  4. We paste the topic contents and the question into a question-answering prompt (see below)
  5. We send the prompt to a model in watsonx.ai, which then generates a short answer

Sample prompt text

In the Prompt Lab in watsonx.ai, you can experiment with different prompts and different models to see what works best for your use case. Here’s the kind of prompt we use for this solution:

Article:
###
[ Topic text goes here ]
###

Answer the following question using only information from the article.
Answer in a complete sentence, with proper capitalization and punctuation.
If there is no good answer in the article, say "I don't know".

Question: [ Customer question goes here ]
Answer:

Big customer experience improvement for a small implementation effort

This simple example demonstrates the tremendous potential of text-generating models:

  • Before, customers searched for relevant topics and then read through them to find details they needed.
  • Now, customers have the option to find those details by simply asking questions in their own words.

The best part: we built this solution using what we already had! We used existing APIs to search and get topic contents, and we didn't have to make any changes to use them for this new purpose.

Prompting a model to answer questions based on the documentation was a small effort for a big improvement.

Learn more

Try out watsonx.ai here: Try IBM watsonx.ai for free


#AIandDSSkills

1 comment
118 views

Permalink

Comments

Thu July 13, 2023 11:20 AM

will you enable this feature for the doc that's on: https://www.ibm.com/docs/en/watsonx? We would love to work with you on this.