Question Answering (QA)
An AI task where the model reads a passage or knowledge base and directly answers questions about it, often with a specific cited source.
Question answering (QA) is an AI task where a system receives a question and produces a direct answer, typically by reading and understanding a given passage, document, or knowledge base. It is one of the most practical and widely deployed applications of natural language processing.
Types of question answering
- Extractive QA: The answer is a direct span of text from the source document. The model identifies and extracts the relevant passage. "What year was the company founded?" β "2018" (pulled directly from the document).
- Abstractive QA: The model generates an answer in its own words, synthesising information that may be spread across multiple passages.
- Open-domain QA: The system answers questions from a broad knowledge base or the internet, not a specific document.
- Closed-domain QA: The system answers questions only from a provided context or document.
How modern QA works
Early QA systems used keyword matching and rule-based extraction. Modern systems use transformer-based models that genuinely comprehend the text:
- The question and context are encoded together.
- The model identifies which parts of the context are relevant to the question.
- The answer is extracted or generated based on those relevant parts.
For production applications, QA is often combined with retrieval (RAG). The retrieval step finds relevant documents from a large knowledge base, and the QA model reads those documents to produce an answer.
Business applications
- Internal knowledge bases: Employees ask questions about company policies, procedures, or technical documentation and get instant answers.
- Customer support: Automated systems answer customer questions by reading product documentation and support articles.
- Research: Analysts query large document collections to find specific facts and figures.
- Compliance: Teams quickly find relevant regulatory requirements within lengthy legal texts.
Evaluation metrics
- Exact match: Does the predicted answer exactly match the correct answer?
- F1 score: Measures the overlap between predicted and correct answer tokens.
- Faithfulness: Does the answer accurately reflect the source material without hallucination?
Challenges
- Ambiguous questions that could have multiple valid answers.
- Questions requiring reasoning across multiple documents.
- Maintaining source attribution so users can verify answers.
Why This Matters
Question answering is one of the highest-value AI applications for any organisation with significant documentation. The ability to ask questions in natural language and get accurate, sourced answers saves hours of manual document searching. Understanding QA capabilities helps you design knowledge management systems that your team will actually use.
Related Terms
Continue learning in Essentials
This topic is covered in our lesson: AI for Knowledge Work