qid stringlengths 5 5 | task_type stringclasses 1
value | has_intended_resolution bool 1
class | db stringclasses 6
values | question stringlengths 33 189 | gold_ambiguity_points listlengths 1 5 | gold_queries listlengths 1 32 | gold_intended_query_id stringlengths 4 20 | gold_intended_query stringlengths 63 1.45k |
|---|---|---|---|---|---|---|---|---|
001-5 | ambig | true | retails | Report the total revenue for each nation in 1995. | [
{
"id": "A",
"phrase": "total revenue",
"type": "finite",
"ambiguity_type": "semantic_computation",
"interpretations": [
"before discount (Gross revenue)",
"after discount (Net revenue)"
],
"intended_interpretation_idx": 1
},
{
"id": "B",
"phrase": "total revenue"... | [
{
"id": "GQRY-A.0-B.0-C.0-D.0",
"query": "WITH revenue AS (\nSELECT n.n_nationkey,\nn.n_name,\nCOALESCE(SUM(l.l_extendedprice), 0) AS total_revenue\nFROM lineitem l\nJOIN orders o ON o.o_orderkey = l.l_orderkey\nJOIN customer c ON o.o_custkey = c.c_custkey\nJOIN nation n ON c.c_nationkey = n.n_nationkey\nWH... | GQRY-A.1-B.1-C.0-D.3 | WITH revenue AS (
SELECT n.n_nationkey,
n.n_name,
COALESCE(SUM(l.l_extendedprice * (1 - l.l_discount)), 0) AS total_revenue
FROM lineitem l
JOIN orders o ON o.o_orderkey = l.l_orderkey
JOIN customer c ON o.o_custkey = c.c_custkey
JOIN nation n ON c.c_nationkey = n.n_nationkey
WHERE strftime('%Y', l.l_receiptdate) = '19... |
026-0 | ambig | true | professional_basketball | For each team that Marcus Williams played for, compute his aggregate field goal percentage. | [
{
"id": "A",
"phrase": "Marcus Williams",
"type": "finite",
"ambiguity_type": "semantic_value",
"interpretations": [
"Marcus Williams from University of Connecticut born in 1985",
"Marcus Williams from University of Arizona born in 1986"
],
"intended_interpretation_idx": 0
... | [
{
"id": "GQRY-A.0-B.0-C.0",
"query": "SELECT\nt.tmID,\nt.name,\nCASE\nWHEN SUM(pt.fgAttempted) = 0 THEN 0\nELSE CAST(SUM(pt.fgMade) AS REAL) / SUM(pt.fgAttempted)\nEND as field_goal_percentage\nFROM players_teams pt\nJOIN players p ON pt.playerID = p.playerID\nJOIN teams t ON pt.tmID = t.tmID AND pt.year = ... | GQRY-A.0-B.1-C.0 | WITH season_stats AS (
SELECT t.tmID, t.name, pt.year,
CASE WHEN SUM(pt.fgAttempted) = 0 THEN 0
ELSE CAST(SUM(pt.fgMade) AS REAL) / SUM(pt.fgAttempted)
END as field_goal_percentage
FROM players_teams pt
JOIN players p ON pt.playerID = p.playerID
JOIN teams t ON pt.tmID = t.tmID AND pt.year = t.year
WHERE p.firstName = ... |
036-0 | ambig | true | github_repos | For each repository with a GPL license, count the number of merged PRs created in the period of 2022 and January 2023. | [
{
"id": "A",
"phrase": "GPL license",
"type": "finite",
"ambiguity_type": "semantic_value",
"interpretations": [
"mainline GPL license (gpl-2.0 or gpl-3.0)",
"all GPL variants including AGPL (agpl-3.0) and LGPL (lgpl-2.1 or lgpl-3.0)"
],
"intended_interpretation_idx": 1
},
... | [
{
"id": "GQRY-A.0-B.0",
"query": "WITH gpl_repos AS (\nSELECT grl.repo_name, grl.license\nFROM GITHUB_REPOS_LICENSES grl\nWHERE grl.license IN ('gpl-2.0', 'gpl-3.0')\n),\nall_events AS (\nSELECT * FROM YEAR_2022\nUNION ALL\nSELECT * FROM MONTH_202301\n),\nmerged_prs AS (\nSELECT\njson_extract(ae.repo, '$.na... | GQRY-A.1-B.0 | WITH gpl_repos AS (
SELECT grl.repo_name, grl.license
FROM GITHUB_REPOS_LICENSES grl
WHERE grl.license IN ('agpl-3.0', 'gpl-2.0', 'gpl-3.0', 'lgpl-2.1', 'lgpl-3.0')
),
all_events AS (
SELECT * FROM YEAR_2022
UNION ALL
SELECT * FROM MONTH_202301
),
merged_prs AS (
SELECT
json_extract(ae.repo, '$.name') AS repo_name,
COU... |
058-2 | ambig | true | financial | Compute the amount of deposits from December 1997 to end of 1998. | [
{
"id": "A",
"phrase": "amount",
"type": "finite",
"ambiguity_type": "semantic_computation",
"interpretations": [
"the number of deposit transactions",
"the total monetary value of deposits"
],
"intended_interpretation_idx": 0
},
{
"id": "B",
"phrase": "deposits",... | [
{
"id": "GQRY-A.0-B.0",
"query": "SELECT COUNT(*)\nFROM trans\nWHERE operation = 'VKLAD'\nAND (date >= '1997-12-01' AND date < '1999-01-01');",
"parameter_names": [],
"parameter_values": "{}",
"exec_result": "{\"df\":{\"format\":\"parquet_v1\",\"parquet_base64\":\"UEFSMRUEFRAVFEwVAhUAEgAACBzIvQA... | GQRY-A.0-B.1 | SELECT COUNT(*)
FROM trans
WHERE operation IN ('VKLAD', 'PREVOD Z UCTU')
AND (date >= '1997-12-01' AND date < '1999-01-01'); |
072-0 | ambig | true | codebase_community | Find posts with many related posts. | [{"id":"A","phrase":"many","type":"infinite","ambiguity_type":"semantic_value","parameter_name":"cou(...TRUNCATED) | [{"id":"GQRY-B.0","query":"SELECT p.Id, p.Title, COUNT(DISTINCT pl.RelatedPostId) AS RelatedCount\nF(...TRUNCATED) | GQRY-B.2 | "SELECT p.Id,\np.Title,\nCOUNT(DISTINCT rel.RelatedRef) AS RelatedCount\nFROM posts p\nJOIN (\nSELEC(...TRUNCATED) |
087-0 | ambig | true | student_club | Which events had a low budget remaining or high spending on food or advertisement? | [{"id":"A","phrase":"low budget remaining","type":"infinite","ambiguity_type":"semantic_value","para(...TRUNCATED) | [{"id":"GQRY-B.0","query":"WITH event_budget AS (\nSELECT\nlink_to_event AS event_id,\nSUM(remaining(...TRUNCATED) | GQRY-B.0 | "WITH event_budget AS (\nSELECT\nlink_to_event AS event_id,\nSUM(remaining) AS total_remaining,\nSUM(...TRUNCATED) |
037-1 | ambig | true | github_repos | "List all repository names with many issues opened in 2022, provide the corresponding issue count an(...TRUNCATED) | [{"id":"A","phrase":"many","type":"infinite","ambiguity_type":"semantic_value","parameter_name":"iss(...TRUNCATED) | [{"id":"GQRY-B.0","query":"WITH issue_counts AS (\nSELECT\njson_extract(repo, '$.name') AS repo_name(...TRUNCATED) | GQRY-B.0 | "WITH issue_counts AS (\nSELECT\njson_extract(repo, '$.name') AS repo_name,\nCOUNT(DISTINCT json_ext(...TRUNCATED) |
002-4 | ambig | true | retails | Count the number of suppliers that offer both air and rail shipping in America. | [{"id":"A","phrase":"suppliers that offer both air and rail shipping in America","type":"finite","am(...TRUNCATED) | [{"id":"GQRY-A.0-B.0-C.0","query":"WITH usa_suppliers_with_air AS (\nSELECT DISTINCT l.l_suppkey\nFR(...TRUNCATED) | GQRY-A.0-B.0-C.0 | "WITH usa_suppliers_with_air AS (\nSELECT DISTINCT l.l_suppkey\nFROM lineitem l\nJOIN orders o ON l.(...TRUNCATED) |
048-1 | ambig | true | github_repos | "Count the number of repository IDs in YEAR_2023 that have public events and also received a large n(...TRUNCATED) | [{"id":"A","phrase":"public events","type":"finite","ambiguity_type":"semantic_computation","interpr(...TRUNCATED) | [{"id":"GQRY-A.0-B.0","query":"WITH repo_public_events AS (\nSELECT DISTINCT json_extract(repo, '$.i(...TRUNCATED) | GQRY-A.1-B.0 | "WITH repo_public_events AS (\nSELECT DISTINCT json_extract(repo, '$.id') as repo_id\nFROM YEAR_2023(...TRUNCATED) |
005-0 | ambig | true | retails | Which part has the highest price? | [{"id":"A","phrase":"highest price","type":"finite","ambiguity_type":"semantic_computation","interpr(...TRUNCATED) | [{"id":"GQRY-A.0-B.0","query":"WITH part_max_supply_cost AS (\nSELECT p.p_partkey, p.p_name, MAX(ps.(...TRUNCATED) | GQRY-A.1-B.1 | "SELECT p_partkey, p_name, p_retailprice\nFROM part p\nWHERE p_retailprice = (SELECT MAX(p_retailpri(...TRUNCATED) |
ARCS
ARCS (Ambiguity Resolution Corpus for SQL) is a text-to-SQL benchmark featuring naturally occurring, unconstrained ambiguities over real-world databases, with complete annotations of valid ambiguity points, interpretations, and SQL queries.
As text-to-SQL systems move beyond demonstrations toward real-world deployment, ambiguity in user questions becomes a primary source of errors. These ambiguities are often subtle, domain- or data-specific, and can silently cause system outputs to deviate from the user's true intent.
ARCS contains 101 unique questions across six SQLite databases. The test split
expands them into 311 end-to-end instances with an intended resolution, while
tasks/base_tasks.json preserves the original questions and all valid
interpretations.
Website: https://megagonlabs.github.io/tabulaflow/research/arcs/
Code: https://github.com/megagonlabs/tabulaflow/blob/main/tabulaflow/research/ARCS.md
Sample Task
{
"qid": "001",
"db": "retails",
"question": "Report the total revenue for each nation in 1995.",
"gold_ambiguity_points": [
{
"phrase": "total revenue",
"interpretations": [
"before discount (Gross revenue)",
"after discount (Net revenue)"
]
},
{
"phrase": "total revenue",
"interpretations": [
"include returned items",
"exclude returned items"
]
},
{
"phrase": "for each nation",
"interpretations": [
"for each customer nation",
"for each supplier nation"
]
},
{
"phrase": "in 1995",
"interpretations": [
"order date in 1995",
"commitment date in 1995",
"shipment date in 1995",
"receipt date in 1995"
]
}
]
}
π Quickstart with TabulaFlow
TabulaFlow provides the supported ARCS loader, structured-disambiguation agents, and evaluation metrics. It downloads the pinned release, opens the SQLite databases locally, and records predictions, scores, trajectories, token usage, and latency.
These instructions are also available in the benchmark guide.
First, install uv, then install TabulaFlow and
download ARCS (approximately 9 GB):
uv tool install tabulaflow
tabulaflow benchmark download arcs
Run five test instances with a configured model provider:
export OPENAI_API_KEY="your-api-key"
tabulaflow benchmark run arcs \
--split test \
--llm openai:gpt-6-luna \
--sample-size 5
ARCS defaults to TabulaFlow's structured ambiguity agent. The agent identifies ambiguity points, resolves them against the intended user response, generates SQL, and evaluates both disambiguation and execution quality.
Files
tasks.jsonlβ canonicaltestsplit, with one row per intended resolutiontasks/base_tasks.jsonβ 101 original questions before resolution expansiontasks/intended_query_ids.jsonβ intended query IDs used for expansiontasks/readable/β human-readable tasks, gold SQL, and expected resultsdatabases/sqlite/*.sqliteβ six referenced SQLite databasesdatabases/column_meanings.jsonβ column-level descriptions
Embedded execution-result DataFrames use TabulaFlow's parquet_v1
serialization and are loaded by its ARCS benchmark loader.
- Downloads last month
- 152