Question Answering (QA)
Also known as: QA, machine reading comprehension, Soru Cevaplama (Question Answering)
Question answering is a natural-language-processing task that automatically answers natural-language questions grounded in a given context passage, using either extractive or generative approaches. The task was crystallised by the SQuAD benchmark of Rajpurkar et al. (2016), and later models such as XLNet (Yang et al., 2019) pushed reading-comprehension accuracy higher.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Question answering fits when you have text questions to answer and a context passage that is expected to contain those answers. It suits exploratory and descriptive work over textual data, and benefits from a modest set of examples to test against. A domain-specific model is worth using when the text is specialised. Without a context passage the method has nothing to read, and a general model on niche terminology will underperform.
Strengths & limitations
- Grounds answers in a supplied context passage rather than free-floating generation, keeping responses traceable to source text.
- Supports both extractive answers — exact spans copied from the text — and generative answers written in natural language.
- Domain-specific models can be slotted in to raise accuracy on specialised material without changing the overall pipeline.
- Requires a relevant context passage; with no context to read, the method cannot answer reliably.
- A general-purpose model gives lower accuracy on domain-specific text than a model tuned for that domain.
- Quality depends on how well the answer is actually contained in, and phrased within, the provided passage.
Frequently asked
What is the difference between extractive and generative question answering?
An extractive approach finds and returns the exact span of text in the context that answers the question. A generative approach writes an answer in its own words, conditioned on the question and context. Extractive answers stay verbatim and are easy to score against the source; generative answers read more naturally but can drift from the passage.
Do I always need a context passage?
In this method, yes. The system answers based on a supplied context that is assumed to contain the answer. Without a relevant passage to read, the model has nothing to ground its answer in and reliability drops sharply.
Should I use a domain-specific model?
If your text is specialised, a domain-specific model gives higher accuracy than a general-purpose one, because it encodes the terminology more faithfully. For general text, a general model is usually adequate.
How is question-answering accuracy measured?
Predicted answers are compared with reference answers using measures such as exact match and F1, typically on a benchmark like SQuAD. Inspecting failure cases alongside these scores reveals systematic weaknesses before deployment.
Sources
- Rajpurkar, P. et al. (2016). SQuAD: 100,000+ Questions for Machine Comprehension of Text. EMNLP. DOI: 10.18653/v1/D16-1264 ↗
- Yang, Z. et al. (2019). XLNet: Generalized Autoregressive Pretraining for Language Understanding. NeurIPS. link ↗
How to cite this page
ScholarGate. (2026, June 1). Question Answering (QA). ScholarGate. https://scholargate.app/en/text-mining/question-answering
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Machine TranslationText mining↔ compare
- Named Entity RecognitionText mining↔ compare
- Sentiment AnalysisText mining↔ compare
- Text ClassificationText mining↔ compare