Thursday, January 30, 2014

Build an application powered by Watson (Part 5 of 5 Series)

Follow IBM Watson -
Companies can embed Watson’s cognitive capabilities in their application without the need for building deep natural language, machine learning and ranking algorithms or other core technology skills. They could accomplish this by being able to embed the
Watson platform capabilities as a service, through the use of API and tools on the Watson Developer Cloud (WDC). The WDC is a part of the Watson Ecosystem, along with the Watson Content Store (WCS) and the Watson Talent Hub (WTH).

Could Watson be right for you? How to proceed?
The thought process behind embedding Watson starts with asking three simple questions –

1) Is there business value to this Watson powered application? To answer the question you need to evaluate the factors in creating a transformative application or significantly enhancing an existing application, pursuing a sizeable target market in a scalable manner, identifying key value propositions or differentiators, and being able to build a roadmap to revenue and profits.

2) Is there technical alignment between the application and Watson? Find out a good use case to leverage Watson's natural language and cognitive capabilities, using IBM's cloud.

3) Are there business and technical considerations on acquiring or maintaining content? Understand how to get access to usable unstructured content that can be acquired and maintained in a scalable manner. The availability of free or fee-based content in the WCS may also be considered.

In addition to the capabilities that Watson offers, there may be other products in the IBM portfolio that could lend complementary value to the solution, such as analytics, Big Data products or Business Rules systems.

Companies submit a request and follow a methodology to get access the WDC in the Watson Ecosystem. Initially, IBM expects that the ecosystem will start with three verticals – retail, healthcare and travel - but it will follow a “BYOV” (Build your Own Vertical) model – where, with the right content and applications, new verticals can be developed. Once access is obtained to the WDC, the capabilities of the Watson platform can be embedded in an app using tools and an Application Programming Interface (API) in one of two ways –

1. Using a customizable User Interface
A prepackaged IBM hosted user experience could be integrated within the customer application via an HTML inline Frame (iframe). An iframe can place another HTML document in a frame. This frame can be customized to look and feel like the target application.

2. Application Programming Interface (API)
The Watson Question and Answer API (QAAPI) is a Representational State Transfer (REST1) service interface that allows applications to interact with Watson. Using this
API, one can pose questions to Watson, retrieve responses, and submit feedback on those responses. In addition to simple question and responses, Watson can provide transparency into how it reached its conclusions through the REST services. The QAAPI supports JSON as the content-type and accept type.

There are other functions like ingesting content in the Watson platform that will also be exposed as tools and APIs and can be accessed from within an application.

Watson Question and Answer API (QAAPI)

QAAPI enables developers to post questions to Watson and retrieve responses and supporting evidence. The evidence contains supporting information based on the passages in the documents that Watson ingested and may have been trained with.




Watson supports two ways of using the QAAPI – Asynchronous and synchronous mode. With asynchronous mode, Watson also includes URLs for retrieving status and answers. In synchronous mode, there is no link URL.

1) Asynchronous mode:
In the asynchronous mode, the question is posted to Watson and the response returns a link to retrieve the answer when it is ready. The server needs to be polled to check if the question has completed processing. A status field in the response will indicate if the question contains the final answer. This mode can also be used if a bulk set of questions need to be submitted to Watson, with the answers being retrieved later. See the sample request & response headers here.

2) Synchronous mode:
In the synchronous mode, a POST operation sends the question to Watson. The answer is received synchronously. This eliminates the need for a polling logic in the client application. In order to make the request synchronous the following HTTP Header needs to be provided:
X-SyncTimeout : <time in seconds>
If this Header is absent, asynchronous mode is assumed. See the sample request & response headers here.

The <time in seconds> refers to the length of time the service should wait before giving up on a response. Thirty seconds is typically used as the default value. A value of -1 indicates the server should wait indefinitely. The timeout value does not refer to how long the browser or client application should wait, but rather how long processing time on the server should take to answer the question, before it times out.

Follow these examples to learn how to submit questions
and handle responses with the Watson Question and Answer REST service.
The QAAPI uses Basic Authentication over SSL to provide security. During registration to the Watson Developer Cloud, a user ID and password are provided. This user ID and password is used for basic authentication.

Here’s the flow that an application component would use to access Watson Question and Answer capability using the QAAPI. The key steps involved are:
1. Configure parameters, including authentication
2. Post question
3. Receive response
4. Process response


Creating Cognitive applications Powered by Watson
What does it mean for an application partner to embed Watson’s capabilities? How is it done? Let’s take a case of a fictitious company “Think Travel” wants to build an application for consumers: the FictionTravel App. By embedding the capabilities of Watson in the application, FictionTravel can allow a user to imagine, plan, and book a vacation through an interactive conversation, all while staying in the same application.

Think Travel can extend its current capabilities beyond booking flights and hotels by utilizing Watson's cognitive capabilities to improve user experience. Watson could transform how users could book travel by offering an app that gives tailored advice through conversation, similar to a travel agent. It could provide a resource for a user to go through an exploratory phase of their travel options from a centralized location using trusted information. One customer may ask, “I want to take a week-long trip with my family to the beach in early September. Where is the best place to go?” Consequently, Watson will answer and continue the dialogue, providing possible considerations and engaging the user to get to an answer.


While assisting the user with their travel needs, it will learn about the user and provide increasingly contextual responses, helping the user narrow down the location that might be a good fit. Watson can address a myriad of concerns from booking a hotel to visa requirements, all without ever leaving the application. This will create a simple and enjoyable planning process for the user.

Not only is it simple for the user, but also for the developers. The cognitive application is built using capabilities of the Watson platform without the app developers having to acquire a new complex set of technology skills on cognitive systems. App developers are able to completely transform the user experience using Watson's cognitive capabilities and intuitive tools in their application by accessing an API. Separately, the business and domain experts at Think Travel will identify and obtain the content for Watson.

On the back end, Watson is doing the complex processing to sift through thousands of travel documents, country immigration policies, destination information, books, travel guides, user reviews, and more to infer information, interpret user questions and provide meaningful responses throughout the conversation. Learning from customer interactions, it can give the user a seamless travel experience through the FictionTravel app.

 



Overall, Watson is able to do the heavy lifting to provide easy access and high value for developers, customers and the business as a whole. Imagine having an expert travel adviser in your pocket. That is how FictionTravel App, powered by Watson, can positively disrupt customer behavior. Please refer this whitepaper for more details “An Ecosystem Of Innovation – Creating Cognitive Applications Powered By Watson”.

Reference:
Whitepapers –
Videos -

1 comment :