SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.17342 · 2023

ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 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, 4 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 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/2310.17342.json · badge: /api/ran/2310.17342.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
x-lance/text2sql-gpt canonical (classifier label)
classifier basis: census
10 ran · 2 no recorded run
FunctionStatusWhere it lives
condition_has_like Ran
ran, violated the contract we drafted
x-lance/text2sql-gpt/eval/evaluation.py
pointer only (licence: NONE) · get_code("8231e3fdffa9c8ee")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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.

condition_has_or Ran
ran, violated the contract we drafted
x-lance/text2sql-gpt/eval/evaluation.py
pointer only (licence: NONE) · get_code("f2d76234528d3b57")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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.

condition_has_sql Ran
ran, violated the contract we drafted
x-lance/text2sql-gpt/eval/evaluation.py
pointer only (licence: NONE) · get_code("954c76e256cc7220")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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_schema Ran
ran; our contract draft was wrong, not the code
x-lance/text2sql-gpt/eval/process_sql.py
pointer only (licence: NONE) · get_code("0992d2a47ae733fa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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_schema_from_json Ran
ran; our contract draft was wrong, not the code
x-lance/text2sql-gpt/eval/process_sql.py
pointer only (licence: NONE); 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: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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.

join_tokens Ran
ran; our contract draft was wrong, not the code
x-lance/text2sql-gpt/eval/parse.py
pointer only (licence: NONE) · get_code("2178b95c919ae420")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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.

permute_tuple Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
x-lance/text2sql-gpt/eval/exec_eval.py
pointer only (licence: NONE) · get_code("f23d6ff3772963bc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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.

postprocess Ran
ran; our contract draft was wrong, not the code
x-lance/text2sql-gpt/eval/parse.py
pointer only (licence: NONE) · get_code("58e472cff9780d63")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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.

quick_rej Ran
ran, violated the contract we drafted
x-lance/text2sql-gpt/eval/exec_eval.py
pointer only (licence: NONE) · get_code("a40510ba6a37f798")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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.

unorder_row Ran
ran; our contract draft was wrong, not the code
x-lance/text2sql-gpt/eval/exec_eval.py
pointer only (licence: NONE) · get_code("afc8ef89576ef2aa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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_response Not yet run
unverified (harvested, no recorded run)
x-lance/text2sql-gpt/util/gpt.py
pointer only (licence: NONE) · get_code("83512c75d8835ed6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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. No invocation recorded.

tokenize Not yet run
unverified (harvested, no recorded run)
x-lance/text2sql-gpt/eval/process_sql.py
pointer only (licence: NONE) · get_code("a906f5de1f5971b0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, x-lance/text2sql-gpt 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. No invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 0 the same month, 11 later) and 1 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
8 dated earlier, 6 later
1809.08887 (2018-09)
Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task
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
and 11 more not named here
condition_has_or 14 other papers
8 dated earlier, 6 later
1809.08887 (2018-09)
Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task
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
and 11 more not named here
get_schema_from_json 13 other papers
6 dated earlier, 7 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
condition_has_sql 11 other papers
8 dated earlier, 3 later
1809.08887 (2018-09)
Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task
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
and 8 more not named here
get_schema 11 other papers
6 dated earlier, 5 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
tokenize 10 other papers
5 dated earlier, 5 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 7 more not named here
permute_tuple 6 other papers
1 dated earlier, 5 later
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
2408.07930 (2024-08)
MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQL
and 3 more not named here
quick_rej 6 other papers
1 dated earlier, 5 later
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
2408.07930 (2024-08)
MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQL
and 3 more not named here
unorder_row 6 other papers
1 dated earlier, 5 later
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
2408.07930 (2024-08)
MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQL
and 3 more not named here
join_tokens 5 other papers
1 dated earlier, 4 later
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
2408.07930 (2024-08)
MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQL
and 2 more not named here
postprocess 5 other papers
1 dated earlier, 4 later
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
2408.07930 (2024-08)
MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQL
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-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

Recently Large Language Models (LLMs) have been proven to have strong abilities in various domains and tasks. We study the problem of prompt designing in the text-to-SQL task and attempt to improve the LLMs' reasoning ability when generating SQL queries. Besides the trivial few-shot in-context learning setting, we design our chain-of-thought (CoT) prompt with a similar method to schema linking. We provide a method named ACT-SQL to automatically generate auto-CoT exemplars and thus the whole process doesn't need manual labeling. Our approach is cost-saving since we only use the LLMs' API call once when generating one SQL query. Furthermore, we extend our in-context learning method to the multi-turn text-to-SQL task. The experiment results show that the LLMs' performance can benefit from our ACT-SQL approach. Our approach achieves SOTA performance on the Spider dev set among existing in-context learning approaches.

For agents

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

get_harvested_code_for_paper("2310.17342")
get_code_for_paper("2310.17342")
have("2310.17342")

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

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

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

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

Connect an agent — have() is free.