SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.13659 · EMNLP · 2023

Benchmarking and Improving Text-to-SQL Generation under Ambiguity

Sunita Sarawagi, Adithya Bhaskar, Ashutosh Sathe, Tushar Tomar

arXiv · PDF · Open in the Atlas

Code that ran

12 of 17 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; 0 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 9 failures of our instrument; 5 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/2310.13659.json · badge: /api/ran/2310.13659.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
testzer0/AmbiQT canonical (classifier label)
classifier basis: census
12 ran · 5 no recorded run
FunctionStatusWhere it lives
disallowed Ran
ran; our contract draft was wrong, not the code
testzer0/AmbiQT/src/logicalbeam/ablation_direct.py
code served (permissive licence) · get_code("0ca547f553ddb65d")
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 1, dtype family float, shape (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)

# tokens: a 1D tensor of token IDs
tokens = torch.tensor([1, 5, 3, 7], dtype=torch.long)

# allowed_tokens: a collection of allowed token IDs (list, set, or similar)
allowed_tokens = {1, 3, 5}

ARGS = {
    "tokens": tokens,
    "allowed_tokens": allowed_tokens,
}
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 1, dtype family float, shape (4,) — shape (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
extract_tables_and_columns Ran
ran; our contract draft was wrong, not the code
testzer0/AmbiQT/src/logicalbeam/ablation_direct.py
code served (permissive licence) · get_code("d3bdc5e617b7e466")
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 torch
import numpy as np

def extract_tables_and_columns(schema):
    tables = []
    columns = []
    for tbl_string in schema.strip().split('|'):
        tbl_string = tbl_string.split(':')
        tables.append(tbl_string[0].strip().lower())
        for col_string in tbl_string[1].strip().split(','):
            columns.append(col_string.strip().lower())
    return (tables, columns)

schema_input = """
    users : id, name, email |
    orders : order_id, user_id, amount |
    products : product_id, title, price
"""

ARGS = {
    "schema": schema_input
}
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 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
get_col_mappings Ran
ran; our contract draft was wrong, not the code
testzer0/AmbiQT/src/utils/data.py
code served (permissive licence) · get_code("180f6cfb0b94cda6")
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.

# Construct valid arguments for get_col_mappings

ARGS = {
    'tinfo': [
        {
            'db_id': 'database_1',
            'table_names_original': ['users', 'orders', 'products'],
            'table_names': ['user', 'order', 'product'],
            'column_names_original': [
                (-1, 'id'),
                (0, 'user_id'),
                (0, 'name'),
                (1, 'order_id'),
                (1, 'user_id'),
                (1, 'total'),
                (2, 'product_id'),
                (2, 'title'),
            ],
            'column_names': [
                (-1, 'id'),
                (0, 'uid'),
                (0, 'nm'),
                (1, 'oid'),
                (1, 'uid'),
                (1, 'amt'),
                (2, 'pid'),
                (2, 'ttl'),
            ],
        },
        {
            'db_id': 'database_2',
            'table_names_original': ['customers', 'sales'],
            'table_names': ['cust', 'sale'],
            'column_names_original': [
                (-1, 'id'),
                (0, 'customer_id'),
                (0, 'email'),
                (1, 'sale_id'),
                (1, 'customer_id'),
                (1, 'amount'),
            ],
            'column_names': [
                (-1, 'id'),
                (0, 'cid'),
                (0, 'mail'),
                (1, 'sid'),
                (1, 'cid'),
                (1, 'amt'),
            ],
        },
    ],
    'original': True,
}
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_output_with_prefix Ran
ran; our contract draft was wrong, not the code
testzer0/AmbiQT/src/logicalbeam/template_gen.py
code served (permissive licence) · get_code("a29ff82a4708e5c7")
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 torch
import torch.nn as nn
from transformers import LogitsProcessor
import torch.nn.functional as F

torch.manual_seed(0)

# Stand-in tokenizer that mimics transformers tokenizer behavior
class StandInTokenizer:
    def __init__(self):
        self.vocab_size = 100
    
    def __call__(self, text, max_length=512, truncation=True, return_tensors=None):
        # Simulate tokenization: return a simple tensor
        # For prefix, we want to include token 1 (EOS) to trigger the index logic
        if isinstance(text, str):
            if "prefix" in text.lower():
                # Return tokens ending with token 1 (EOS marker)
                tokens = torch.LongTensor([[2, 3, 4, 1]])
            else:
                tokens = torch.LongTensor([[5, 6, 7, 8]])
        else:
            tokens = torch.LongTensor([[5, 6, 7, 8]])
        
        if return_tensors == 'pt':
            return type('obj', (object,), {'input_ids': tokens})()
        return tokens
    
    def batch_decode(self, token_ids, skip_special_tokens=True):
        # Return dummy decoded strings
        batch_size = token_ids.shape[0]
        return [f"decoded output {i}" for i in range(batch_size)]

# Minimal model that supports generate method
class StandInModel(nn.Module):
    def __init__(self, vocab_size=100):
        super().__init__()
        self.vocab_size = vocab_size
        self.embedding = nn.Embedding(vocab_size, 8)
        self.linear = nn.Linear(8, vocab_size)
    
    def forward(self, input_ids, **kwargs):
        x = self.embedding(input_ids)
        logits = self.linear(x)
        return type('obj', (object,), {'logits': logits})()
    
    def generate(self, input_ids, num_beams=1, num_return_sequences=1, 
                 max_length=512, logits_processor=None, **kwargs):
        # Return dummy output token sequences
        batch_size = input_ids.shape[0]
        output_length = 5
        return torch.randint(0, self.vocab_size, (batch_size * num_return_sequences, output_length))

def get_device():
    return torch.device('cpu')

# Create instances
model = StandInModel(vocab_size=100)
tokenizer = StandInTokenizer()
model_input = "test input text"
prefix = "test prefix"

ARGS = {
    'model': model,
    'tokenizer': tokenizer,
    'model_input': model_input,
    'prefix': prefix,
    'beam_width': 5,
    'num_outputs': 2,
    'device': torch.device('cpu')
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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_selections Ran
ran; our contract draft was wrong, not the code
testzer0/AmbiQT/src/collate.py
code served (permissive licence) · get_code("b0dc867bb550c2d7")
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 torch

torch.manual_seed(0)

# Test case 1: selections is a list of strings
selections_strings = ["apple", "banana", "cherry", "date", "elderberry"]

# Test case 2: selections is a list of lists (nested structure with numeric scores)
selections_nested = [
    ["item_a", "item_b", "item_c"],
    ["item_d", "item_e"],
    ["item_f", "item_g", "item_h", "item_i"]
]

ARGS = {
    "selections": selections_nested,
    "k": 10
}
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 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
testzer0/AmbiQT/src/utils/content.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
testzer0/AmbiQT/src/utils/content.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
testzer0/AmbiQT/src/utils/content.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
lower Ran
ran; our contract draft was wrong, not the code
testzer0/AmbiQT/src/collate.py
code served (permissive licence) · get_code("83fb78ab0d26fa54")
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 torch

def lower(s):
    s = s.replace('``', '`')
    lowers = ''
    current_quote = None
    for c in s:
        if current_quote is None:
            lowers += c.lower()
            if c in ['"', "'", '`']:
                current_quote = c
        else:
            lowers += c
            if c == current_quote:
                current_quote = None
    return lowers

ARGS = {
    's': "Hello ``World`` with \"quotes\" and 'single' and `backticks`"
}
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 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_spaces Ran
ran; our contract draft was wrong, not the code
testzer0/AmbiQT/src/utils/sql.py
code served (permissive licence) · get_code("56def8190912ab3f")
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 torch

torch.manual_seed(0)

# The function normalize_spaces takes a single parameter 'text' which is a string.
# It splits the string by whitespace and rejoins with single spaces.
# This removes leading/trailing whitespace and collapses multiple spaces.

ARGS = {
    'text': '  hello   world  \n  foo  bar  '
}
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 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_sql Ran
ran; our contract draft was wrong, not the code
testzer0/AmbiQT/src/collate.py
code served (permissive licence) · get_code("f146bec5afa35b8d")
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.

# Analyze the function to understand its parameters and behavior
# normalize_sql takes one parameter: sql (a string)
# The function performs string operations on the sql parameter:
# - Removes trailing semicolon
# - Calls lower() function which lowercases text outside of quotes
# - Strips and normalizes whitespace
# - Removes spaces before commas and around parentheses
# - Handles aggregate function keywords

# Simple test cases
sql_example_1 = "SELECT * FROM Table WHERE id = 1;"
sql_example_2 = "SELECT COUNT ( id ) , Name FROM Users WHERE 'Active' = true"
sql_example_3 = "SELECT AVG ( price ) FROM products ( id , name )"

ARGS = {
    'sql': "SELECT COUNT ( * ) FROM table WHERE name = 'John' AND status = \"Active\";"
}
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
try_extract_json Ran
ran; our contract draft was wrong, not the code
testzer0/AmbiQT/src/chatgpt/prompter.py
code served (permissive licence) · get_code("4ff91e232c45be1a")
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 json

# Test case 1: Valid JSON with all required fields when check=True
test_string_1 = '''
Some text before {
  "table": "users",
  "new_column": "age_group",
  "example_entries": ["young", "old"],
  "alternate_query_1": "SELECT * FROM users",
  "alternate_query_2": "SELECT id FROM users",
  "alternate_question": "What is the age distribution?"
}
some text after
'''

# Test case 2: Simple JSON extraction without check
test_string_2 = '{"key": "value", "number": 42}'

# Test case 3: JSON with numeric example_entries
test_string_3 = '''prefix {
  "table": "data",
  "new_column": "col",
  "example_entries": [1, 2, 3],
  "alternate_query_1": "q1",
  "alternate_query_2": "q2",
  "alternate_question": "q?"
} suffix'''

ARGS = {
    "string": test_string_1,
    "check": True
}
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_model_picard Not yet run
unverified (harvested, no recorded run)
testzer0/AmbiQT/src/utils/model_utils.py
code served (permissive licence) · get_code("b90b6e1db0a2c350")
How it ran

no invocation recorded.

get_reply Not yet run
unverified (harvested, no recorded run)
testzer0/AmbiQT/src/chatgpt/helper.py
code served (permissive licence) · get_code("f988bbea8a36c875")
How it ran

no invocation recorded.

get_reply_with_retries Not yet run
unverified (harvested, no recorded run)
testzer0/AmbiQT/src/chatgpt/helper.py
code served (permissive licence) · get_code("73bf0aed972d0f6c")
How it ran

no invocation recorded.

load_spider Not yet run
unverified (harvested, no recorded run)
testzer0/AmbiQT/src/utils/data.py
code served (permissive licence) · get_code("b2cd044e4edcf9d1")
How it ran

no invocation recorded.

to_device_multiple Not yet run
unverified (harvested, no recorded run)
testzer0/AmbiQT/src/utils/model_utils.py
code served (permissive licence) · get_code("7b30094e3a706d3f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 14 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
is_commonword 5 other papers
3 dated earlier, 2 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
2306.08891 (2023-06)
Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generation
and 2 more not named here
is_number 5 other papers
3 dated earlier, 2 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
2306.08891 (2023-06)
Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generation
and 2 more not named here
is_stopword 5 other papers
3 dated earlier, 2 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
2306.08891 (2023-06)
Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generation
and 2 more not named here

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

Research in Text-to-SQL conversion has been largely benchmarked against datasets where each text query corresponds to one correct SQL. However, natural language queries over reallife databases frequently involve significant ambiguity about the intended SQL due to overlapping schema names and multiple confusing relationship paths. To bridge this gap, we develop a novel benchmark called AmbiQT with over 3000 examples where each text is interpretable as two plausible SQLs due to lexical and/or structural ambiguity. When faced with ambiguity, an ideal top-k decoder should generate all valid interpretations for possible disambiguation by the user (Elgohary et al., 2021;Zhong et al., 2022). We evaluate several Text-to-SQL systems and decoding algorithms, including those employing state-of-the-art LLMs, and find them to be far from this ideal. The primary reason is that the prevalent beam search algorithm and its variants, treat SQL queries as a string and produce unhelpful token-level diversity in the top-k. We propose LogicalBeam, a new decoding algorithm that navigates the SQL logic space using a blend of plan-based template generation and constrained infilling. Counterfactually generated plans diversify templates while in-filling with a beam-search, that branches solely on schema names, provides value diversity. Log-icalBeam is up to 2.5× more effective than state-of-the-art models at generating all candidate SQLs in the top-k ranked outputs. It also enhances the top-5 Exact and Execution Match Accuracies on SPIDER and Kaggle DBQA 1 .

For agents

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

get_harvested_code_for_paper("2310.13659")
get_code_for_paper("2310.13659")
have("2310.13659")

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

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

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

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

Connect an agent — have() is free.