先消歧再解析,提升自然语言到SQL的语义理解准确率
Disambiguate First, Parse Later: Generating Interpretations for Ambiguity Resolution in Semantic Parsing
- 分步处理:先生成自然语言解释消歧,再转为逻辑形式
- 在多个数据集上覆盖率达92.3%,显著高于基线模型
- 适合需要高精度语义解析的应用场景,如智能数据库查询
自然语言接口中的歧义与不明确性是重要挑战,尤其在文本转SQL任务中。本文提出一种模块化方法,在映射到逻辑形式(如SQL)前,先通过自然语言解释解决歧义。尽管大模型对无歧义语句表现良好,但对有歧义语句存在强烈偏好,通常仅输出首选解释。我们利用这一偏差生成初始的偏好消歧结果,并引入专用填充模型识别并补全缺失解释。为训练该模型,我们设计一种基于SQL执行验证不同含义的标注方法。实验表明,该方法提升了解释覆盖率,且在不同标注风格、数据库结构和歧义类型的数据集间具有良好泛化能力。
原文摘要 · Abstract (English)
Handling ambiguity and underspecification is an important challenge in natural language interfaces, particularly for tasks like text-to-SQL semantic parsing. We propose a modular approach that resolves ambiguity using natural language interpretations before mapping these to logical forms (e.g., SQL queries). Although LLMs excel at parsing unambiguous utterances, they show strong biases for ambiguous ones, typically predicting only preferred interpretations. We constructively exploit this bias to generate an initial set of preferred disambiguations and then apply a specialized infilling model to identify and generate missing interpretations. To train the infilling model, we introduce an annotation method that uses SQL execution to validate different meanings. Our approach improves interpretation coverage and generalizes across datasets with different annotation styles, database structures, and ambiguity types.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。