arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.25149cs.AI
收藏

语义层用于可靠的LLM驱动数据分析:在三个前沿模型上准确性和幻觉的配对基准测试

Semantic Layers for Reliable LLM-Powered Data Analytics: A Paired Benchmark of Accuracy and Hallucination Across Three Frontier Models

Cube(Cube公司)

Michael Rumiantsau, Ivan Fokeev

AI总结:

本文通过在三个前沿LLM上测试语义层对自然语言查询准确性的影响,发现添加语义描述可显著提升性能,且模型选择对结果影响较小。

摘要:

部署用于自然语言查询分析数据库的LLM存在两个交织的失败:错误答案和自信的幻觉,根源在于模型被迫推断数据库模式未编码的业务语义。我们测试是否通过提供这些语义作为上下文来缩小差距。我们对三个前沿LLM(Claude Opus 4.7、Claude Sonnet 4.6、GPT-5.4)在Cleaned Contoso Retail Dataset上进行100个自然语言问题的基准测试,使用配对单次协议。每个模型评估两次:一次仅给仓库模式,一次给模式加一个4KB手动编写Markdown文档描述数据集的度量、惯例和歧义规则。添加文档使所有三个模型的准确性提高17至23个百分点。有文档时,三个模型在统计上不可区分(67.7-68.7%);无文档时同样不可区分(45.5-50.5%)。每组交叉比较在p < 0.01下显著。语义层文档的存在几乎解释了所有显著的变异;同一层级内的模型选择不影响结果。我们将其解释为结构性结果:显式业务语义通过改变模型被要求执行的任务,而不是使模型更强大,来抑制文本到SQL错误的主要类别。

英文摘要:

LLMs deployed for natural-language querying of analytical databases suffer from two intertwined failures - incorrect answers and confident hallucinations - both rooted in the same cause: the model is forced to infer business semantics that the schema does not encode. We test whether supplying those semantics as context closes the gap. We benchmark three frontier LLMs (Claude Opus 4.7, Claude Sonnet 4.6, GPT-5.4) on 100 natural-language questions over the Cleaned Contoso Retail Dataset in ClickHouse, using a paired single-shot protocol. Each model is evaluated twice: once given only the warehouse schema, and once given the schema plus a 4 KB hand-authored markdown document describing the dataset's measures, conventions, and disambiguation rules. Adding the document improves accuracy by +17 to +23 percentage points across all three models. With it, the three models are statistically indistinguishable (67.7-68.7%); without it, they are also indistinguishable (45.5-50.5%). Every cross-cluster comparison is significant at p < 0.01. The presence of the semantic-layer document accounts for essentially all of the significant variance; model choice within tier does not. We interpret this as a structural result: explicit business semantics suppress the dominant class of text-to-SQL errors not by making the model more capable, but by changing what the model is being asked to do.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑