Question Answering
Introduction
This use case demonstrates how deep learning algorithms can be applied to understand the context based on text data, and answer relevant questions.
Video Walkthrough
Problem Description
Most organizations (e.g. Bank) define procedural manuals to help Agents (CSR) to answer the customer’s queries. Queries can range from expecting a factoid answer (e.g. What is the bill generation date?) to a complete procedural solution (e.g. What are the steps to block and replace my credit card?)
- Manual lookup for the answer in a huge set of procedures in a variety of domains is often time-consuming.
- Knowledge transfer about the procedural manuals should happen whenever a CSR agent is replaced.
Using AI (QANet) as a part of the complete solution will help in extracting the factoid answers.
How to setup in platform
This is available as a sample project in Razorthink AI. Follow the steps below to run inference on this model:
- Sample inference file
question-answering-ai.json
is available in Community Space section of the Workspace with the following content:[{ "context": "Eventually, the Licchavi ruler Gunakamadeva merged Koligram and Dakshin Koligram, founding the city of Kathmandu. The city was designed in the shape of Chandrahrasa, the sword of Manjushri. The city was surrounded by eight barracks guarded by Ajimas. One of these barracks is still in use at Bhadrakali (in front of Singha Durbar). The city served as an important transit point in the trade between India and Tibet, leading to tremendous growth in architecture. Descriptions of buildings such as Managriha, Kailaskut Bhawan, and Bhadradiwas Bhawan have been found in the surviving journals of travelers and monks who lived during this era. For example, the famous 7th-century Chinese traveller Xuanzang described Kailaskut Bhawan, the palace of the Licchavi king Amshuverma. The trade route also led to cultural exchange as well. The artistry of the Newar people\u2014the indigenous inhabitants of the Kathmandu Valley\u2014became highly sought after during this era, both within the Valley and throughout the greater Himalayas. Newar artists travelled extensively throughout Asia, creating religious art for their neighbors. For example, Araniko led a group of his compatriot artists through Tibet and China. Bhrikuti, the princess of Nepal who married Tibetan monarch Songts\u00e4n Gampo, was instrumental in introducing Buddhism to Tibet.", "questions": ["Who is Kathmandu's historical founder?", "Who married the Tibetan monarch Songts Gampo?"] }]
- Copy this file to My Space by clicking on the copy button on the right.
- Open the sample project named
QUESTION ANSWERING
and run the pipeline named:Inference Pipeline
. - The result of this inference will be saved in My Space by the following name and content:
question-answering-ai-result.json[{ "context": "Eventually, the Licchavi ruler Gunakamadeva merged Koligram and Dakshin Koligram, founding the city of Kathmandu. The city was designed in the shape of Chandrahrasa, the sword of Manjushri. The city was surrounded by eight barracks guarded by Ajimas. One of these barracks is still in use at Bhadrakali (in front of Singha Durbar). The city served as an important transit point in the trade between India and Tibet, leading to tremendous growth in architecture. Descriptions of buildings such as Managriha, Kailaskut Bhawan, and Bhadradiwas Bhawan have been found in the surviving journals of travelers and monks who lived during this era. For example, the famous 7th-century Chinese traveller Xuanzang described Kailaskut Bhawan, the palace of the Licchavi king Amshuverma. The trade route also led to cultural exchange as well. The artistry of the Newar people\u2014the indigenous inhabitants of the Kathmandu Valley\u2014became highly sought after during this era, both within the Valley and throughout the greater Himalayas. Newar artists travelled extensively throughout Asia, creating religious art for their neighbors. For example, Araniko led a group of his compatriot artists through Tibet and China. Bhrikuti, the princess of Nepal who married Tibetan monarch Songts\u00e4n Gampo, was instrumental in introducing Buddhism to Tibet.", "results": [{ "question": "Who is Kathmandu's historical founder?", "answer": "Gunakamadeva" }, { "question": "Who married the Tibetan monarch Songts Gampo?", "answer": "Bhrikuti" }] }]
- To run inference with your own
context
andquestion
, replacequestion-answering-ai.json
in My Space and re-run the inference pipeline. You can test multiplecontext
-question
pairs by adding multiple objects in the JSON array. The resultant file:question-answering-ai-result.json
will be replaced with the updated inference results. In case the AI is unable to find a relevant answer or the answer to that question is not in the text provided, then theanswer
key corresponding to that question will have an empty value""
.