Question answering (QA) is one of the principal NLP tasks with machine translation and sentiment analysis. So, if you have come here to master NLP, it's essential to understand Question Answering, the basics at least.
Question answering is very helpful in real life. Systems like Google Search, Amazon Alexa, Apple Siri, and many others are based on the technology that we'll be discussing in this topic.
Overview
QA is a major computer science discipline, like Information retrieval (IR) and NLP. It is concerned with creating systems that can automatically answer users' questions. Two main QA types are closed-domain and open-domain. As you can guess, closed-domain deals with questions from narrow fields (for instance, computer science or physics). Open-domain QA systems can answer almost any question. Theoretically, they can answer a question unrelated to a particular knowledge field — it could be just an existential question, a suggestion, or a plea. Here are some examples:
-
Request: Will you order me a taxi?
-
Suggestion: Let's book a hotel room.
-
Existential: What is the meaning of life?
-
Small talk: Do you like polar bears?
-
Encyclopedic question: What country possessed Saint Helena island in 1855?
Open-domain is the type of system that virtual assistants use. This topic will be dedicated to the general description of QA as a task and discussion of closed-domain systems.
QA systems can be knowledge-based or not. Let's call them raw-text-based, though it's not a widely known term.
In addition, there are common-knowledge QA and logical reasoning QA. We'll be discussing the last one in more detail later.
Classification of QA systems by answer
QA systems can also vary according to their answer (so-called answer criterion):
-
Binary (yes or no);
-
Multi-choice;
-
Extractive;
-
Generative;
-
Retrieval.
Extractive QA implies that the model will search for the answer in knowledge bases or web sources (like Wikipedia) and give a citation from that source as an answer. Generative QA infers that there is a text generation technology behind the QA system. The system processes the knowledge base and then generates an answer.
Here is an example of Chinese GenQA model-generated answers:
The basic procedure
The basic procedure for QA consists of the following modules:
-
Question input and encoding;
-
Document retrieval (checking for relevant articles);
-
Document reading and encoding;
-
Generating an answer (if the system is generative) or giving a citation in the output (if the system is extractive).
There are a lot of QA systems. Some of them may omit a point or, vice-versa, there could be additional ones. For example, a textual closed-domain Question Answering system using a Dynamic Memory Network (DMN) includes the following models:
-
Semantic Memory Module;
-
Input Module;
-
Question Module;
-
Episodic Memory Module;
-
Answer Module.
Applications
These days, QA is applied in search engine technology, so if you ask a rather simple question in Google, it will output an answer. A more typical QA system is Wolfram Alpha. While Google is more like a generative QA system, Wolfram Alpha is a classical Extractive one. Like most QA systems, it's based on Wikipedia. Here is a Wolfram Alpha's example answer:
QA system can be applied to what is known as a virtual assistant system. The most famous virtual assistants are Alexa (USA), Siri (USA), Duer (China), Viv (South Korea), Alisa (Russia), and Evi (UK). Many are integrated into devices like smartphones, smart TVs, smart speakers, etc. For example, Amazon's Alexa is available on Amazon Echo (smart speakers), and Google Assistant is integrated into Android-based smartphones, tabs, and TVs.
QA can also be applied to fact-checking systems, which are getting popular today, though not all fact-checking systems work correctly. QA is often integrated into a technical support system and customer service (or generally, chatbots), generating reports and market research.
The technology of QA is also crucial in ordinary chatbots. Chatbots are built to chat with a real human, but any dialogue is based (in most cases) on a question and an answer. So, a good chatbot should be skilled enough to answer any question: either a chit-chat one like "What's your favorite ice cream?" (which is absurd since a chatbot cannot eat ice cream) or some narrow-field and professional questions. The most famous chatbot these days is certainly ChatGPT from OpenAI.
Conclusion
In this topic, we started learning about the basic theory behind Question Answering systems. We've discussed the most typical approaches to QA and where they could be applied. We will return to Question Answering later. In future topics, we'll talk about knowledge-based systems, Open/Closed-domain systems, Logical Reasoning QA, and so on.