SUQL: Conversational Search over Structured and Unstructured Data with Large Language Models

Shicheng Liu, Jialiang Xu, Wesley Tjangnaka, Sina J. Semnani, Chen Jie Yu +1 more
11/16/2023
cs.CLcs.PL

No official code found. Best implementation: stanford-oval/suql (308 stars, Apache-2.0, last commit 2026-04-25).

Abstract

While most conversational agents are grounded on either free-text or structured knowledge, many knowledge corpora consist of hybrid sources. This paper presents the first conversational agent that supports the full generality of hybrid data access for large knowledge corpora, through a language we developed called SUQL (Structured and Unstructured Query Language). Specifically, SUQL extends SQL with free-text primitives (summary and answer), so information retrieval can be composed with structured data accesses arbitrarily in a formal, succinct, precise, and interpretable notation. With SUQL, we propose the first semantic parser, an LLM with in-context learning, that can handle hybrid data sources. Our in-context learning-based approach, when applied to the HybridQA dataset, comes within 8.9% exact match and 7.1% F1 of the SOTA, which was trained on 62K data samples. More significantly, unlike previous approaches, our technique is applicable to large databases and free-text corpora. We introduce a dataset consisting of crowdsourced questions and conversations on Yelp, a large, real restaurant knowledge base with structured and unstructured data. We show that our few-shot conversational agent based on SUQL finds an entity satisfying all user requirements 90.3% of the time, compared to 63.4% for a baseline based on linearization.

View on arXivView PDF

Code Implementations(1)

stanford-oval/suqlCommunity100%
Apache-2.0

SUQL: Conversational Search over Structured and Unstructured Data with LLMs

30839Python, PLpgSQLNov 16, 20236 months agoApache-2.0

Similar Papers

Cite this paper

@article{liu2023suql,
  title  = {SUQL: Conversational Search over Structured and Unstructured Data with Large Language Models},
  author = {Shicheng Liu and Jialiang Xu and Wesley Tjangnaka and Sina J. Semnani and Chen Jie Yu and Monica S. Lam},
  year   = {2023},
  eprint = {2311.09818},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.09818v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.09818.svg)](https://codeofpaper.com/paper/2311.09818)

Discussion