What extractive QA does
Extractive question answering is given a question and a passage, and returns the span of the passage that answers it. The answer is always a contiguous slice of the provided text.
How the model picks a span
- Encode the question and passage together with a transformer.
- Predict two probabilities per token: how likely it is the start of the answer and the end.
- Choose the start and end pair with the highest combined score, with end not before start.
This turns answering into two classification problems over passage positions.
Handling no answer
Real passages may not contain the answer. Robust systems reserve a special no answer option, so the model can decline rather than force a wrong span.
Evaluation
- Exact match counts predictions that equal the reference answer exactly.
- F1 gives partial credit by overlap of predicted and reference tokens, which is fairer when boundaries differ slightly.
Key idea
Extractive QA predicts a start and end position to select the answer span inside a passage, supports a no answer option, and is scored with exact match and token F1.