SQuAD (2016) › The Solution
History of Language AIAll chapters SQuAD (2016) › The SolutionOne section · Sections in this chapter3 / 7 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
SQuAD addressed these fundamental problems by creating a large-scale reading comprehension dataset that required models to interpret natural language text. The dataset consisted of over 100,000 question-answer pairs created by human annotators reading Wikipedia articles and writing questions that could be answered from the passage text. This approach ensured that the questions were realistic, the passages were diverse, and the task tested comprehension.
The core design of SQuAD was elegant and effective. Annotators were given a paragraph from a Wikipedia article and asked to write questions about the paragraph, with answers that were spans of text from the paragraph itself. This span-based answer format made the task concrete and well-defined: systems needed to identify which portion of the passage answered each question, not generate free-form responses. This design choice had several important advantages.
First, span-based answers created a clear evaluation metric. Instead of trying to judge whether a generated answer was semantically equivalent to the reference answer, evaluators could simply check whether the predicted span matched the ground truth span. This exact match criterion, while strict, provided an objective and reproducible way to measure performance. The dataset also included F1 scores that measured token-level overlap. This provided a softer metric that could account for minor variations in span boundaries.
Second, the span-based format forced systems to ground their answers in the source text. Unlike systems that might generate plausible-sounding answers without consulting the passage, SQuAD required models to identify text spans copied from it. This design ensured that successful systems would need to understand the relationship between questions and passages, not just generate answers from general knowledge.
The annotation process itself was carefully designed to ensure quality and diversity. Multiple annotators could write questions about the same passage, creating multiple question-answer pairs per passage and increasing the dataset size. Annotators were encouraged to write different types of questions, from simple factual questions to those requiring inference or reasoning. The resulting dataset included a rich variety of question types, answer lengths, and passage topics, giving models a broad test of reading comprehension capabilities.
SQuAD version 1.1, released shortly after the initial version, refined the dataset and removed some ambiguity in the original annotation process. The dataset structure included a passage, a list of questions about that passage, and for each question, the answer text and the character indices of the answer span within the passage. This structure made it straightforward to train and evaluate systems, while the standardized format enabled fair comparisons across different approaches.
The evaluation methodology introduced with SQuAD also became important. Two metrics became standard: exact match (EM), which measured whether the predicted answer span exactly matched the ground truth span, and F1 score, which measured token-level overlap between predicted and ground truth answers. The F1 metric was particularly valuable because it provided partial credit when answers were close but not exactly right, recognizing that slightly different span boundaries might still represent correct understanding.
The dataset was split into training and development sets, with the answers for the development set initially hidden to enable fair evaluation. This setup allowed researchers to develop systems on the training set and then evaluate them on a held-out development set. This provided an unbiased measure of performance. The SQuAD team also organized a leaderboard where researchers could submit their systems and compare results, creating healthy competition that drove rapid progress.