为生成式BI描述数据表和业务语义,提高大模型生成准确SQL的效率
明确告知大模型字段类型、字段属于维度还是度量、关联键信息、维度枚举值的业务含义以及枚举值是否可穷举;使用数据库中的真实值替代问题中的条件,并正确应用指标过滤条件。例如,将“上海地区”映射为 shanghai,将“男装”映射为 IN ('boy shirt', 'boy shoes', 'boy pants', 'boy coat'),且销售金额仅统计 status = 'finished' 的已完成订单。
The Fusion Tax: A Diagnostic Analysis of When Hybrid Retrieval Hurts
Aaditya Chauhan · Arun Agarwal
混合检索将稀疏词法检索器与稠密神经检索器结合;2026 年 9 月调查的软件文档普遍基于总体收益推荐这种方法,并通常采用倒数排名融合(RRF)。分析在标准 Anserini BM25、5 个覆盖 22M–596M 参数及三代模型的稠密编码器、SPLADE 学习稀疏方案、cross-encoder 二阶段及 7 个 BEIR 数据集上比较 3 种融合函数,并将“不融合”视为独立结果。即便最佳的稠密加权分数插值,在 13%–48% 的查询中将相关文档排在两个组成方法中较差者之后,在 8%–21% 的查询中落后于可部署的纯稠密检索器;采用跨语料库留一验证选择权重后,对应为 14%–48% 和 11%–25%。不过,使用主编码器时,其在所有语料库的总体表现均优于纯稠密检索;风险敏感评估显示,7 个语料库中有 6 个存在显著下行风险。此损失被称为融合税,主要影响排序但总体保持召回率,常发生于仅一个检索器覆盖的查询,并持续存在于不同编码器和 SPLADE 替代方案中。RRF 在稠密检索器明显更强时税负更高,仅在两个组成方法实力接近时超过纯稠密检索。语料库内部可 weakly 预测融合失败,但跨语料库迁移不可靠,因为预测特征会随稀疏—稠密平衡改变符号。cross-encoder 仅在其自身可靠时能挽回部分损失。
尚无解读。
arXiv:2610.30612v1 Announce Type: cross Abstract: Hybrid retrieval, which fuses a sparse lexical retriever with a dense neural one, is widely recommended in the software documentation surveyed in September 2026, usually with reciprocal rank fusion (RRF), on the strength of aggregate gains. We ask what fusion costs on individual queries, treating "do not fuse" as a first-class outcome, in the setting in which hybrid retrieval is deployed: a standard Anserini BM25, five dense encoders spanning 22M-596M parameters and three model generations, a learned-sparse (SPLADE) alternative, and a cross-encoder second stage, on seven BEIR datasets and three fusion functions. Even the best method, dense-weighted score interpolation, ranks relevant documents below the better of its two components on 13-48% of queries and below the deployable dense-only retriever on 8-21% (14-48% and 11-25% at a weight selected under leave-one-corpus-out validation), while beating dense-only in aggregate on every corpus with the primary encoder; the downside is significant under loss-averse risk-sensitive evaluation on six of the seven corpora. We call this loss the fusion tax. It is mostly a ranking effect that preserves recall in aggregate, it is most likely on the queries that only one retriever covers, and it persists across the encoder ladder and the SPLADE substitution. RRF carries the higher tax wherever the dense retriever is clearly stronger and only beats dense-only where the two components are balanced. Fusion failure is weakly predictable within a corpus but transfers unreliably across corpora, because the features that predict it change sign with the sparse-dense balance. A cross-encoder recovers part of the tax only where it is itself reliable. We distill these findings into guidance that keys the fusion decision to the measured sparse-dense balance of the target corpus.
明确告知大模型字段类型、字段属于维度还是度量、关联键信息、维度枚举值的业务含义以及枚举值是否可穷举;使用数据库中的真实值替代问题中的条件,并正确应用指标过滤条件。例如,将“上海地区”映射为 shanghai,将“男装”映射为 IN ('boy shirt', 'boy shoes', 'boy pants', 'boy coat'),且销售金额仅统计 status = 'finished' 的已完成订单。
LLM 角色和任务描述 Freewheel 广告业务介绍 术语黑话映射表: 包括了常见的黑话和通过 RAG 方式召回的部分 数据目录与仓库概述 候选表和列:也就是上一步召回的表和列,包括每个表的描述和选表逻辑 通用选表规则:应该遵守的规则,例如什么时候应该选择事实表或者维度表,什么时候应该选择多张表 选表样例:我们收集了多样化的问题并标注了最优选择的表,存储到选表样例向量数据库中,通过 RAG 的方式找到和用户提问相似的例子。