Querying Large Language Models with SQL
- URL: http://arxiv.org/abs/2304.00472v3
- Date: Wed, 25 Oct 2023 08:55:30 GMT
- Title: Querying Large Language Models with SQL
- Authors: Mohammed Saeed, Nicola De Cao, Paolo Papotti
- Abstract summary: In many use-cases, information is stored in text but not available in structured data.
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.
We present Galois, a prototype based on a traditional database architecture, but with new physical operators for querying the underlying LLM.
- Score: 16.383179496709737
- License: http://creativecommons.org/licenses/by-nc-sa/4.0/
- Abstract: 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.
Related papers
- BEAVER: An Enterprise Benchmark for Text-to-SQL [6.3900786001871195]
Existing text-to-generated benchmarks have largely been constructed using publicly available tables from the web.
In this paper, we apply off-the-shelf LLMs to a benchmark containing enterprise data warehouse data.
As we will show, the reasons for poor performance are largely due to three characteristics.
arXiv Detail & Related papers (2024-09-03T16:37:45Z) - Relational Database Augmented Large Language Model [59.38841050766026]
Large language models (LLMs) excel in many natural language processing (NLP) tasks.
They can only incorporate new knowledge through training or supervised fine-tuning processes.
This precise, up-to-date, and private information is typically stored in relational databases.
arXiv Detail & Related papers (2024-07-21T06:19:10Z) - RB-SQL: A Retrieval-based LLM Framework for Text-to-SQL [48.516004807486745]
Large language models (LLMs) with in-context learning have significantly improved the performance of text-to- task.
We propose RB-, a novel retrieval-based framework for in-context prompt engineering.
Experiment results demonstrate that our model achieves better performance than several competitive baselines on public datasets BIRD and Spider.
arXiv Detail & Related papers (2024-07-11T08:19:58Z) - UQE: A Query Engine for Unstructured Databases [71.49289088592842]
We investigate the potential of Large Language Models to enable unstructured data analytics.
We propose a new Universal Query Engine (UQE) that directly interrogates and draws insights from unstructured data collections.
arXiv Detail & Related papers (2024-06-23T06:58:55Z) - Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL [15.75829309721909]
Generating accuratesql from natural language questions (text-to-) is a long-standing challenge.
PLMs have been developed and utilized for text-to- tasks, achieving promising performance.
Recently, large language models (LLMs) have demonstrated significant capabilities in natural language understanding.
arXiv Detail & Related papers (2024-06-12T17:13:17Z) - Knowledge-to-SQL: Enhancing SQL Generation with Data Expert LLM [15.888784472807775]
Existing methods rely on the comprehensive capability of large language models (LLMs) to generate queries.
We propose the Knowledge-to- Data Expert framework, which employs tailored knowledge for all text-to- models.
arXiv Detail & Related papers (2024-02-18T09:10:04Z) - Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation [76.76046657162306]
Large language models (LLMs) have emerged as a new paradigm for Text-to- task.
Large language models (LLMs) have emerged as a new paradigm for Text-to- task.
arXiv Detail & Related papers (2023-08-29T14:59:54Z) - SQL-PaLM: Improved Large Language Model Adaptation for Text-to-SQL (extended) [53.95151604061761]
This paper introduces the framework for enhancing Text-to- filtering using large language models (LLMs)
With few-shot prompting, we explore the effectiveness of consistency decoding with execution-based error analyses.
With instruction fine-tuning, we delve deep in understanding the critical paradigms that influence the performance of tuned LLMs.
arXiv Detail & Related papers (2023-05-26T21:39:05Z) - Allies: Prompting Large Language Model with Beam Search [107.38790111856761]
In this work, we propose a novel method called ALLIES.
Given an input query, ALLIES leverages LLMs to iteratively generate new queries related to the original query.
By iteratively refining and expanding the scope of the original query, ALLIES captures and utilizes hidden knowledge that may not be directly through retrieval.
arXiv Detail & Related papers (2023-05-24T06:16:44Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.