论文

通过语义层与确定性编译器生成企业SQL查询

A Semantic-Layer-Mediated Agent for Natural Language to SQL over Heterogeneous Enterprise Databases

上下文与知识知识库AI语义层

摘要

研究让Agent先在整理过的语义层上生成SMQ中间表示,再由确定性编译器转换为SQLite、BigQuery或Snowflake查询;在Spider2-snow任务中比较执行准确率。 模型负责表达查询意图,编译器负责落实既定计算规则,业务含义与物理SQL实现可以分别维护。

通过语义层与确定性编译器生成企业SQL查询原论文配图
Fig. 1: End-to-end architecture. The orchestrator dispatches NL questions to the QUVI service, which runs the agent loop over the semantic layer. SMQs are compiled to SQL by the engine; the final SQL is routed by instance prefix to the SQLite, BigQuery, or Snowflake executor. Results are written to submission files and scored by the Spider2 evaluation suite.