AI and DS Skills

 View Only

Answering questions using a foundation model

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


What’s new?

When you search the IBM 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"

Note: This feature is only available when you view the documentation while logged in to  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

  1. Someone reading the 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, which then generates a short answer

Sample prompt text

In the Prompt Lab in, 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:

[ 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 ]

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 here: Try IBM for free

1 comment



Thu July 13, 2023 11:20 AM

will you enable this feature for the doc that's on: We would love to work with you on this.