SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1809.08887 · 2018

Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1809.08887.json · badge: /api/ran/1809.08887.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
taoyds/spider canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
saparina/text2sql-nlvariation extension (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
ML-KULeuven/deepstochlog-lm extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
build_prompt Ran
ran; our contract draft was wrong, not the code
ML-KULeuven/deepstochlog-lm/src/task2/task2.py
code served (permissive licence) · get_code("abcf216a0f054de7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function expects:
# - inputs: a list where inputs[0] is a string, and may have additional elements
# - name: a string indicating which type of prompt to build
# - domain: optional, can be a dict or list depending on the name

# Let's test with a 'switcher' case first
inputs_switcher = ['Question about SQL:', 0]
name_switcher = 'select_switcher'
domain_switcher = None

# Let's also prepare for a 'col_picker' case which uses domain as a dict
# For col_picker: inputs[1] and inputs[2] are concatenated to form a key
# inputs[3] is an integer indicating the SQL clause type
# domain should be a dict where keys are concatenations of inputs[1] and inputs[2]
# and values are lists of column names

inputs_col_picker = ['Question about SQL:', 'table1', 'col', 0]
name_col_picker = 'col_picker'
domain_col_picker = {
    'table1col': ['column1', 'column2', 'column3']
}

# Let's also prepare for a 'tab_picker' case
# For tab_picker: inputs[1] is an integer indicating the SQL clause type
# domain should be a list of table names (ref is None, so domain is used directly)

inputs_tab_picker = ['Question about SQL:', 0]
name_tab_picker = 'tab_picker'
domain_tab_picker = ['table1', 'table2', 'table3']

# Let's also test op_switcher which uses inputs[1]
inputs_op_switcher = ['Question about SQL:', 0]
name_op_switcher = 'op_switcher'
domain_op_switcher = None

# Use one of the test cases for ARGS
ARGS = {
    'inputs': inputs_switcher,
    'name': name_switcher,
    'domain': domain_switcher
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
condition_has_like Ran
ran, violated the contract we drafted
taoyds/spider/evaluation.py
code served (permissive licence) · get_code("8231e3fdffa9c8ee")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

WHERE_OPS = ('not', 'between', '=', '>', '<', '>=', '<=', '!=', 'in', 'like', 'is', 'exists')

# The function expects conds to be a list where every other element (starting at 0, i.e., conds[::2])
# is a cond_unit. Each cond_unit must be indexable with [1] to get an operation index.
# The operation index should be an integer that can be checked against WHERE_OPS.index('like').

# WHERE_OPS.index('like') = 9

# Create a valid conds structure
# conds[::2] gives us every other element starting from index 0
# Each cond_unit needs to be a sequence where cond_unit[1] is an integer representing the operation

# Example: conds with 4 elements, so conds[::2] will give us elements at indices 0 and 2
# Each cond_unit can be a tuple/list like (col_id, op_id, value)

conds = [
    (0, 2, 'value1'),  # index 0: operation '=' (index 2)
    'separator',        # index 1: some separator (not accessed by [::2])
    (1, 9, 'pattern'), # index 2: operation 'like' (index 9)
    'separator'         # index 3: another separator (not accessed by [::2])
]

ARGS = {'conds': conds}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
condition_has_or Ran
ran, violated the contract we drafted
taoyds/spider/evaluation.py
code served (permissive licence) · get_code("f2d76234528d3b57")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# The function checks if 'or' is in conds[1::2], which means it's looking at every other element starting from index 1
# This suggests conds is a list where odd indices might contain operators like 'or', 'and', etc.
# A typical structure would be: [condition1, 'or', condition2, 'and', condition3, ...]

# Example 1: conds with 'or' in odd positions
conds_with_or = ['condition1', 'or', 'condition2', 'and', 'condition3']

# Example 2: conds without 'or' in odd positions
conds_without_or = ['condition1', 'and', 'condition2', 'and', 'condition3']

# We'll use the first example as the argument
ARGS = {
    'conds': conds_with_or
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
condition_has_sql Ran
ran, violated the contract we drafted
taoyds/spider/evaluation.py
code served (permissive licence) · get_code("954c76e256cc7220")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# The function checks if any condition unit in conds (at even indices) 
# has val1 (index 3) or val2 (index 4) that is a dict.
# conds is a list where every other element (starting at 0) is a cond_unit
# Each cond_unit must be indexable with indices 3 and 4

# Case 1: conds with no SQL (no dicts in positions 3 or 4)
conds_no_sql = [
    [0, 1, 2, None, None],  # cond_unit at index 0
    "separator",             # odd index (skipped)
    [0, 1, 2, "value", 5],  # cond_unit at index 2
    "separator",             # odd index (skipped)
]

# Case 2: conds with SQL (dict in position 3)
conds_with_sql_val1 = [
    [0, 1, 2, {"nested": "sql"}, None],  # cond_unit with dict at index 3
    "separator",
]

# Case 3: conds with SQL (dict in position 4)
conds_with_sql_val2 = [
    [0, 1, 2, None, {"nested": "query"}],  # cond_unit with dict at index 4
]

# Use one of these for the test
ARGS = {
    "conds": conds_with_sql_val1
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_domain Ran
ran; our contract draft was wrong, not the code
ML-KULeuven/deepstochlog-lm/src/task2/task2.py
code served (permissive licence) · get_code("487252da3c521e4a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import json
import tempfile

# Create a temporary directory and schema file
temp_dir = tempfile.mkdtemp()
os.makedirs(os.path.join(temp_dir, 'src', 'task2'), exist_ok=True)
schema_path = os.path.join(temp_dir, 'src', 'task2', 'schema_task2.json')

# Create a mock schema structure
mock_schema = {
    "test_db": """tables: ['users', 'orders', 'products']
foreign_tables: ['orders', 'products']
columns: ['id', 'name', 'email', 'created_at']
table('test_db', 'users', ['id', 'name', 'email'])
table('test_db', 'orders', ['order_id', 'user_id', 'product_id'])
table('test_db', 'products', ['product_id', 'product_name', 'price'])
table_foreign('test_db', 'users', ['orders', 'products'])
table_foreign('test_db', 'orders', ['users', 'products'])
foreign_key('users', 'orders', 'id', 'user_id')
foreign_key('orders', 'products', 'product_id', 'product_id')"""
}

# Write the schema to file
with open(schema_path, 'w') as f:
    json.dump(mock_schema, f)

# Change to temp directory so relative path works
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'db': 'test_db',
    'type': 'tables',
    'tables': ['users', 'orders'],
    'context_sensitive': True
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
natsql_idx_to_table2_idx Ran
ran, honoured the contract we drafted
saparina/text2sql-nlvariation/RESDSQL/NatSQL/natsql2sql/natsql2sql.py
pointer only (licence: CC-BY-SA-4.0) · get_code("b0825d653a089615")
How it ran

The body of this sample is withheld: CC-BY-SA-4.0, as GitHub detects it on this paper's repository, saparina/text2sql-nlvariation, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

reversed_link_back_col Ran
ran, honoured the contract we drafted
saparina/text2sql-nlvariation/RESDSQL/NatSQL/natsql2sql/natsql2sql.py
pointer only (licence: CC-BY-SA-4.0) · get_code("48b57e02e3f2c83d")
How it ran

The body of this sample is withheld: CC-BY-SA-4.0, as GitHub detects it on this paper's repository, saparina/text2sql-nlvariation, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_relation Not yet run
unverified (harvested, no recorded run)
saparina/text2sql-nlvariation/RESDSQL/NatSQL/natsql2sql/natsql2sql.py
pointer only (licence: CC-BY-SA-4.0) · get_code("14ad4335d565ea1d")
How it ran

The body of this sample is withheld: CC-BY-SA-4.0, as GitHub detects it on this paper's repository, saparina/text2sql-nlvariation, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 8 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
condition_has_like 14 other papers
14 later
1906.02285 (2019-06)
SParC: Cross-Domain Semantic Parsing in Context
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
2010.02840 (2020-10)
Semantic Evaluation for Text-to-SQL with Distilled Test Suites
and 11 more not named here
condition_has_or 14 other papers
14 later
1906.02285 (2019-06)
SParC: Cross-Domain Semantic Parsing in Context
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
2010.02840 (2020-10)
Semantic Evaluation for Text-to-SQL with Distilled Test Suites
and 11 more not named here
condition_has_sql 11 other papers
11 later
1906.02285 (2019-06)
SParC: Cross-Domain Semantic Parsing in Context
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
2010.02840 (2020-10)
Semantic Evaluation for Text-to-SQL with Distilled Test Suites
and 8 more not named here
build_prompt 2 other papers
2 later
2106.12574 (2021-06)
DeepStochLog: Neural Stochastic Logic Programming
2503.13342 (2025-03)
Valid Text-to-SQL Generation with Unification-based DeepStochLog
check_relation 2 other papers
2 later
2109.05153 (2021-09)
Natural SQL: Making SQL Easier to Infer from Natural Language Specifications
2607.10911 (2026-07)
The Nuts and Bolts of Natural Language to SQL Translation: A Systematic Analysis of Model Pipeline Optimisation Approaches and their Interactions
get_domain 2 other papers
2 later
2106.12574 (2021-06)
DeepStochLog: Neural Stochastic Logic Programming
2503.13342 (2025-03)
Valid Text-to-SQL Generation with Unification-based DeepStochLog
natsql_idx_to_table2_idx 2 other papers
2 later
2109.05153 (2021-09)
Natural SQL: Making SQL Easier to Infer from Natural Language Specifications
2607.10911 (2026-07)
The Nuts and Bolts of Natural Language to SQL Translation: A Systematic Analysis of Model Pipeline Optimisation Approaches and their Interactions
reversed_link_back_col 2 other papers
2 later
2109.05153 (2021-09)
Natural SQL: Making SQL Easier to Infer from Natural Language Specifications
2607.10911 (2026-07)
The Nuts and Bolts of Natural Language to SQL Translation: A Systematic Analysis of Model Pipeline Optimisation Approaches and their Interactions

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We present Spider, a large-scale, complex and cross-domain semantic parsing and text-to-SQL dataset annotated by 11 college students. It consists of 10,181 questions and 5,693 unique complex SQL queries on 200 databases with multiple tables, covering 138 different domains. We define a new complex and cross-domain semantic parsing and text-to-SQL task where different complex SQL queries and databases appear in train and test sets. In this way, the task requires the model to generalize well to both new SQL queries and new database schemas. Spider is distinct from most of the previous semantic parsing tasks because they all use a single database and the exact same programs in the train set and the test set. We experiment with various state-of-the-art models and the best model achieves only 12.4% exact matching accuracy on a database split setting. This shows that Spider presents a strong challenge for future research. Our dataset and task are publicly available at https://yale-lily.github.io/spider

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1809.08887")
get_code_for_paper("1809.08887")
have("1809.08887")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1809.08887.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1809.08887.svg)](https://syntology.ai/paper/1809.08887)

Connect an agent — have() is free.