Natural language interfaces often require supervised data to translate user requests into programs, database queries, or other structured intent representations. During data collection, it can be difficult to anticipate and formalize the full range of user needs -- for example, in a system designed to handle simple requests (like $\textit{find my meetings tomorrow}$ or $\textit{move my meeting with my manager to noon})$, users may also express more elaborate requests (like $\textit{swap all my calls on Monday and Tuesday}$). We introduce an approach for equipping a simple language-to-code model to handle complex utterances via a process of hierarchical natural language decomposition. Our approach uses a pre-trained language model to decompose a complex utterance into a sequence of smaller natural language steps, then interprets each step using the language-to-code model. To test our approach, we collect and release DeCU -- a new NL-to-program benchmark to evaluate Decomposition of Complex Utterances. Experiments show that the proposed approach enables the interpretation of complex utterances with almost no complex training data, while outperforming standard few-shot prompting approaches.
翻译:自然语言接口通常需要监督数据,将用户请求转化为程序、数据库查询或其他结构化意图表示。在数据收集过程中,很难预先预测并形式化用户需求的全部范围——例如,在一个旨在处理简单请求(如“查找我明天的会议”或“将我与经理的会议改到中午”)的系统中,用户也可能表达更复杂的请求(如“交换我周一和周二的所有通话”)。我们提出了一种方法,通过分层自然语言分解的过程,为简单的语言到代码模型赋予处理复杂语句的能力。我们的方法利用预训练语言模型将复杂语句分解为一系列较小的自然语言步骤,然后使用语言到代码模型解释每个步骤。为测试我们的方法,我们收集并发布了DeCU——一个用于评估复杂语句分解的新型自然语言到程序基准。实验表明,所提出的方法几乎不需要复杂的训练数据即可实现复杂语句的解释,同时优于标准的少样本提示方法。