Extractive QA Fundamentals
What you'll learn: How extractive question answering finds exact answer spans within given text passages without creating any new words.
What Is Extractive QA?
Extractive Question Answering is a task where a model reads a context passage and answers a question by selecting a continuous span of text directly from that passage. Unlike generative approaches that create new sentences, extractive QA operates like a precise highlighter—it identifies the start and end positions of the answer within the source text.
Think of it like taking an open-book exam where you must underline the answer in the textbook rather than write your own explanation. The answer already exists somewhere in the passage; the model's job is to locate it exactly.
How It Works
The model receives two inputs:
- Context: A passage containing information (e.g., "The Eiffel Tower was completed in 1889 in Paris.")
- Question: What you want to know (e.g., "When was the Eiffel Tower completed?")
The model then predicts two things:
- Start position: Where the answer begins in the context (token index)
- End position: Where the answer ends
For our example, it would identify positions corresponding to "1889"—extracting those exact tokens as the answer.
Key Characteristics
- No text generation: The model never creates new words or paraphrases
- Span-based: Answers are always continuous sequences from the context
- Verifiable: You can always trace the answer back to its source
- Limited by context: If the answer isn't explicitly in the passage, the model cannot answer correctly
Key Takeaway: Extractive QA identifies exact answer spans within context passages by predicting start and end positions, never generating new text—making it fast, interpretable, and verifiable.