From dfbcd2af8acbf54ffbf08501d20e17b005345a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=94=AF?= Date: Tue, 24 Nov 2026 16:41:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=83=E5=AD=97=E6=AE=B5=EF=BC=9Asp?= =?UTF-8?q?ecificity=20=E9=80=90=E6=9D=A1=E9=AA=8C=E5=85=AC=E5=BC=8F?= =?UTF-8?q?=EF=BC=88pre/anchors/factor/post/pos=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 牧尘 2026-11-24 16:4x 判决:关 gate A/B 不在生产实例上做,重启预算改花 debug 字段。 问题:specificityAnchors 返回 int 且只有 4 个 if ⇒ 可达因子集 = {1.0,1.1,1.2,1.3,1.4}, 最大 1.4。但实测比 1.4377(a12)/ 1.0714(然后呢)均不可达 ⇒ 三个活解释: ① anchors 是加权 float(grep 已否:是 int) ② base 非同源(debug 的 top_score 不一定是这里的 pre) ③ 存在第二乘子 本字段就是判别器:pre = 应用前的真实分数、anchors = 因子来源、post = 应用后。 行为不变(只多打日志),持续采样,卡三不污染(影子与 bench 在秤上)。 --- go/internal/storage/recall.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/go/internal/storage/recall.go b/go/internal/storage/recall.go index 34b5439..7cbeae0 100644 --- a/go/internal/storage/recall.go +++ b/go/internal/storage/recall.go @@ -1280,6 +1280,17 @@ func (p *RecallPipeline) recallUncached(ctx context.Context, query, namespace st if idx >= 0 && idx < len(candidates) { f := specificityFactor(candidates[idx].Content, &candidates[idx]) if f != 1.0 { + // ⑦ 逐条验公式(2026-11-24 16:4x 牧尘判决:关 gate 改道 debug 字段) + // + // 问题:整数锚点下可达因子集 = {1.0,1.1,1.2,1.3,1.4}, + // 但实测比 1.4377 / 1.0714 均不可达 ⇒ 存在第三解释: + // ① base 非同源(debug 的 top_score 不是这里的 pre) + // ② 存在第二乘子 + // 这两个字段就是判别器:pre 是应用前的真实分数,anchors 是因子来源。 + // 行为不变(只多打日志),持续采样,卡三不污染。 + pre := reranked[i].Score + log.Printf("[recall][specificity] q=%q id=%s anchors=%d pre=%.6f factor=%.4f post=%.6f pos=%d", + query, candidates[idx].ID, specificityAnchors(candidates[idx].Content), pre, f, pre*f, i) reranked[i].Score *= f if f < 1.0 { demoted++