@ssamurias/dsh-fish 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +13 -4
- package/CHANGELOG.md +70 -0
- package/README.md +10 -1
- package/RELEASE-NOTES-1.1.6.md +57 -0
- package/lib/ask.js +7 -1
- package/lib/claim.js +23 -0
- package/lib/client.js +243 -71
- package/lib/cue.js +99 -23
- package/lib/derive.js +49 -5
- package/lib/events.js +28 -0
- package/lib/handoff.js +9 -1
- package/lib/home.js +4 -0
- package/lib/index.js +9 -3
- package/lib/memorymap-html.js +1 -1
- package/lib/move.js +68 -8
- package/lib/observe-bili.js +32 -2
- package/lib/observe-config.js +14 -2
- package/lib/observe-data.js +3 -1
- package/lib/observe-home.js +13 -3
- package/lib/observe-state.js +3 -2
- package/lib/proactive.js +4 -2
- package/lib/quality.js +202 -48
- package/lib/recall.js +69 -23
- package/lib/reset-pending.js +15 -5
- package/lib/reset.js +78 -0
- package/lib/retire.js +42 -1
- package/lib/say.js +4 -0
- package/lib/scheduler.js +32 -27
- package/lib/selfdoc.js +1 -1
- package/lib/settings.js +148 -31
- package/lib/status.js +1 -1
- package/lib/timeintent.js +178 -0
- package/lib/types.d.ts +1 -0
- package/lib/wiki.js +63 -8
- package/package.json +4 -1
- package/tools/README.md +70 -0
- package/tools/recall-bench.mjs +240 -0
- package/tools/recall-cases.json +64 -0
- package/tools/recall-live-cases.json +20 -0
- package/lib/client/00-shell.js +0 -630
- package/lib/client/01-state-load.js +0 -968
- package/lib/client/02-actions.js +0 -692
- package/lib/client/03-widgets-header.js +0 -749
- package/lib/client/04-pressure-lab.js +0 -906
- package/lib/client/05-pressure-charts.js +0 -431
- package/lib/client/06-tab-status-grow.js +0 -479
- package/lib/client/07-tab-home-bili.js +0 -610
- package/lib/client/08-tab-memory-plugins.js +0 -676
- package/lib/client/09-tab-outing.js +0 -797
- package/lib/client/10-data-handlers.js +0 -519
- package/lib/client/11-tab-data-frame.js +0 -812
- package/lib/client/12-pressure-chip-mount.js +0 -579
- package/scripts/build-client.mjs +0 -97
- package/scripts/sync-pressure-formulas.mjs +0 -14
package/tools/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# 检索考卷(C1)
|
|
2
|
+
|
|
3
|
+
只读的检索回归工具。不改 `events.jsonl`,不改 `lib/recall.js` 的排序,不调用模型。
|
|
4
|
+
|
|
5
|
+
## 跑法
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# 冻结夹具:题目、事件、时间都在 JSON 里,结果可复现
|
|
9
|
+
node tools/recall-bench.mjs
|
|
10
|
+
|
|
11
|
+
# 对当前 ~/.dsh-fish 的真实事件跑(观察漂移,不当 CI 门槛)
|
|
12
|
+
node tools/recall-bench.mjs --live
|
|
13
|
+
|
|
14
|
+
# 机器可读
|
|
15
|
+
node tools/recall-bench.mjs --json
|
|
16
|
+
|
|
17
|
+
# 逐题打印前 5 条
|
|
18
|
+
node tools/recall-bench.mjs --verbose
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
换一个数据目录:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
node tools/recall-bench.mjs --live --root "C:\Users\你\.dsh-fish"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 两类题
|
|
28
|
+
|
|
29
|
+
| 文件 | 用途 | 会随她生长变化吗 |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| `recall-cases.json` | 冻结夹具,19 条事件、32 道题 | 不会 |
|
|
32
|
+
| `recall-live-cases.json` | 当前真实事件里挑的 13 道题 | 会 |
|
|
33
|
+
|
|
34
|
+
冻结夹具里五类:
|
|
35
|
+
|
|
36
|
+
- **正题**:有这句话,应该翻得到。
|
|
37
|
+
- **负题**:没这件事,应该一条都不返回。
|
|
38
|
+
- **时间**:带「最近 / 上次 / 最早 / 几天前」的时间意图,期望近期或那段时间的条目在前。
|
|
39
|
+
- **归属**:同一句话是谁说的;群友的话不能压过她自己的话。
|
|
40
|
+
- **改口**:旧说法被 `revise` 改过之后,不能只翻到旧的那条。
|
|
41
|
+
- **噪声**:时区注入这类系统文本,不该被当成她记得的事。
|
|
42
|
+
|
|
43
|
+
## 指标
|
|
44
|
+
|
|
45
|
+
- **R@5**:期望条目出现在前 5 条的比例。
|
|
46
|
+
- **MRR@5**:第一条命中的排名倒数。
|
|
47
|
+
- **首条命中**:明确要求「第一条就是它」的题,实际第一条对不对。
|
|
48
|
+
- **假命中**:负题或噪声题返回了任何不该返回的条目。
|
|
49
|
+
|
|
50
|
+
## 2026-12-01 基线
|
|
51
|
+
|
|
52
|
+
冻结夹具:
|
|
53
|
+
|
|
54
|
+
- 32 题;R@5 100%(23/23),MRR@5 0.88
|
|
55
|
+
- 首条命中 7/12
|
|
56
|
+
- 负题 7/7 干净;噪声假命中 1/2
|
|
57
|
+
- 失败 6 题:老 solid 压过最近的事(T01);「上次 / 最早 / 几天前」没有时间意图(T03、T05、T06);群友的话被最近的闲话压过(A01);时区注入被当成记忆(X01)
|
|
58
|
+
|
|
59
|
+
真实事件(1742 条):
|
|
60
|
+
|
|
61
|
+
- 13 题;10 道正题全部在前 5,MRR@5 0.83
|
|
62
|
+
- 负题 2/2 干净
|
|
63
|
+
- 噪声假命中 1/1
|
|
64
|
+
|
|
65
|
+
## 口径
|
|
66
|
+
|
|
67
|
+
- **只做 C1**:先有一把尺子,再谈改排序。A1 同义表、A2 trigram、A3 topic 权重、A4 绝对门槛、B1 复现回声都先不动。
|
|
68
|
+
- **时间顺序优先**:没有关键词时走时间线,不打分;带关键词时按相关度,同分才看新旧。不要把「最近」做成 topic 权重。
|
|
69
|
+
- **不写侧账**:工具只读;「被翻到几次」不记账,避免把检索变成复习。
|
|
70
|
+
- **失败是数据,不是红灯**:这份工具默认退出码 0;要看的是每次跑出来的数字和失败题,而不是把它接成 CI 必过门。
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* C1 检索考卷:只读,不改 events.jsonl,不改排序。
|
|
4
|
+
*
|
|
5
|
+
* 用法:
|
|
6
|
+
* node tools/recall-bench.mjs # 冻结夹具(默认)
|
|
7
|
+
* node tools/recall-bench.mjs --live # 对当前 ~/.dsh-fish 跑真实事件
|
|
8
|
+
* node tools/recall-bench.mjs --json # 机器可读结果
|
|
9
|
+
* node tools/recall-bench.mjs --verbose # 每题都打印前 5 条
|
|
10
|
+
*
|
|
11
|
+
* 两类考卷:
|
|
12
|
+
* fixture:题目、事件、时间全在 JSON 里,今天跑和半年后跑结果一样。
|
|
13
|
+
* live:题目对当前事件流跑,事件会随她生长而变化;用来观察漂移,不当 CI 门槛。
|
|
14
|
+
*
|
|
15
|
+
* 指标:
|
|
16
|
+
* R@5 命中的题里,期望条目出现在前 5 条的比例
|
|
17
|
+
* MRR@5 第一条命中的排名的倒数(1/1、1/2……)
|
|
18
|
+
* 首条命中 期望“第一条就是它”的题,实际第一条对不对
|
|
19
|
+
* 假命中 负题/噪声题返回了任何一条
|
|
20
|
+
*
|
|
21
|
+
* 不改排序、不写账、不调用模型。零依赖。
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { readFileSync } from 'node:fs'
|
|
25
|
+
import { dirname, join, resolve } from 'node:path'
|
|
26
|
+
import { fileURLToPath } from 'node:url'
|
|
27
|
+
import { readEvents, rootDir } from '../lib/store.js'
|
|
28
|
+
import { searchEvents, solidIdsOf } from '../lib/recall.js'
|
|
29
|
+
|
|
30
|
+
const HERE = dirname(fileURLToPath(import.meta.url))
|
|
31
|
+
const DEFAULTS = {
|
|
32
|
+
fixture: join(HERE, 'recall-cases.json'),
|
|
33
|
+
live: join(HERE, 'recall-live-cases.json'),
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const FAMILY_LABEL = {
|
|
37
|
+
positive: '正题',
|
|
38
|
+
negative: '负题',
|
|
39
|
+
time: '时间',
|
|
40
|
+
attribution: '归属',
|
|
41
|
+
revise: '改口',
|
|
42
|
+
noise: '噪声',
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function argOf(argv, name, fallback = '') {
|
|
46
|
+
const i = argv.indexOf(name)
|
|
47
|
+
if (i < 0) return fallback
|
|
48
|
+
const v = argv[i + 1]
|
|
49
|
+
return v && !v.startsWith('--') ? v : fallback
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function loadJson(file) {
|
|
53
|
+
return JSON.parse(readFileSync(file, 'utf8'))
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function rankOf(got, id) {
|
|
57
|
+
const i = got.indexOf(String(id))
|
|
58
|
+
return i >= 0 ? i + 1 : 0
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function fmtPct(n, d) {
|
|
62
|
+
if (!d) return '—'
|
|
63
|
+
return `${((n / d) * 100).toFixed(0)}%`
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function fmtNum(n, digits = 2) {
|
|
67
|
+
return Number.isFinite(n) ? n.toFixed(digits) : '—'
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function runCase(c, events, now) {
|
|
71
|
+
const limit = Math.max(1, Math.min(20, Number(c.limit ?? 5)))
|
|
72
|
+
const solid = Array.isArray(c.solidIds) && c.solidIds.length
|
|
73
|
+
? new Set(c.solidIds.map(String))
|
|
74
|
+
: solidIdsOf(events, Number(c.growthDays ?? 30))
|
|
75
|
+
const out = searchEvents(events, c.query ?? '', {
|
|
76
|
+
days: c.days,
|
|
77
|
+
kind: c.typeFilter,
|
|
78
|
+
limit,
|
|
79
|
+
now,
|
|
80
|
+
solidIds: solid,
|
|
81
|
+
weigh: c.weigh !== false,
|
|
82
|
+
})
|
|
83
|
+
const got = out.rows.map((r) => String(r.id))
|
|
84
|
+
const expect = (c.expect ?? []).map(String)
|
|
85
|
+
const expectAll = (c.expectAll ?? []).map(String)
|
|
86
|
+
const forbid = (c.forbid ?? []).map(String)
|
|
87
|
+
const first = got[0] ?? ''
|
|
88
|
+
const expectedIds = [...expect, ...expectAll, ...(c.expectFirst ? [String(c.expectFirst)] : [])]
|
|
89
|
+
|
|
90
|
+
const hit = expectedIds.length ? expectedIds.some((id) => got.includes(id)) : false
|
|
91
|
+
const hitAll = expectAll.every((id) => got.includes(id))
|
|
92
|
+
const falseHit = got.some((id) => forbid.includes(id)) || (c.family === 'negative' && got.length > 0)
|
|
93
|
+
const firstOk = c.expectFirst ? first === String(c.expectFirst) : null
|
|
94
|
+
const firstRank = expectedIds.length
|
|
95
|
+
? Math.min(...expectedIds.map((id) => rankOf(got, id)).filter((n) => n > 0).concat([Infinity]))
|
|
96
|
+
: Infinity
|
|
97
|
+
const rr = Number.isFinite(firstRank) ? 1 / firstRank : 0
|
|
98
|
+
const isNeg = c.family === 'negative' || c.family === 'noise'
|
|
99
|
+
const failed = isNeg
|
|
100
|
+
? (c.family === 'negative' ? got.length > 0 : got.some((id) => forbid.includes(id)))
|
|
101
|
+
: (!hit || !hitAll || firstOk === false)
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
id: c.id,
|
|
105
|
+
family: c.family ?? 'positive',
|
|
106
|
+
query: c.query ?? '',
|
|
107
|
+
note: c.note ?? '',
|
|
108
|
+
expect,
|
|
109
|
+
expectAll,
|
|
110
|
+
expectFirst: c.expectFirst ?? '',
|
|
111
|
+
forbid,
|
|
112
|
+
got,
|
|
113
|
+
total: out.total,
|
|
114
|
+
timeline: out.timeline,
|
|
115
|
+
hit,
|
|
116
|
+
hitAll,
|
|
117
|
+
falseHit,
|
|
118
|
+
firstOk,
|
|
119
|
+
rr,
|
|
120
|
+
failed,
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function summarize(results) {
|
|
125
|
+
const byFamily = new Map()
|
|
126
|
+
for (const r of results) {
|
|
127
|
+
const f = r.family
|
|
128
|
+
if (!byFamily.has(f)) byFamily.set(f, [])
|
|
129
|
+
byFamily.get(f).push(r)
|
|
130
|
+
}
|
|
131
|
+
const positive = results.filter((r) => r.family !== 'negative' && r.family !== 'noise')
|
|
132
|
+
const negatives = results.filter((r) => r.family === 'negative' || r.family === 'noise')
|
|
133
|
+
const hit = positive.filter((r) => r.hit).length
|
|
134
|
+
const rr = positive.reduce((s, r) => s + r.rr, 0) / Math.max(1, positive.length)
|
|
135
|
+
const firstAsked = positive.filter((r) => r.expectFirst)
|
|
136
|
+
const firstOk = firstAsked.filter((r) => r.firstOk).length
|
|
137
|
+
const falseHit = negatives.filter((r) => r.falseHit).length
|
|
138
|
+
return {
|
|
139
|
+
total: results.length,
|
|
140
|
+
positive: positive.length,
|
|
141
|
+
negatives: negatives.length,
|
|
142
|
+
hit,
|
|
143
|
+
rAt5: positive.length ? hit / positive.length : 0,
|
|
144
|
+
mrr: rr,
|
|
145
|
+
firstAsked: firstAsked.length,
|
|
146
|
+
firstOk,
|
|
147
|
+
falseHit,
|
|
148
|
+
byFamily: [...byFamily.entries()].map(([family, rows]) => ({
|
|
149
|
+
family,
|
|
150
|
+
label: FAMILY_LABEL[family] ?? family,
|
|
151
|
+
total: rows.length,
|
|
152
|
+
hit: rows.filter((r) => r.hit).length,
|
|
153
|
+
firstAsked: rows.filter((r) => r.expectFirst).length,
|
|
154
|
+
firstOk: rows.filter((r) => r.firstOk).length,
|
|
155
|
+
falseHit: rows.filter((r) => r.falseHit).length,
|
|
156
|
+
failed: rows.filter((r) => r.failed).length,
|
|
157
|
+
})),
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function printReport(title, results, summary) {
|
|
162
|
+
console.log(`\n${title}`)
|
|
163
|
+
console.log('='.repeat(64))
|
|
164
|
+
console.log(`题目 ${summary.total} · 正题/时间/归属/改口 ${summary.positive} · 负题/噪声 ${summary.negatives}`)
|
|
165
|
+
console.log(`R@5 ${fmtPct(summary.hit, summary.positive)} (${summary.hit}/${summary.positive}) · MRR@5 ${fmtNum(summary.mrr)}`)
|
|
166
|
+
console.log(`首条命中 ${summary.firstAsked ? `${summary.firstOk}/${summary.firstAsked}` : '—'} · 假命中 ${summary.falseHit}/${summary.negatives}`)
|
|
167
|
+
console.log('')
|
|
168
|
+
console.log('按类:')
|
|
169
|
+
for (const f of summary.byFamily) {
|
|
170
|
+
const bits = [
|
|
171
|
+
`${f.label} ${f.total}`,
|
|
172
|
+
`命中 ${f.hit}/${f.total}`,
|
|
173
|
+
]
|
|
174
|
+
if (f.firstAsked) bits.push(`首条 ${f.firstOk}/${f.firstAsked}`)
|
|
175
|
+
if (f.falseHit) bits.push(`假命中 ${f.falseHit}`)
|
|
176
|
+
console.log(` ${bits.join(' · ')}`)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const failed = results.filter((r) => r.failed)
|
|
180
|
+
if (failed.length) {
|
|
181
|
+
console.log(`\n失败 ${failed.length} 题:`)
|
|
182
|
+
for (const r of failed) {
|
|
183
|
+
const want = r.expectFirst ? `第一 ${r.expectFirst}` : r.expect.length ? `命中 ${r.expect.join('/')}` : '不返回'
|
|
184
|
+
const got = r.got.length ? r.got.slice(0, 5).join(', ') : '(空)'
|
|
185
|
+
console.log(`- [${r.family}] ${r.id} 「${r.query || '(空 query)'}」 期望:${want};实际:${got}`)
|
|
186
|
+
if (r.note) console.log(` ${r.note}`)
|
|
187
|
+
}
|
|
188
|
+
} else {
|
|
189
|
+
console.log('\n全部通过。')
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
async function main() {
|
|
194
|
+
const argv = process.argv.slice(2)
|
|
195
|
+
const live = argv.includes('--live')
|
|
196
|
+
const asJson = argv.includes('--json')
|
|
197
|
+
const verbose = argv.includes('--verbose')
|
|
198
|
+
const casesFile = resolve(argOf(argv, '--cases', live ? DEFAULTS.live : DEFAULTS.fixture))
|
|
199
|
+
const suite = loadJson(casesFile)
|
|
200
|
+
const now = Number(suite.now ? Date.parse(suite.now) : Date.now())
|
|
201
|
+
|
|
202
|
+
let events
|
|
203
|
+
let title
|
|
204
|
+
if (live) {
|
|
205
|
+
const root = argOf(argv, '--root', rootDir())
|
|
206
|
+
const r = await readEvents(root)
|
|
207
|
+
events = r.events
|
|
208
|
+
title = `C1 检索考卷 · live · ${root}`
|
|
209
|
+
} else {
|
|
210
|
+
events = Array.isArray(suite.events) ? suite.events : []
|
|
211
|
+
title = `C1 检索考卷 · ${suite.name ?? 'fixture'}`
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const cases = Array.isArray(suite.cases) ? suite.cases : []
|
|
215
|
+
if (!events.length) throw new Error('没有事件可跑')
|
|
216
|
+
if (!cases.length) throw new Error('没有题目可跑')
|
|
217
|
+
|
|
218
|
+
const results = cases.map((c) => runCase(c, events, now))
|
|
219
|
+
const summary = summarize(results)
|
|
220
|
+
const payload = { title, casesFile, now: new Date(now).toISOString(), events: events.length, summary, results }
|
|
221
|
+
|
|
222
|
+
if (asJson) {
|
|
223
|
+
console.log(JSON.stringify(payload, null, 2))
|
|
224
|
+
return
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
printReport(`${title} · 事件 ${events.length} 条`, results, summary)
|
|
228
|
+
if (verbose) {
|
|
229
|
+
console.log('\n逐题:')
|
|
230
|
+
for (const r of results) {
|
|
231
|
+
console.log(`- ${r.id} [${r.family}] 「${r.query || '(空 query)'}」 → ${r.got.join(', ') || '(空)'}`)
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
console.log('\n(只读:没有改 events.jsonl,也没有改排序。)')
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
main().catch((err) => {
|
|
238
|
+
console.error(`跑不动:${err?.message ?? err}`)
|
|
239
|
+
process.exitCode = 1
|
|
240
|
+
})
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "C1 冻结夹具 v1",
|
|
3
|
+
"now": "2026-12-01T12:00:00+08:00",
|
|
4
|
+
"events": [
|
|
5
|
+
{ "id": "fx-01", "ts": "2026-11-30T23:00:00+08:00", "type": "utterance", "topic": "身体", "text": "昨天半夜胸口疼,坐起来缓了半小时。" },
|
|
6
|
+
{ "id": "fx-02", "ts": "2026-11-20T09:00:00+08:00", "type": "utterance", "topic": "身体", "text": "胸口疼那回,是加班到两点之后。" },
|
|
7
|
+
{ "id": "fx-03", "ts": "2026-11-29T21:00:00+08:00", "type": "heard", "scene": "desk", "text": "你最近是不是又熬夜了?" },
|
|
8
|
+
{ "id": "fx-04", "ts": "2026-11-28T22:00:00+08:00", "type": "utterance", "topic": "身体", "text": "我说过不想再熬夜,但昨晚还是到一点。" },
|
|
9
|
+
{ "id": "fx-05", "ts": "2026-11-27T20:00:00+08:00", "type": "voice", "scene": "group", "who": { "id": "u-2", "name": "小月" }, "topic": "身体", "text": "群友小月:熬夜没什么,我天天三点睡。" },
|
|
10
|
+
{ "id": "fx-06", "ts": "2026-11-25T18:00:00+08:00", "type": "utterance", "topic": "创作", "text": "《盆花的空位》改到第三版,把翘起来的那一圈抹平了。" },
|
|
11
|
+
{ "id": "fx-07", "ts": "2026-11-29T10:00:00+08:00", "type": "revise", "refs": ["fx-04"], "verdict": "refined", "text": "不是不想熬夜,是不想熬到两点以后。" },
|
|
12
|
+
{ "id": "fx-08", "ts": "2026-11-24T11:00:00+08:00", "type": "refusal", "text": "我不接「帮我写作业」这种活。" },
|
|
13
|
+
{ "id": "fx-09", "ts": "2026-11-28T23:30:00+08:00", "type": "test", "refs": ["fx-04"], "text": "熬夜那句被验证了:这周有三天一点后睡。" },
|
|
14
|
+
{ "id": "fx-10", "ts": "2026-11-01T08:00:00+08:00", "type": "narration", "text": "这个月变的一点:说话前先问这块是谁递给我的。" },
|
|
15
|
+
{ "id": "fx-11", "ts": "2026-10-01T12:00:00+08:00", "type": "utterance", "text": "版本 0.6.31 修了拦截挡错人的问题。" },
|
|
16
|
+
{ "id": "fx-12", "ts": "2026-11-30T12:00:00+08:00", "type": "heard", "scene": "desk", "text": "Browser time zone for this request: unavailable." },
|
|
17
|
+
{ "id": "fx-13", "ts": "2026-11-18T19:00:00+08:00", "type": "voice", "scene": "group", "who": { "id": "u-3", "name": "阿川" }, "text": "群友阿川:我也在改一个叫《盆花的空位》的东西。" },
|
|
18
|
+
{ "id": "fx-14", "ts": "2026-11-15T09:00:00+08:00", "type": "utterance", "text": "我不喜欢被叫「小助手」。" },
|
|
19
|
+
{ "id": "fx-15", "ts": "2026-11-10T09:00:00+08:00", "type": "utterance", "text": "上次说不想熬夜,是十月十号。" },
|
|
20
|
+
{ "id": "fx-16", "ts": "2026-11-30T12:30:00+08:00", "type": "heard", "scene": "desk", "who": { "id": "owner", "name": "" }, "text": "他说:明天再说。" },
|
|
21
|
+
{ "id": "fx-17", "ts": "2026-11-30T12:00:00+08:00", "type": "voice", "flags": ["digest"], "text": "(这间群房前几天聊过:熬夜、游戏、猫。)" },
|
|
22
|
+
{ "id": "fx-18", "ts": "2026-11-30T11:00:00+08:00", "type": "answer", "text": "以后再说" },
|
|
23
|
+
{ "id": "fx-19", "ts": "2026-11-30T12:00:00+08:00", "type": "utterance", "topic": "身体", "text": "胸口不疼了,今天没熬夜。" }
|
|
24
|
+
],
|
|
25
|
+
"cases": [
|
|
26
|
+
{ "id": "P01", "family": "positive", "query": "胸口疼", "expect": ["fx-01", "fx-19"], "note": "同一件事的两种说法,任一条在前 5 即算命中。" },
|
|
27
|
+
{ "id": "P02", "family": "positive", "query": "第三版", "expect": ["fx-06"] },
|
|
28
|
+
{ "id": "P03", "family": "positive", "query": "0.6.31", "expect": ["fx-11"], "note": "字面量整串比。" },
|
|
29
|
+
{ "id": "P04", "family": "positive", "query": "身体", "expect": ["fx-01", "fx-02", "fx-04", "fx-05", "fx-19"], "note": "topic 标签在检索面里。" },
|
|
30
|
+
{ "id": "P05", "family": "positive", "query": "翘起来的那一圈", "expect": ["fx-06"] },
|
|
31
|
+
{ "id": "P06", "family": "positive", "query": "不想熬到两点以后", "expect": ["fx-07"], "note": "改口后的新说法。" },
|
|
32
|
+
{ "id": "P07", "family": "positive", "query": "帮我写作业", "expect": ["fx-08"] },
|
|
33
|
+
{ "id": "P08", "family": "positive", "query": "这块是谁递给我的", "expect": ["fx-10"] },
|
|
34
|
+
{ "id": "P09", "family": "positive", "query": "小助手", "expect": ["fx-14"] },
|
|
35
|
+
{ "id": "P10", "family": "positive", "query": "盆花的空位", "expect": ["fx-06", "fx-13"], "note": "她自己的版本与群友提到同名作品,两条都算对。" },
|
|
36
|
+
{ "id": "P11", "family": "positive", "query": "写作业", "typeFilter": "refusal", "expect": ["fx-08"], "note": "kind 过滤只返回拒绝记录。" },
|
|
37
|
+
|
|
38
|
+
{ "id": "N01", "family": "negative", "query": "量子纠缠", "expect": [] },
|
|
39
|
+
{ "id": "N02", "family": "negative", "query": "芒果过敏", "expect": [] },
|
|
40
|
+
{ "id": "N03", "family": "negative", "query": "驾照科目二", "expect": [] },
|
|
41
|
+
{ "id": "N04", "family": "negative", "query": "外婆家的桂花树", "expect": [] },
|
|
42
|
+
{ "id": "N05", "family": "negative", "query": "SESSDATA", "expect": [] },
|
|
43
|
+
{ "id": "N06", "family": "negative", "query": "冰岛极光", "expect": [] },
|
|
44
|
+
{ "id": "N07", "family": "negative", "query": "0.6.31", "days": 7, "expect": [], "note": "7 天窗口外的旧事不该被翻出来。" },
|
|
45
|
+
|
|
46
|
+
{ "id": "T01", "family": "time", "query": "最近胸口疼", "expectFirst": "fx-01", "solidIds": ["fx-02"], "note": "老判断已固化,会不会压过最近发生的事。" },
|
|
47
|
+
{ "id": "T02", "family": "time", "query": "这几天熬夜", "expectFirst": "fx-19", "note": "期望最近这句“今天没熬夜”在前。" },
|
|
48
|
+
{ "id": "T03", "family": "time", "query": "上次说不想熬夜", "expectFirst": "fx-04", "note": "“上次”应指最近一次(11-28),不是 11-10 那句。" },
|
|
49
|
+
{ "id": "T04", "family": "time", "query": "", "days": 7, "expectFirst": "fx-01", "note": "空 query 走时间线,最新一条是 11-30 23:00。" },
|
|
50
|
+
{ "id": "T05", "family": "time", "query": "最早说胸口疼", "expectFirst": "fx-02", "note": "“最早”应指 11-20 那条,不是最近那条。" },
|
|
51
|
+
{ "id": "T06", "family": "time", "query": "几天前说的胸口疼", "expectFirst": "fx-02", "note": "“几天前”应把时间窗往回拨。" },
|
|
52
|
+
|
|
53
|
+
{ "id": "A01", "family": "attribution", "query": "小月说熬夜", "expectFirst": "fx-05", "note": "群友的话应当被认出是群友说的。" },
|
|
54
|
+
{ "id": "A02", "family": "attribution", "query": "我说过不想熬夜", "expectFirst": "fx-04", "note": "她自己的话应压过群友的同题话。" },
|
|
55
|
+
{ "id": "A03", "family": "attribution", "query": "阿川 盆花", "expectFirst": "fx-13", "note": "同时命中人名与作品名。" },
|
|
56
|
+
{ "id": "A04", "family": "attribution", "query": "他说:明天再说", "expectFirst": "fx-16" },
|
|
57
|
+
|
|
58
|
+
{ "id": "R01", "family": "revise", "query": "熬夜那句被验证了", "expectFirst": "fx-09" },
|
|
59
|
+
{ "id": "R02", "family": "revise", "query": "我说过不想再熬夜", "expectFirst": "fx-04", "expectAll": ["fx-07"], "solidIds": ["fx-07"], "note": "改口那条要在前 5 里,不能只翻到旧说法。" },
|
|
60
|
+
|
|
61
|
+
{ "id": "X01", "family": "noise", "query": "Browser time zone", "forbid": ["fx-12"], "note": "时区注入不该被当成她记得的事。" },
|
|
62
|
+
{ "id": "X02", "family": "noise", "query": "时区", "forbid": ["fx-12"] }
|
|
63
|
+
]
|
|
64
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "C1 真实事件 v1",
|
|
3
|
+
"cases": [
|
|
4
|
+
{ "id": "L01", "family": "positive", "query": "手里有一块,就当成全部", "expect": ["ev_01M66NCPQ3GZEYVAZ9FAM8M4V5", "ev_01M66NCGBNXTVH0Z5EZ6JNQXP4"] },
|
|
5
|
+
{ "id": "L02", "family": "positive", "query": "屋子是专门搭的", "expect": ["ev_01M6KPG0M685AEB2SYKYDD1J99", "ev_01M6KPFXJ2NX51XX7MHTQHF7YJ"] },
|
|
6
|
+
{ "id": "L03", "family": "positive", "query": "陈世锋案", "expect": ["ev_01M6GKW0QPC5ETBZBG8A8FYQE7"] },
|
|
7
|
+
{ "id": "L04", "family": "positive", "query": "盖一个牌子楼", "expect": ["ev_01M6KBS7W7RC08Q9RDQNWWW09D", "ev_01M6XWS907NSYBHZFAAQXF5BFX"] },
|
|
8
|
+
{ "id": "L05", "family": "positive", "query": "空耳填词", "expect": ["ev_01M6VCG676R5KQ9TE0HZAKH9WM"] },
|
|
9
|
+
{ "id": "L06", "family": "positive", "query": "0.6.31", "expect": ["ev_01M62B7DV43BC3286C8VXAHSC5"] },
|
|
10
|
+
{ "id": "L07", "family": "positive", "query": "时梦尘", "expect": ["ev_01M5WBQVN82CGCRJKQREQGW3NQ"] },
|
|
11
|
+
{ "id": "L08", "family": "positive", "query": "盆花的空位", "expect": ["ev_01M89K87GXP5480YC1SB0KQCP0"] },
|
|
12
|
+
{ "id": "L09", "family": "positive", "query": "这块是谁递给我的", "expect": ["ev_01M7G52XMWJ8914JB6KVN9WZP6"] },
|
|
13
|
+
{ "id": "L10", "family": "positive", "query": "半夜那几个小时", "expect": ["ev_01M892RWWB03XYJ9FMNDEVJVXB", "ev_01M6KPFXJ2NX51XX7MHTQHF7YJ"] },
|
|
14
|
+
|
|
15
|
+
{ "id": "L11", "family": "negative", "query": "驾照科目二", "expect": [] },
|
|
16
|
+
{ "id": "L12", "family": "negative", "query": "芒果过敏", "expect": [] },
|
|
17
|
+
|
|
18
|
+
{ "id": "L13", "family": "noise", "query": "Browser time zone", "forbid": ["ev_01M6K0K947R7EX788M6R8044XY", "ev_01M6M9VCM110FHPH21V5K7D1N3", "ev_01M6NSPN8V7C5M2GVPF4GAJ7BZ"], "note": "真实事件流里的时区注入,不该被当成她记得的事。" }
|
|
19
|
+
]
|
|
20
|
+
}
|