SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.08891 · 2023

Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generation

arXiv · PDF · Open in the Atlas

Code that ran

14 of 18 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; 1 honoured the contract we drafted, 3 violated it and 7 have no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/2306.08891.json · badge: /api/ran/2306.08891.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
ruc-datalab/zeronl2sql canonical (classifier label)
classifier basis: census
14 ran · 4 no recorded run
FunctionStatusWhere it lives
convert_fk_index Ran
ran, honoured the contract we drafted
ruc-datalab/zeronl2sql/src/utils/get_tables.py
code served (permissive licence) · get_code("64dd3849a251a1bf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family int; 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 torch
import numpy as np

# Construct valid arguments for convert_fk_index
data = {
    'foreign_keys': [
        # Each foreign key is a tuple of ((table_name, column_name), (ref_table_name, ref_column_name))
        (('users', 'department_id'), ('departments', 'id')),
        (('orders', 'user_id'), ('users', 'id')),
    ],
    'table_names_original': ['users', 'departments', 'orders'],
    'column_names_original': [
        # Each entry is (table_id, column_name)
        (0, 'id'),
        (0, 'name'),
        (0, 'department_id'),
        (1, 'id'),
        (1, 'dept_name'),
        (2, 'id'),
        (2, 'user_id'),
        (2, 'amount'),
    ],
}

ARGS = {
    'data': data,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — 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
dump_db_json_schema Ran
ran on a synthesized input
ruc-datalab/zeronl2sql/src/utils/get_tables.py
code served (permissive licence) · get_code("427de7d5976d4ed4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. 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 sqlite3
import tempfile
import os

# Create a temporary SQLite database for testing
temp_db = tempfile.NamedTemporaryFile(delete=False, suffix='.db')
temp_db_path = temp_db.name
temp_db.close()

# Set up the database with tables and columns
conn = sqlite3.connect(temp_db_path)
conn.execute('pragma foreign_keys=ON')

# Create a simple table with various column types
conn.execute('''
    CREATE TABLE users (
        user_id INTEGER PRIMARY KEY,
        name TEXT NOT NULL,
        email VARCHAR(100),
        age INTEGER,
        created_at DATE,
        is_active BOOLEAN
    )
''')

# Create another table with a foreign key
conn.execute('''
    CREATE TABLE orders (
        order_id INTEGER PRIMARY KEY,
        user_id INTEGER,
        order_date DATETIME,
        total REAL,
        FOREIGN KEY (user_id) REFERENCES users(user_id)
    )
''')

conn.commit()
conn.close()

# Define the arguments dictionary
ARGS = {
    'db': temp_db_path,
    'f': 'test_db'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
execute Ran
ran on a synthesized input
ruc-datalab/zeronl2sql/LLM_text2sql.py
code served (permissive licence) · get_code("c7c413b7001d6846")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. 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 sqlite3
import tempfile
import os

# Create a temporary database file
temp_db = tempfile.NamedTemporaryFile(delete=False, suffix='.db')
db_path = temp_db.name
temp_db.close()

# Initialize the database with a simple table and data
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
cursor.execute('CREATE TABLE test_table (id INTEGER PRIMARY KEY, name TEXT, value INTEGER)')
cursor.execute('INSERT INTO test_table (name, value) VALUES (?, ?)', ('Alice', 42))
cursor.execute('INSERT INTO test_table (name, value) VALUES (?, ?)', ('Bob', 100))
conn.commit()
conn.close()

# Define valid SQL query
sql = 'SELECT * FROM test_table'

ARGS = {
    'sql': sql,
    'db': db_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 tuple — a tuple output has no array shape of its own; none is 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
find_invalid_functions Ran
ran on a synthesized input
ruc-datalab/zeronl2sql/LLM_text2sql.py
code served (permissive licence) · get_code("776b03fe5995312f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) 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 re

def find_invalid_functions(sql):
    pattern = '[A-Z]+\\(.*\\)'
    valid_funcs = ['AVG', 'MAX', 'SUM', 'COUNT', 'MIN']
    Q = re.findall(pattern=pattern, string=sql)
    funcs = []
    while Q:
        cur = Q.pop(0)
        left = 0
        while cur[left] != '(':
            left += 1
        if cur[:left] not in valid_funcs:
            funcs.append(cur[:left])
        Q.extend(re.findall(pattern=pattern, string=cur[left + 1:-1]))
    return funcs


# Test setup
sql_simple = "SELECT AVG(salary) FROM employees"
sql_with_invalid = "SELECT INVALID_FUNC(AVG(salary)) FROM employees"
sql_nested = "SELECT MAX(COUNT(id)) FROM table1"
sql_mixed = "SELECT CUSTOM_FUNC(MAX(price)), AVG(quantity), WEIRD_FUNC(MIN(value)) FROM orders"

ARGS = {
    "sql": sql_mixed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
get_schema Ran
ran; our contract draft was wrong, not the code
ruc-datalab/zeronl2sql/get_colval_map.py
code served (permissive licence) · get_code("0992d2a47ae733fa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. 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 sqlite3
import tempfile
import os

# Create a temporary SQLite database with some test tables
temp_dir = tempfile.mkdtemp()
db_path = os.path.join(temp_dir, "test.db")

conn = sqlite3.connect(db_path)
cursor = conn.cursor()

# Create a sample table
cursor.execute("""
    CREATE TABLE users (
        id INTEGER PRIMARY KEY,
        name TEXT,
        email TEXT
    )
""")

# Create another sample table
cursor.execute("""
    CREATE TABLE products (
        id INTEGER PRIMARY KEY,
        title TEXT,
        price REAL,
        stock INTEGER
    )
""")

conn.commit()
conn.close()

ARGS = {
    "db": db_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_schema_from_json Ran
ran; our contract draft was wrong, not the code
ruc-datalab/zeronl2sql/get_colval_map.py
pointer only (licence: MIT); the stored copy get_code serves, from ygan/NatSQL, is pointer only (licence: NONE) · get_code("c4dcaf29b663a364")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ygan/NatSQL, and GitHub detected no licence in that repository when it was checked. 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.

get_structure Ran
ran on a synthesized input
ruc-datalab/zeronl2sql/src/utils/get_data.py
code served (permissive licence) · get_code("8c9c208c466794b2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) 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.

# Construct a valid SQL dictionary that satisfies the function's requirements

sql = {
    'where': [],  # len() check - empty list
    'groupBy': [],  # len() check - empty list
    'having': [],  # len() check - empty list
    'orderBy': [],  # len() check - empty list
    'limit': None,  # None check
    'intersect': None,  # None check
    'union': None,  # None check
    'except': None,  # None check
}

ARGS = {
    'sql': sql
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
is_commonword Ran
ran, violated the contract we drafted
ruc-datalab/zeronl2sql/src/utils/bridge_content_encoder.py
code served (permissive licence) · get_code("b724cc2d4066a429")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) 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 torch.nn as nn

torch.manual_seed(0)

# The function is_commonword takes a single string parameter 's'
# and checks if its stripped version is in the _commonwords set
# No complex objects needed - just a simple string

ARGS = {
    's': 'yes'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
is_number Ran
ran, violated the contract we drafted
ruc-datalab/zeronl2sql/src/utils/bridge_content_encoder.py
code served (permissive licence) · get_code("f39fdc1ce6cffe08")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) 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

torch.manual_seed(0)

# The function is_number takes a single string parameter 's'
# It tries to convert the string to a float after removing commas
# We need to provide valid test cases

ARGS = {
    "s": "123.45"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
is_stopword Ran
ran, violated the contract we drafted
ruc-datalab/zeronl2sql/src/utils/bridge_content_encoder.py
code served (permissive licence) · get_code("d56a1f9221823a48")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) 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 is_stopword takes a single parameter: s (a string)
# It checks if s.strip() is in the _stopwords set
# So we need to provide a string argument

ARGS = {
    "s": "hello"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
linear_act Ran
ran on a synthesized input
ruc-datalab/zeronl2sql/src/utils/aligner.py
code served (permissive licence) · get_code("3aff0fef02654e1a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) 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

torch.manual_seed(0)

# linear_act simply returns its input x
# x should be a tensor
x = torch.randn(2, 4)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
normalize Ran
ran; our contract draft was wrong, not the code
ruc-datalab/zeronl2sql/src/utils/dataset.py
code served (permissive licence) · get_code("448eab4c7249a72c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) 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 re

def normalize(query: str) -> str:

    def comma_fix(s):
        return s.replace(' , ', ', ')

    def white_space_fix(s):
        return ' '.join(s.split())

    def lower(s):
        return re.sub('\\b(?<![\'\\"])(\\w+)(?![\'\\"])\\b', lambda match: match.group(1).lower(), s)
    return comma_fix(white_space_fix(lower(query)))

# The function takes a single string parameter and performs text normalization
# Test with a sample query that has mixed case, extra spaces, and spacing around commas
ARGS = {
    "query": "Hello  WORLD , this IS a Test"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
normalize Ran
ran on a synthesized input
ruc-datalab/zeronl2sql/LLM_text2sql.py
code served (permissive licence) · get_code("18ff3872881607ac")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) 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.

# Setup code for normalize function

ARGS = {
    'sql': 'SELECT * FROM users WHERE id = 1'
}

# Additional test cases that could be used
test_cases = [
    'SELECT * FROM table',
    '\n\nSELECT col1, col2\nFROM table\n',
    'some text\n\nSELECT * FROM users',
    '```\nSELECT * FROM data\n```',
    'query with  multiple   spaces',
    'SELECT id <> 5 FROM table'
]
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
serialize_schema Ran
ran on a synthesized input
ruc-datalab/zeronl2sql/src/utils/dataset.py
code served (permissive licence) · get_code("8687d376b1d5b594")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) 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 os
import tempfile
import sqlite3

# Create a temporary directory and SQLite database for testing
temp_dir = tempfile.mkdtemp()
db_id = "test_db"
db_dir = os.path.join(temp_dir, db_id)
os.makedirs(db_dir, exist_ok=True)
db_path_file = os.path.join(db_dir, f"{db_id}.sqlite")

# Create a minimal SQLite database
conn = sqlite3.connect(db_path_file)
cursor = conn.cursor()

# Create two tables with a foreign key relationship
cursor.execute("""
    CREATE TABLE users (
        id INTEGER PRIMARY KEY,
        name TEXT,
        email TEXT
    )
""")

cursor.execute("""
    CREATE TABLE orders (
        id INTEGER PRIMARY KEY,
        user_id INTEGER,
        amount REAL,
        FOREIGN KEY(user_id) REFERENCES users(id)
    )
""")

# Insert some sample data
cursor.execute("INSERT INTO users (id, name, email) VALUES (1, 'Alice', 'alice@example.com')")
cursor.execute("INSERT INTO users (id, name, email) VALUES (2, 'Bob', 'bob@example.com')")
cursor.execute("INSERT INTO orders (id, user_id, amount) VALUES (1, 1, 100.0)")
cursor.execute("INSERT INTO orders (id, user_id, amount) VALUES (2, 2, 200.0)")

conn.commit()
conn.close()

# Define mock function for get_database_matches (used in the function)
def get_database_matches(question, table_name, column_name, db_path):
    return [], "text"

# Define mock function for dump_db_json_schema (used in the function)
def dump_db_json_schema(db, f):
    return {
        "foreign_keys": [
            [("orders", "user_id"), ("users", "id")]
        ]
    }

# Monkey patch these functions into the module scope
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'get_database_matches', get_database_matches)
setattr(current_module, 'dump_db_json_schema', dump_db_json_schema)

# Construct the arguments
ARGS = {
    "question": "What are the names of users who placed orders?",
    "db_path": temp_dir,
    "db_id": db_id,
    "db_column_names": {
        "table_id": [0, 0, 0, 1, 1, 1],
        "column_name": ["id", "name", "email", "id", "user_id", "amount"]
    },
    "db_table_names": ["users", "orders"],
    "db_foreign_keys": {
        "column_id": [4],
        "other_column_id": [0]
    },
    "dataset": "spider"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
gelu_new Not yet run
unverified (harvested, no recorded run)
ruc-datalab/zeronl2sql/src/utils/aligner.py
code served (permissive licence) · get_code("227f586d79c9675d")
How it ran

no invocation recorded.

gelu_python Not yet run
unverified (harvested, no recorded run)
ruc-datalab/zeronl2sql/src/utils/aligner.py
code served (permissive licence) · get_code("f41cf0378a1399d0")
How it ran

no invocation recorded.

prepare_splits Not yet run
unverified (harvested, no recorded run)
ruc-datalab/zeronl2sql/src/utils/dataset.py
code served (permissive licence) · get_code("8f6f7abc62958716")
How it ran

no invocation recorded.

tokenize Not yet run
unverified (harvested, no recorded run)
ruc-datalab/zeronl2sql/get_colval_map.py
code served (permissive licence) · get_code("2d9b155996a531f8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 10 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 9 later) and 8 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
gelu_new 24 other papers
13 dated earlier, 11 later
2004.10964 (2020-04)
Don't Stop Pretraining: Adapt Language Models to Domains and Tasks
2104.08066 (2021-04)
Effect of Visual Extensions on Natural Language Understanding in Vision-and-Language Models
2104.08400 (2021-04)
Structure-Aware Abstractive Conversation Summarization via Discourse and Action Graphs
and 21 more not named here
get_schema_from_json 13 other papers
5 dated earlier, 8 later
1911.04942 (2019-11)
RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
2106.01093 (2021-06)
LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations
and 10 more not named here
get_schema 11 other papers
5 dated earlier, 6 later
1911.04942 (2019-11)
RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
2106.01093 (2021-06)
LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations
and 8 more not named here
is_commonword 5 other papers
2 dated earlier, 3 later
2109.05093 (2021-09)
PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models
2212.09741 (2022-12)
One Embedder, Any Task: Instruction-Finetuned Text Embeddings
2310.13659 (2023-10)
Benchmarking and Improving Text-to-SQL Generation under Ambiguity
and 2 more not named here
is_number 5 other papers
2 dated earlier, 3 later
2109.05093 (2021-09)
PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models
2212.09741 (2022-12)
One Embedder, Any Task: Instruction-Finetuned Text Embeddings
2310.13659 (2023-10)
Benchmarking and Improving Text-to-SQL Generation under Ambiguity
and 2 more not named here
is_stopword 5 other papers
2 dated earlier, 3 later
2109.05093 (2021-09)
PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models
2212.09741 (2022-12)
One Embedder, Any Task: Instruction-Finetuned Text Embeddings
2310.13659 (2023-10)
Benchmarking and Improving Text-to-SQL Generation under Ambiguity
and 2 more not named here
gelu_python 3 other papers
2 dated earlier, 1 later
2202.00666 (2022-02)
Locally Typical Sampling
2211.02816 (2022-11)
PASTA: Table-Operations Aware Fact Verification via Sentence-Table Cloze Pre-training
2410.05748 (2024-10)
Label Confidence Weighted Learning for Target-level Sentence Simplification
convert_fk_index 2 other papers
2 later
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
2025.emnlp-main.178 (2025 (year only))
Dialect-SQL: An Adaptive Framework for Bridging the Dialect Gap in Text-to-SQL
normalize 2 other papers
1 dated earlier, 1 later
2109.05093 (2021-09)
PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
linear_act 1 other paper
1 dated earlier
2211.02816 (2022-11)
PASTA: Table-Operations Aware Fact Verification via Sentence-Table Cloze Pre-training

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-23.

Repositories linked to this paper

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

Abstract

Zero-shot NL2SQL is crucial in achieving natural language to SQL that is adaptive to new environments (e.g., new databases, new linguistic phenomena or SQL structures) with zero annotated NL2SQL samples from such environments. Existing approaches either fine-tune pre-trained language models (PLMs) based on annotated data or use prompts to guide fixed large language models (LLMs) such as ChatGPT. PLMs can perform well in schema alignment but struggle to achieve complex reasoning, while LLMs is superior in complex reasoning tasks but cannot achieve precise schema alignment. In this paper, we propose a ZeroNL2SQL framework that combines the complementary advantages of PLMs and LLMs for supporting zero-shot NL2SQL. ZeroNL2SQL first uses PLMs to generate an SQL sketch via schema alignment, then uses LLMs to fill the missing information via complex reasoning. Moreover, in order to better align the generated SQL queries with values in the given database instances, we design a predicate calibration method to guide the LLM in completing the SQL sketches based on the database instances and select the optimal SQL query via an execution-based strategy. Comprehensive experiments show that ZeroNL2SQL can achieve the best zero-shot NL2SQL performance on real-world benchmarks. Specifically, ZeroNL2SQL outperforms the state-of-the-art PLM-based methods by 3.2% to 13% and exceeds LLM-based methods by 10% to 20% on execution accuracy.

For agents

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

get_harvested_code_for_paper("2306.08891")
get_code_for_paper("2306.08891")
have("2306.08891")

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

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

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

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

Connect an agent — have() is free.