The IBM Watson™ Question and Answer service provides an Application Programming Interface (API) that lets you add the power of the IBM Watson cognitive computing system to your application. Applications that work with the service use a corpus of information that provides domain knowledge based on a specific set of input documents and other information. Two default corpora are provided for use with the service, Watson for Healthcare and Watson for Travel. Corpora for the Question and Answer service describes the contents of these corpora, the information sources from which they were created, and some classes of sample questions that you can use when testing with them.
You can see a quick demo of the Question and Answer service in action. The demo application lets you enter questions against a selected corpus. You choose the corpus, Healthcare or Travel, enter a question, and the application returns responses with their confidence levels. You can also download an article and sample code from GitHub that shows you how to use the service with Watson Explorer, another Watson product.
We are always looking to improve and learn from your experience with our services.
You can submit comments or ask questions about Question and Answer in the
Watson dev forum. The Question and Answer
service also includes a
feedback API that can be used to submit comments,
observations, and suggestions that Watson and its developers can use to educate and
improve the service; see Submitting feedback about the
Note: This is a beta release of the Question and Answer service. The beta version of this API might not be supported after a new beta is released or after the service exits beta. The service is not recommended for production use. Visit the forum mentioned above to provide feedback on how we can improve the API.
To begin working with the Question and Answer service by creating and running applications that communicate with the service, see the following:
To create and run an example Node.js application that works with the service from the command line, see Watson Quick Start for Node.js.
To create and run a sample Node.js application that works with the service from a web browser, see Developing a Watson application in Node.js. You will need to download and unzip the file that contains the source files for the Node.js sample: qa-nodejs-sample.zip.
To create and run a sample Java application that works with the service from a web browser, see Developing a Watson application in Java. You will need to download and unzip the file that contains the source files for the Java sample: qa-java-sample.zip.
Note: A sample application in Ruby is also available from the
repository in the
watson-developer-cloud namespace on GitHub.
You can download a
.zip file that contains the code and unzip it
on your local machine. If you are familiar with Git, you may instead fork the
repository into your own Git namespace or clone it to your local machine. (See
for more about Git and GitHub and to download Git for your operating system.)
For an introduction to working with Watson Developer Cloud services and Bluemix, see Developing Watson applications with Bluemix. This page provides a language-independent overview of using the Bluemix web interface, the Eclipse IDE, or the Cloud Foundry command-line utility to work with Watson services.
See the following for more information about the Question and Answer service:
Corpora for the Question and Answer service for information about the corpora provided for use with the service.
Understanding the sample application in Java for a high-level overview of the application and its source code in the Java programming language.
Submitting feedback about the service for information about the using the API to submit feedback, including an example in the Node.js programming language.
You may also find the following links of value when working with the Question and Answer service:
Using the Question and Answer API with Node.js and Express provides information about different ways of asking questions. Search for the string WhatsupWatsonapp.
Creating cognitive apps powered by IBM Watson: Getting started with the API provides a technical overview of embedding the service's capabilities in an application.