ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought Article Swipe
YOU?
·
· 2023
· Open Access
·
· DOI: https://doi.org/10.48550/arxiv.2310.17342
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.
Related Topics
- Type
- preprint
- Language
- en
- Landing Page
- http://arxiv.org/abs/2310.17342
- https://arxiv.org/pdf/2310.17342
- OA Status
- green
- Related Works
- 10
- OpenAlex ID
- https://openalex.org/W4387995341
Raw OpenAlex JSON
- OpenAlex ID
-
https://openalex.org/W4387995341Canonical identifier for this work in OpenAlex
- DOI
-
https://doi.org/10.48550/arxiv.2310.17342Digital Object Identifier
- Title
-
ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-ThoughtWork title
- Type
-
preprintOpenAlex work type
- Language
-
enPrimary language
- Publication year
-
2023Year of publication
- Publication date
-
2023-10-26Full publication date if available
- Authors
-
Hanchong Zhang, Ruisheng Cao, Lu Chen, Hongshen Xu, Kai YuList of authors in order
- Landing page
-
https://arxiv.org/abs/2310.17342Publisher landing page
- PDF URL
-
https://arxiv.org/pdf/2310.17342Direct link to full text PDF
- Open access
-
YesWhether a free full text is available
- OA status
-
greenOpen access status per OpenAlex
- OA URL
-
https://arxiv.org/pdf/2310.17342Direct OA link when available
- Concepts
-
SQL, Computer science, Schema (genetic algorithms), Context (archaeology), Task (project management), Programming language, Set (abstract data type), Natural language processing, Artificial intelligence, Information retrieval, Engineering, Biology, Paleontology, Systems engineeringTop concepts (fields/topics) attached by OpenAlex
- Cited by
-
0Total citation count in OpenAlex
- Related works (count)
-
10Other works algorithmically related by OpenAlex
Full payload
| id | https://openalex.org/W4387995341 |
|---|---|
| doi | https://doi.org/10.48550/arxiv.2310.17342 |
| ids.doi | https://doi.org/10.48550/arxiv.2310.17342 |
| ids.openalex | https://openalex.org/W4387995341 |
| fwci | |
| type | preprint |
| title | ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought |
| biblio.issue | |
| biblio.volume | |
| biblio.last_page | |
| biblio.first_page | |
| topics[0].id | https://openalex.org/T10028 |
| topics[0].field.id | https://openalex.org/fields/17 |
| topics[0].field.display_name | Computer Science |
| topics[0].score | 0.9983000159263611 |
| topics[0].domain.id | https://openalex.org/domains/3 |
| topics[0].domain.display_name | Physical Sciences |
| topics[0].subfield.id | https://openalex.org/subfields/1702 |
| topics[0].subfield.display_name | Artificial Intelligence |
| topics[0].display_name | Topic Modeling |
| topics[1].id | https://openalex.org/T10181 |
| topics[1].field.id | https://openalex.org/fields/17 |
| topics[1].field.display_name | Computer Science |
| topics[1].score | 0.9757999777793884 |
| topics[1].domain.id | https://openalex.org/domains/3 |
| topics[1].domain.display_name | Physical Sciences |
| topics[1].subfield.id | https://openalex.org/subfields/1702 |
| topics[1].subfield.display_name | Artificial Intelligence |
| topics[1].display_name | Natural Language Processing Techniques |
| topics[2].id | https://openalex.org/T13083 |
| topics[2].field.id | https://openalex.org/fields/17 |
| topics[2].field.display_name | Computer Science |
| topics[2].score | 0.953000009059906 |
| topics[2].domain.id | https://openalex.org/domains/3 |
| topics[2].domain.display_name | Physical Sciences |
| topics[2].subfield.id | https://openalex.org/subfields/1702 |
| topics[2].subfield.display_name | Artificial Intelligence |
| topics[2].display_name | Advanced Text Analysis Techniques |
| is_xpac | False |
| apc_list | |
| apc_paid | |
| concepts[0].id | https://openalex.org/C510870499 |
| concepts[0].level | 2 |
| concepts[0].score | 0.8409778475761414 |
| concepts[0].wikidata | https://www.wikidata.org/wiki/Q47607 |
| concepts[0].display_name | SQL |
| concepts[1].id | https://openalex.org/C41008148 |
| concepts[1].level | 0 |
| concepts[1].score | 0.8177872896194458 |
| concepts[1].wikidata | https://www.wikidata.org/wiki/Q21198 |
| concepts[1].display_name | Computer science |
| concepts[2].id | https://openalex.org/C52146309 |
| concepts[2].level | 2 |
| concepts[2].score | 0.5207517147064209 |
| concepts[2].wikidata | https://www.wikidata.org/wiki/Q7431116 |
| concepts[2].display_name | Schema (genetic algorithms) |
| concepts[3].id | https://openalex.org/C2779343474 |
| concepts[3].level | 2 |
| concepts[3].score | 0.5015113353729248 |
| concepts[3].wikidata | https://www.wikidata.org/wiki/Q3109175 |
| concepts[3].display_name | Context (archaeology) |
| concepts[4].id | https://openalex.org/C2780451532 |
| concepts[4].level | 2 |
| concepts[4].score | 0.47137248516082764 |
| concepts[4].wikidata | https://www.wikidata.org/wiki/Q759676 |
| concepts[4].display_name | Task (project management) |
| concepts[5].id | https://openalex.org/C199360897 |
| concepts[5].level | 1 |
| concepts[5].score | 0.4638860821723938 |
| concepts[5].wikidata | https://www.wikidata.org/wiki/Q9143 |
| concepts[5].display_name | Programming language |
| concepts[6].id | https://openalex.org/C177264268 |
| concepts[6].level | 2 |
| concepts[6].score | 0.43224501609802246 |
| concepts[6].wikidata | https://www.wikidata.org/wiki/Q1514741 |
| concepts[6].display_name | Set (abstract data type) |
| concepts[7].id | https://openalex.org/C204321447 |
| concepts[7].level | 1 |
| concepts[7].score | 0.4322209060192108 |
| concepts[7].wikidata | https://www.wikidata.org/wiki/Q30642 |
| concepts[7].display_name | Natural language processing |
| concepts[8].id | https://openalex.org/C154945302 |
| concepts[8].level | 1 |
| concepts[8].score | 0.41430655121803284 |
| concepts[8].wikidata | https://www.wikidata.org/wiki/Q11660 |
| concepts[8].display_name | Artificial intelligence |
| concepts[9].id | https://openalex.org/C23123220 |
| concepts[9].level | 1 |
| concepts[9].score | 0.2807213068008423 |
| concepts[9].wikidata | https://www.wikidata.org/wiki/Q816826 |
| concepts[9].display_name | Information retrieval |
| concepts[10].id | https://openalex.org/C127413603 |
| concepts[10].level | 0 |
| concepts[10].score | 0.056735605001449585 |
| concepts[10].wikidata | https://www.wikidata.org/wiki/Q11023 |
| concepts[10].display_name | Engineering |
| concepts[11].id | https://openalex.org/C86803240 |
| concepts[11].level | 0 |
| concepts[11].score | 0.0 |
| concepts[11].wikidata | https://www.wikidata.org/wiki/Q420 |
| concepts[11].display_name | Biology |
| concepts[12].id | https://openalex.org/C151730666 |
| concepts[12].level | 1 |
| concepts[12].score | 0.0 |
| concepts[12].wikidata | https://www.wikidata.org/wiki/Q7205 |
| concepts[12].display_name | Paleontology |
| concepts[13].id | https://openalex.org/C201995342 |
| concepts[13].level | 1 |
| concepts[13].score | 0.0 |
| concepts[13].wikidata | https://www.wikidata.org/wiki/Q682496 |
| concepts[13].display_name | Systems engineering |
| keywords[0].id | https://openalex.org/keywords/sql |
| keywords[0].score | 0.8409778475761414 |
| keywords[0].display_name | SQL |
| keywords[1].id | https://openalex.org/keywords/computer-science |
| keywords[1].score | 0.8177872896194458 |
| keywords[1].display_name | Computer science |
| keywords[2].id | https://openalex.org/keywords/schema |
| keywords[2].score | 0.5207517147064209 |
| keywords[2].display_name | Schema (genetic algorithms) |
| keywords[3].id | https://openalex.org/keywords/context |
| keywords[3].score | 0.5015113353729248 |
| keywords[3].display_name | Context (archaeology) |
| keywords[4].id | https://openalex.org/keywords/task |
| keywords[4].score | 0.47137248516082764 |
| keywords[4].display_name | Task (project management) |
| keywords[5].id | https://openalex.org/keywords/programming-language |
| keywords[5].score | 0.4638860821723938 |
| keywords[5].display_name | Programming language |
| keywords[6].id | https://openalex.org/keywords/set |
| keywords[6].score | 0.43224501609802246 |
| keywords[6].display_name | Set (abstract data type) |
| keywords[7].id | https://openalex.org/keywords/natural-language-processing |
| keywords[7].score | 0.4322209060192108 |
| keywords[7].display_name | Natural language processing |
| keywords[8].id | https://openalex.org/keywords/artificial-intelligence |
| keywords[8].score | 0.41430655121803284 |
| keywords[8].display_name | Artificial intelligence |
| keywords[9].id | https://openalex.org/keywords/information-retrieval |
| keywords[9].score | 0.2807213068008423 |
| keywords[9].display_name | Information retrieval |
| keywords[10].id | https://openalex.org/keywords/engineering |
| keywords[10].score | 0.056735605001449585 |
| keywords[10].display_name | Engineering |
| language | en |
| locations[0].id | pmh:oai:arXiv.org:2310.17342 |
| locations[0].is_oa | True |
| locations[0].source.id | https://openalex.org/S4306400194 |
| locations[0].source.issn | |
| locations[0].source.type | repository |
| locations[0].source.is_oa | True |
| locations[0].source.issn_l | |
| locations[0].source.is_core | False |
| locations[0].source.is_in_doaj | False |
| locations[0].source.display_name | arXiv (Cornell University) |
| locations[0].source.host_organization | https://openalex.org/I205783295 |
| locations[0].source.host_organization_name | Cornell University |
| locations[0].source.host_organization_lineage | https://openalex.org/I205783295 |
| locations[0].license | |
| locations[0].pdf_url | https://arxiv.org/pdf/2310.17342 |
| locations[0].version | submittedVersion |
| locations[0].raw_type | text |
| locations[0].license_id | |
| locations[0].is_accepted | False |
| locations[0].is_published | False |
| locations[0].raw_source_name | |
| locations[0].landing_page_url | http://arxiv.org/abs/2310.17342 |
| locations[1].id | doi:10.48550/arxiv.2310.17342 |
| locations[1].is_oa | True |
| locations[1].source.id | https://openalex.org/S4306400194 |
| locations[1].source.issn | |
| locations[1].source.type | repository |
| locations[1].source.is_oa | True |
| locations[1].source.issn_l | |
| locations[1].source.is_core | False |
| locations[1].source.is_in_doaj | False |
| locations[1].source.display_name | arXiv (Cornell University) |
| locations[1].source.host_organization | https://openalex.org/I205783295 |
| locations[1].source.host_organization_name | Cornell University |
| locations[1].source.host_organization_lineage | https://openalex.org/I205783295 |
| locations[1].license | |
| locations[1].pdf_url | |
| locations[1].version | |
| locations[1].raw_type | article |
| locations[1].license_id | |
| locations[1].is_accepted | False |
| locations[1].is_published | |
| locations[1].raw_source_name | |
| locations[1].landing_page_url | https://doi.org/10.48550/arxiv.2310.17342 |
| indexed_in | arxiv, datacite |
| authorships[0].author.id | https://openalex.org/A5009687357 |
| authorships[0].author.orcid | https://orcid.org/0000-0003-1152-4355 |
| authorships[0].author.display_name | Hanchong Zhang |
| authorships[0].author_position | first |
| authorships[0].raw_author_name | Zhang, Hanchong |
| authorships[0].is_corresponding | False |
| authorships[1].author.id | https://openalex.org/A5033252354 |
| authorships[1].author.orcid | https://orcid.org/0000-0003-4635-4368 |
| authorships[1].author.display_name | Ruisheng Cao |
| authorships[1].author_position | middle |
| authorships[1].raw_author_name | Cao, Ruisheng |
| authorships[1].is_corresponding | False |
| authorships[2].author.id | https://openalex.org/A5100432093 |
| authorships[2].author.orcid | https://orcid.org/0000-0002-5685-7017 |
| authorships[2].author.display_name | Lu Chen |
| authorships[2].author_position | middle |
| authorships[2].raw_author_name | Chen, Lu |
| authorships[2].is_corresponding | False |
| authorships[3].author.id | https://openalex.org/A5100574387 |
| authorships[3].author.orcid | |
| authorships[3].author.display_name | Hongshen Xu |
| authorships[3].author_position | middle |
| authorships[3].raw_author_name | Xu, Hongshen |
| authorships[3].is_corresponding | False |
| authorships[4].author.id | https://openalex.org/A5111980517 |
| authorships[4].author.orcid | |
| authorships[4].author.display_name | Kai Yu |
| authorships[4].author_position | last |
| authorships[4].raw_author_name | Yu, Kai |
| authorships[4].is_corresponding | False |
| has_content.pdf | False |
| has_content.grobid_xml | False |
| is_paratext | False |
| open_access.is_oa | True |
| open_access.oa_url | https://arxiv.org/pdf/2310.17342 |
| open_access.oa_status | green |
| open_access.any_repository_has_fulltext | False |
| created_date | 2023-10-28T00:00:00 |
| display_name | ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought |
| has_fulltext | False |
| is_retracted | False |
| updated_date | 2025-11-06T06:51:31.235846 |
| primary_topic.id | https://openalex.org/T10028 |
| primary_topic.field.id | https://openalex.org/fields/17 |
| primary_topic.field.display_name | Computer Science |
| primary_topic.score | 0.9983000159263611 |
| primary_topic.domain.id | https://openalex.org/domains/3 |
| primary_topic.domain.display_name | Physical Sciences |
| primary_topic.subfield.id | https://openalex.org/subfields/1702 |
| primary_topic.subfield.display_name | Artificial Intelligence |
| primary_topic.display_name | Topic Modeling |
| related_works | https://openalex.org/W2033101018, https://openalex.org/W2099278314, https://openalex.org/W2394886764, https://openalex.org/W2282598741, https://openalex.org/W2361540170, https://openalex.org/W1637796940, https://openalex.org/W2769255368, https://openalex.org/W4231937131, https://openalex.org/W4389443772, https://openalex.org/W323219885 |
| cited_by_count | 0 |
| locations_count | 2 |
| best_oa_location.id | pmh:oai:arXiv.org:2310.17342 |
| best_oa_location.is_oa | True |
| best_oa_location.source.id | https://openalex.org/S4306400194 |
| best_oa_location.source.issn | |
| best_oa_location.source.type | repository |
| best_oa_location.source.is_oa | True |
| best_oa_location.source.issn_l | |
| best_oa_location.source.is_core | False |
| best_oa_location.source.is_in_doaj | False |
| best_oa_location.source.display_name | arXiv (Cornell University) |
| best_oa_location.source.host_organization | https://openalex.org/I205783295 |
| best_oa_location.source.host_organization_name | Cornell University |
| best_oa_location.source.host_organization_lineage | https://openalex.org/I205783295 |
| best_oa_location.license | |
| best_oa_location.pdf_url | https://arxiv.org/pdf/2310.17342 |
| best_oa_location.version | submittedVersion |
| best_oa_location.raw_type | text |
| best_oa_location.license_id | |
| best_oa_location.is_accepted | False |
| best_oa_location.is_published | False |
| best_oa_location.raw_source_name | |
| best_oa_location.landing_page_url | http://arxiv.org/abs/2310.17342 |
| primary_location.id | pmh:oai:arXiv.org:2310.17342 |
| primary_location.is_oa | True |
| primary_location.source.id | https://openalex.org/S4306400194 |
| primary_location.source.issn | |
| primary_location.source.type | repository |
| primary_location.source.is_oa | True |
| primary_location.source.issn_l | |
| primary_location.source.is_core | False |
| primary_location.source.is_in_doaj | False |
| primary_location.source.display_name | arXiv (Cornell University) |
| primary_location.source.host_organization | https://openalex.org/I205783295 |
| primary_location.source.host_organization_name | Cornell University |
| primary_location.source.host_organization_lineage | https://openalex.org/I205783295 |
| primary_location.license | |
| primary_location.pdf_url | https://arxiv.org/pdf/2310.17342 |
| primary_location.version | submittedVersion |
| primary_location.raw_type | text |
| primary_location.license_id | |
| primary_location.is_accepted | False |
| primary_location.is_published | False |
| primary_location.raw_source_name | |
| primary_location.landing_page_url | http://arxiv.org/abs/2310.17342 |
| publication_date | 2023-10-26 |
| publication_year | 2023 |
| referenced_works_count | 0 |
| abstract_inverted_index.a | 54, 62 |
| abstract_inverted_index.We | 17, 60 |
| abstract_inverted_index.in | 12, 24 |
| abstract_inverted_index.is | 82 |
| abstract_inverted_index.of | 21 |
| abstract_inverted_index.on | 129 |
| abstract_inverted_index.to | 8, 30, 57, 66, 105 |
| abstract_inverted_index.we | 47, 85, 99 |
| abstract_inverted_index.API | 90 |
| abstract_inverted_index.Our | 80, 124 |
| abstract_inverted_index.SQL | 38, 96 |
| abstract_inverted_index.The | 110 |
| abstract_inverted_index.and | 15, 28, 71 |
| abstract_inverted_index.can | 118 |
| abstract_inverted_index.dev | 132 |
| abstract_inverted_index.one | 95 |
| abstract_inverted_index.our | 49, 101, 121 |
| abstract_inverted_index.set | 133 |
| abstract_inverted_index.the | 19, 25, 32, 41, 73, 88, 106, 115, 130 |
| abstract_inverted_index.use | 87 |
| abstract_inverted_index.SOTA | 127 |
| abstract_inverted_index.been | 6 |
| abstract_inverted_index.call | 91 |
| abstract_inverted_index.from | 120 |
| abstract_inverted_index.have | 5, 9 |
| abstract_inverted_index.need | 77 |
| abstract_inverted_index.once | 92 |
| abstract_inverted_index.only | 86 |
| abstract_inverted_index.show | 113 |
| abstract_inverted_index.task | 27 |
| abstract_inverted_index.that | 114 |
| abstract_inverted_index.thus | 72 |
| abstract_inverted_index.when | 36, 93 |
| abstract_inverted_index.with | 53 |
| abstract_inverted_index.(CoT) | 51 |
| abstract_inverted_index.LLMs' | 33, 89, 116 |
| abstract_inverted_index.Large | 1 |
| abstract_inverted_index.among | 134 |
| abstract_inverted_index.named | 64 |
| abstract_inverted_index.since | 84 |
| abstract_inverted_index.study | 18 |
| abstract_inverted_index.task. | 109 |
| abstract_inverted_index.whole | 74 |
| abstract_inverted_index.(LLMs) | 4 |
| abstract_inverted_index.Models | 3 |
| abstract_inverted_index.Spider | 131 |
| abstract_inverted_index.design | 48 |
| abstract_inverted_index.extend | 100 |
| abstract_inverted_index.manual | 78 |
| abstract_inverted_index.method | 56, 63, 104 |
| abstract_inverted_index.prompt | 22, 52 |
| abstract_inverted_index.proven | 7 |
| abstract_inverted_index.query. | 97 |
| abstract_inverted_index.schema | 58 |
| abstract_inverted_index.strong | 10 |
| abstract_inverted_index.tasks. | 16 |
| abstract_inverted_index.ACT-SQL | 65, 122 |
| abstract_inverted_index.Besides | 40 |
| abstract_inverted_index.ability | 35 |
| abstract_inverted_index.attempt | 29 |
| abstract_inverted_index.benefit | 119 |
| abstract_inverted_index.doesn't | 76 |
| abstract_inverted_index.domains | 14 |
| abstract_inverted_index.improve | 31 |
| abstract_inverted_index.problem | 20 |
| abstract_inverted_index.process | 75 |
| abstract_inverted_index.provide | 61 |
| abstract_inverted_index.results | 112 |
| abstract_inverted_index.similar | 55 |
| abstract_inverted_index.trivial | 42 |
| abstract_inverted_index.various | 13 |
| abstract_inverted_index.Language | 2 |
| abstract_inverted_index.Recently | 0 |
| abstract_inverted_index.achieves | 126 |
| abstract_inverted_index.approach | 81, 125 |
| abstract_inverted_index.auto-CoT | 69 |
| abstract_inverted_index.existing | 135 |
| abstract_inverted_index.few-shot | 43 |
| abstract_inverted_index.generate | 68 |
| abstract_inverted_index.learning | 45, 103, 137 |
| abstract_inverted_index.linking. | 59 |
| abstract_inverted_index.queries. | 39 |
| abstract_inverted_index.setting, | 46 |
| abstract_inverted_index.abilities | 11 |
| abstract_inverted_index.approach. | 123 |
| abstract_inverted_index.designing | 23 |
| abstract_inverted_index.exemplars | 70 |
| abstract_inverted_index.labeling. | 79 |
| abstract_inverted_index.reasoning | 34 |
| abstract_inverted_index.experiment | 111 |
| abstract_inverted_index.generating | 37, 94 |
| abstract_inverted_index.in-context | 44, 102, 136 |
| abstract_inverted_index.multi-turn | 107 |
| abstract_inverted_index.approaches. | 138 |
| abstract_inverted_index.cost-saving | 83 |
| abstract_inverted_index.performance | 117, 128 |
| abstract_inverted_index.text-to-SQL | 26, 108 |
| abstract_inverted_index.Furthermore, | 98 |
| abstract_inverted_index.automatically | 67 |
| abstract_inverted_index.chain-of-thought | 50 |
| cited_by_percentile_year | |
| countries_distinct_count | 0 |
| institutions_distinct_count | 5 |
| citation_normalized_percentile |