Many knowledge sources consist of both structured information such as relational databases as well as unstructured free text. Building a conversational interface to such data sources is challenging. This paper introduces SUQL, Structured and Unstructured Query Language, the first formal executable representation that naturally covers compositions of structured and unstructured data queries. Specifically, it augments SQL with several free-text primitives to form a precise, succinct, and expressive representation. This paper also presents a conversational search agent based on large language models, including a few-shot contextual semantic parser for SUQL. To validate our approach, we introduce a dataset consisting of crowdsourced questions and conversations about real restaurants. Over 51% of the questions in the dataset require both structured and unstructured data, suggesting that it is a common phenomenon. We show that our few-shot conversational agent based on SUQL finds an entity satisfying all user requirements 89.3% of the time, compared to just 65.0% for a strong and commonly used baseline.
翻译:许多知识源同时包含结构化信息(如关系数据库)和非结构化自由文本。构建面向此类数据源的对话接口极具挑战性。本文提出SUQL(结构化与非结构化查询语言),这是首个能够自然覆盖结构化与非结构化数据查询组合的正式可执行表示方法。具体而言,该方法通过扩展SQL的多个自由文本原语,形成精确、简洁且具表达力的表示形式。本文还提出一种基于大语言模型的对话式检索智能体,包含针对SUQL的小样本上下文语义解析器。为验证该方法,我们引入了一个包含真实餐厅众包问题与对话的数据集。其中超过51%的问题同时需要结构化与非结构化数据,表明这是普遍现象。实验表明,基于SUQL的小样本对话智能体在满足用户全部需求的实体检索中达89.3%的成功率,而强基线的常用方法仅为65.0%。