mlsanityData to 7 Oct 2026

Querying Large Language Models with SQL

arXiv 2304.00472 ↗First posted 2 Apr 2023cs.DB cs.AIcited by 13

Not on the map. Why?

Abstract (arXiv)

In many use-cases, information is stored in text but not available in structured data. However, extracting data from natural language text to precisely fit a schema, and thus enable querying, is a challenging task. With the rise of pre-trained Large Language Models (LLMs), there is now an effective solution to store and use information extracted from massive corpora of text documents. Thus, we envision the use of SQL queries to cover a broad range of data that is not captured by traditional databases by tapping the information in LLMs. To ground this vision, we present Galois, a prototype based on a traditional database architecture, but with new physical operators for querying the underlying LLM. The main idea is to execute some operators of the the query plan with prompts that retrieve data from the LLM. For a large class of SQL queries, querying LLMs returns well structured relations, with encouraging qualitative results. Preliminary experimental results make pre-trained LLMs a promising addition to the field of database systems, introducing a new direction for hybrid query processing. However, we pinpoint several research challenges that must be addressed to build a DBMS that exploits LLMs. While some of these challenges necessitate integrating concepts from the NLP literature, others offer novel research avenues for the DB community.

Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 30 of its 62 references that are in the map. First posted on arXiv 2 Apr 2023.

Builds on

30 of 62 references.

References · 30

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2022Training language models to follow instructions with human feedbackcited by 15,712
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  5. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  6. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
  7. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
  8. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
  9. 2022Survey of Hallucination in Natural Language Generationcited by 2,056
  10. 2019Language Models as Knowledge Bases?cited by 1,922
  11. 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,359
  12. 2021Improving language models by retrieving from trillions of tokenscited by 1,278
18 more
  1. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  2. 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
  3. 2022Mass-Editing Memory in a Transformercited by 976
  4. 2023BloombergGPT: A Large Language Model for Financecited by 923
  5. 2020How Much Knowledge Can You Pack Into the Parameters of a Language Model?cited by 713
  6. 2021Editing Factual Knowledge in Language Modelscited by 548
  7. 2020TAPAS: Weakly Supervised Table Parsing via Pre-trainingcited by 432
  8. 2021Measuring and Improving Consistency in Pretrained Language Modelscited by 361
  9. 2023Check Your Facts and Try Again: Improving Large Language Models with External Knowledge and Automated Feedbackcited by 351
  10. 2022Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLPcited by 316
  11. 2021Factual Probing Is [MASK]: Learning vs. Learning to Recallcited by 291
  12. 2021Mind the Gap: Assessing Temporal Generalization in Neural Language Modelscited by 226
  13. 2022Can Foundation Models Wrangle Your Data?cited by 173
  14. 2020Break It Down: A Question Understanding Benchmarkcited by 131
  15. 2022Attributed Question Answering: Evaluation and Modeling for Attributed Large Language Modelscited by 108
  16. 2017Cross-Sentence N-ary Relation Extraction with Graph LSTMscited by 101
  17. 2021QA Dataset Explosion: A Taxonomy of NLP Resources for Question Answering and Reading Comprehensioncited by 91
  18. 2022Evaluating the Factual Consistency of Large Language Models Through News Summarizationcited by 90

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 4; 2024: 4; 2025: 4; 2026: 1.

13 papers.

Sort:

By area: