让大模型查询数据库更可靠,自动修复结构错误。
DynaQuery: A Self-Adapting Framework for Querying Structured and Multimodal Data
- 引入自适应的结构感知引擎,提前识别并修正数据模式
- 实测显示可几乎消除因结构误判导致的错误查询
- 适合需要高可靠性自然语言数据库接口的开发者
大型语言模型(LLMs)的兴起加速了通过自然语言查询复杂混合数据库的目标。然而,这一目标面临双重挑战:同时处理结构化多关系模式和关联的非结构化内容语义。为此,我们提出DynaQuery——一种统一且自适应的框架,作为下一代“无界数据库”的实用蓝图。核心是全新的系统原语Schema Introspection and Linking Engine(SILE),将模式链接提升为查询规划的关键阶段。我们在多个基准上对这种结构感知架构与主流的非结构化检索增强生成(RAG)范式进行严格对比评估。结果表明,纯非结构化检索范式在架构上易受灾难性上下文失败影响,如SCHEMA_HALLUCINATION,导致查询不可靠。相比之下,基于SILE的设计建立了更稳健的基础,几乎完全消除了该故障模式。此外,在一个新构建的复杂基准上进行的端到端验证揭示了一个关键泛化原则:从纯粹的模式感知过渡到全面的语义感知。综合来看,这些发现为开发稳健、自适应且可预测一致的自然语言数据库接口提供了经验证的架构基础。
原文摘要 · Abstract (English)
The rise of Large Language Models (LLMs) has accelerated the long-standing goal of enabling natural language querying over complex, hybrid databases. Yet, this ambition exposes a dual challenge: reasoning jointly over structured, multi-relational schemas and the semantic content of linked unstructured assets. To overcome this, we present DynaQuery - a unified, self-adapting framework that serves as a practical blueprint for next-generation "Unbound Databases." At the heart of DynaQuery lies the Schema Introspection and Linking Engine (SILE), a novel systems primitive that elevates schema linking to a first-class query planning phase. We conduct a rigorous, multi-benchmark empirical evaluation of this structure-aware architecture against the prevalent unstructured Retrieval-Augmented Generation (RAG) paradigm. Our results demonstrate that the unstructured retrieval paradigm is architecturally susceptible to catastrophic contextual failures, such as SCHEMA_HALLUCINATION, leading to unreliable query generation. In contrast, our SILE-based design establishes a substantially more robust foundation, nearly eliminating this failure mode. Moreover, end-to-end validation on a complex, newly curated benchmark uncovers a key generalization principle: the transition from pure schema-awareness to holistic semantics-awareness. Taken together, our findings provide a validated architectural basis for developing natural language database interfaces that are robust, adaptable, and predictably consistent.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。