Querying Large Language Models with SQL

04/02/2023
by   Mohammed Saeed, et al.
5

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/29/2022

A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future Directions

Text-to-SQL parsing is an essential and challenging task. The goal of te...
research
10/19/2022

N-Best Hypotheses Reranking for Text-To-SQL Systems

Text-to-SQL task maps natural language utterances to structured queries ...
research
10/14/2020

Neural Databases

In recent years, neural networks have shown impressive performance gains...
research
11/25/2022

MavVStream: Extending Database Capabilities for Situation Monitoring Using Extracted Video Contents

Query-based video situation detection (as opposed to manual or customize...
research
06/15/2023

Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generation

Zero-shot NL2SQL is crucial in achieving natural language to SQL that is...
research
12/21/2021

DB-BERT: a Database Tuning Tool that "Reads the Manual"

DB-BERT is a database tuning tool that exploits information gained via n...
research
09/12/2022

Optimising Fine-Grained Access Control Policy Enforcement for Database Queries. A Model-Driven Approach

Recently, we have proposed a model-driven approach for enforcing fine-gr...

Please sign up or login with your details

Forgot password? Click here to reset