Skip to content
Novus Examples
json2.2 KB

Extractive QA Dataset — SQuAD v2 Format (JSON)

An extractive question-answering dataset in the SQuAD v2.0 JSON structure — titled articles with context paragraphs, questions, character-offset answers, and one deliberately unanswerable question. Synthetic content; a fixture for QA model training and SQuAD-format loaders.

Preview — first 50 linesjson
{
  "version": "v2.0",
  "data": [
    {
      "title": "Natural Processes",
      "paragraphs": [
        {
          "context": "The water cycle describes how water moves through the environment. Evaporation turns liquid water into vapour, which rises and cools to form clouds through condensation. Precipitation then returns the water to the surface as rain or snow.",
          "qas": [
            {
              "id": "wc-001",
              "question": "What turns liquid water into vapour?",
              "answers": [
                {
                  "text": "Evaporation",
                  "answer_start": 67
                }
              ],
              "is_impossible": false
            },
            {
              "id": "wc-002",
              "question": "What process forms clouds?",
              "answers": [
                {
                  "text": "condensation",
                  "answer_start": 156
                }
              ],
              "is_impossible": false
            },
            {
              "id": "wc-003",
              "question": "Which ocean current is mentioned?",
              "answers": [],
              "is_impossible": true
            }
          ]
        },
        {
          "context": "Photosynthesis allows plants to make food. Using sunlight, chlorophyll in the leaves converts carbon dioxide and water into glucose, releasing oxygen as a by-product.",
          "qas": [
            {
              "id": "ps-001",
              "question": "What do plants release as a by-product?",
              "answers": [
                {
                  "text": "oxygen",
                  "answer_start": 143
                }
71 lines total — download for the full file.

Specifications

Version
v2.0
Questions
5
Has Impossible
true
Task
extractive question answering

What is a .json file?

JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.

How to use this file

Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.

Code examples

import json

with open("qa-squad.json") as f:
    data = json.load(f)
print(type(data), len(data))

Generated by generation/ai_datasets.py. Free for any use, no attribution required — license.