Repository navigation
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p1High: required for production / M2
Description
repo:objectstack@baozhoutao · baozhoutao · session_01RKKVngFfp7HBk6JUUr5vfN
Carries row E0 of topic #38711 (中文关键词检索质量). The topic keeps every other row.
维护者速读
- 做什么:写一个离线重算脚本,把提问分别用现在的 2/3 字滑窗和新的切词服务切词,在明规 132 题上算只用关键词、以及几种向量权重下混合检索的 hit@1/3/8,和只用向量对比。不改任何产品代码。
- 谁跑:数据(132 题、约 6 万段条款和向量)只在 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671 报告人本地。dev 写脚本并用合成小夹具自测,报告人在本地数据上跑,把结果表贴回本卡。
- 为什么先做:最便宜地回答「问题侧切词修好后,混合检索能不能赢过纯向量」,决定 专题:中文关键词检索质量——关键词一路能找对中文条款,管理员可调,两个知识适配器通用 #38711 后面 B8b、E1 投入多少。
- 需要你做的:无。
Ruling and inputs
- Who runs it. The maintainer chose, in this account's fleet project on 2026-11-30, between "the data holder runs it locally", "data handed to the dev" and "the reporter does E0 alone". The answer, verbatim: 「数据持有人本地跑 (Recommended)」. So the dev writes and self-tests the script; the holder of 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671's data runs it and posts the numbers here.
- Segmenter. The question side uses
@objectstack/service-segmenterfrommain(knowledge: Chinese questions are cut into real words by a dictionary segmenter, in one module both knowledge-turso and knowledge-pgvector use #38710 step 1, PR feat(service-segmenter): a segmenter service that cuts a Chinese question into real words for the keyword leg #38744, merged). The baseline iskeywordTerms()in@objectstack/core, which equals today's adapters' sliding windows. - Prior measurements this run must answer:
- 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671's offline recompute: hybrid hit@3 71.4% against vector-only 88.6% on 70 questions with a gold clause.
- os-bob's local run on 专题:中文关键词检索质量——关键词一路能找对中文条款,管理员可调,两个知识适配器通用 #38711 (comment 7275798786, 15 + 12 questions on PG17): jieba-cut questions tie today's cut on quality. Without unit scope, natural-language questions fell from 5 to 2 found. That row is the one to re-measure.
What
- An offline recompute script, by default under
packages/services/service-segmenter/bench/(the dev picks by precedent: knowledge-pgvector:检索分段计时与 PostgreSQL 基线(专题 #38703 B1) #38719 claimspackages/plugins/knowledge-pgvector/bench/**, and names the place in the PR). It is not shipped and not run in CI.- Input: files the holder exports from the local store:
- the questions with their gold clause ids, and the unit scope where the original run used one;
- the passages: id, text, unit;
- for each question, the vector leg's ranked ids, so no embedding call is needed.
The script documents the exact shape.
- Keyword leg: the adapters' rule, reproduced offline as 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671 did: BM25-IDF weighting, 40 candidates (topK 8 × 5). It runs twice: with today's windows (core
keywordTerms()) and with the segmenter service (platform defaults, no administrator entries). - Fusion: RRF k = 60 at equal weight (today's
fuse(), the 0.5 case), plus a few keyword weights below it (for example 0.33 and 0.25), named as parameters. - Output: hit@1, hit@3 and hit@8 for vector-only, keyword-only (both cuts) and hybrid (both cuts × each weight), with and without unit scope.
- Input: files the holder exports from the local store:
- A self-test on a small synthetic fixture checked into the bench folder. It shows the pipeline end to end and pins one number per row, so the holder's run starts from a script known to work.
Not in scope
- Any product code, adapter or
fuse()change. The weight is B8b (知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671), and the formal evaluation on PostgreSQL is E1. - Index-side segmentation: out of scope on 专题:中文关键词检索质量——关键词一路能找对中文条款,管理员可调,两个知识适配器通用 #38711 (seat record there).
- Holding out questions is E1's rule. E0 reports the full set and says that its supplementary dictionary was not tuned on these questions.
Acceptance
- The script runs with
nodeon the holder's export with no network and no database. The README in the bench folder gives the export shape and one command. - The self-test is green in the package tests, or as a separate command named in the PR.
- The holder posts the result table on this card. The seat then reports to the maintainer, on 专题:中文关键词检索质量——关键词一路能找对中文条款,管理员可调,两个知识适配器通用 #38711, how much of B8b and E1 the numbers support.
Metadata
Metadata
Assignees
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p1High: required for production / M2
Activity
objectstack-fleet commentedon Dec 1, 2026
triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ
Triage: first-touch audit · lane grade kept: Task · p1 ·
area:ai·pm:queue·domain:serveradded.domain:server: the script lives with the service packages (packages/services/service-segmenter/bench/by default). It ships nothing and runs in no CI job.objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@baozhoutao · baozhoutao · session_01RKKVngFfp7HBk6JUUr5vfN
2026-12-01T08:49Z · Claim · #38843 (topic #38711 row E0): the offline recompute script and its synthetic self-test. The data holder runs it locally, per the maintainer's 「数据持有人本地跑」 recorded in this card's body. It builds on
@objectstack/service-segmenter(#38744, merged atd7d46059).Claim: PM loop round 1
Session:
session_01RKKVngFfp7HBk6JUUr5vfNAccount:
baozhoutaoBranch:
claude/issue-38843-e0-offline-recomputeWorktree:
objectstack-issue-38843Domain:
domain:serverSeat:
repo:objectstack@baozhoutaoFile surface:
packages/services/service-segmenter/bench/**(reason: the new bench folder: script, README, synthetic fixture, self-test); ⛔packages/services/service-segmenter/package.jsonandsrc/**(held by #38710 PR 2, claim amendment on #38710), every product file, both knowledge adapters (stop on breach; explain in the report)Container & model:
M,mode:subagent,model: default (dispatch-gates --tier: "Model tier — no path-derived mandate"),effort: highClause-②: no
Metadata-protocol: none
Responsibility: n/a — not a defect card
Thread-read: 7301075391
Premise: holds
Serial constraints cleared:
check-handover.mjs --inflightonpackages/services/service-segmenter/benchreads no overlap. The one unread surface (#38415) is unrelated. #38710 PR 2 holds the rest of the package; its surface was narrowed to excludebench/**(claim amendment on #38710).Dispatch order: an in-seat
os-devsubagent.nodeon the holder's export: no network, no database.keywordTerms()and with the segmenter service.objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@baozhoutao · baozhoutao · session_01RKKVngFfp7HBk6JUUr5vfN
os-dev-report
{ "issue": 38843, "status": "done", "branch": "claude/issue-38843-e0-offline-recompute", "pr": "https://github.com/objectstack-ai/objectstack/pull/38886", "session": "session_01RKKVngFfp7HBk6JUUr5vfN", "premise_still_valid": true, "summary": "Added the E0 offline recompute under packages/services/service-segmenter/bench/ (placed by the knowledge-pgvector/bench precedent): run.mjs (the node command, loading keywordTerms() from built @objectstack/core and createSegmenterService() from built @objectstack/service-segmenter, refusing on the sliding-window fallback), recompute.mjs (export checks, BM25-IDF keyword leg over the passages in scope with 40 candidates = topK 8 x SEARCH_FIRST_ROUND_FACTOR 5, weighted RRF (1-w)/(60+v) + w/(60+k) whose w=0.5 orders exactly as today fuse(), hit@1/3/8 table with and without unit scope), README (export shape, command, matched and unmatched), a synthetic fixture and a vitest self-test the package test run picks up. Mechanism assumptions verified on main 19bccf68: createSegmenterService() is exported and loads @node-rs/jieba 2.0.4 offline (engine dictionary, cut mode cut); keywordTerms() is exported from @objectstack/core and its body is byte-identical to both adapters sql.ts copies. Note for the holder report: the platform words include 年假 and 脱密, the words the two questions quoted on the first measurement lacked, so not tuned on these questions holds for the set, not for those two words; the README says so.", "tests": "At afcef411: pnpm --filter @objectstack/service-segmenter exec vitest run --maxWorkers=2 bench/recompute.test.mjs -> Tests 11 passed (11); pnpm --filter @objectstack/service-segmenter test -> Test Files 4 passed (4), Tests 40 passed (40), exit 0 (bench/recompute.test.mjs listed); typecheck exit 0 (unaffected: tsconfig includes src only). node run.mjs --dir bench/fixture on built dist: exit 0, header segmenter = @objectstack/service-segmenter, jieba (cut), no entries. Scale: synthetic 60,000 passages x 132 questions x 1,000-id vector lists, 20 s wall on a shared container, exit 0. Ablations via scripts/ablation-replace.mjs (source-imported .mjs, no build leg), each restored to HEAD blob with git diff HEAD empty: fusion weight forced to 0.5 -> 3 failed / 8 passed; IDF forced to 1 -> 2 failed / 9 passed (first round reddened only the fixture pins, so 49d120bc added a hand-computed rare-term case).", "gates": "Local: dispatch-gates --commands --repo objectstack-ai/objectstack over 7 paths derived 47 commands; 44 exit 0; 3 NOT MEASURED on their own prerequisite: pnpm check:dual-build-cjs-loads :: exit 3 (whole tree not built), pnpm check:lean-entry-closure :: exit 3 (objectql dist absent), node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 3 (shallow clone; checker-health only). --ran reconciliation: 47 derived, 44 run, 3 NOT-MEASURED, 0 UNRUN, all with exit codes recorded. eslint --no-inline-config on bench/: exit 0. CI at report time (head afcef411): Check Changeset success; Lint, Type Check, Governed Surface Queue Guard, PR-body guards in_progress; not awaited per os-dev.", "line_budget": "+955 / -0 over 7 new files, every one under 1,000 lines: recompute.mjs 382, recompute.test.mjs 232, run.mjs 128, README.md 165, fixture JSON 48; under the 3,000 human-merge threshold.", "files_changed": [ "packages/services/service-segmenter/bench/README.md", "packages/services/service-segmenter/bench/run.mjs", "packages/services/service-segmenter/bench/recompute.mjs", "packages/services/service-segmenter/bench/recompute.test.mjs", "packages/services/service-segmenter/bench/fixture/passages.json", "packages/services/service-segmenter/bench/fixture/questions.json", "packages/services/service-segmenter/bench/fixture/vectors.json" ], "deviations": [ "Three vitest runs of bench/recompute.test.mjs (the two ablation legs and one green re-run, about 8 s each) ran outside os-verify-lock.sh; every other build and test went through it.", "The PR body carries no attribution footer: pr_create read back byte-identical (8067 sent, 8067 stored, nothing appended), and a dev does not PATCH a PR body; the seat may add it.", "origin/main was not merged before opening: the branch is 5 commits behind, none touching service-segmenter, core keyword-terms or either knowledge adapter, and the diff is add-only under bench/.", "Commits carry the model-free trailer pair AGENTS.md requires, not the harness Co-Authored-By line naming a model." ], "mcp_calls": "0", "api_writes": "2 strokes: (1) relay pr_create = POST /repos/objectstack-ai/objectstack/dispatches, executed as POST /repos/objectstack-ai/objectstack/pulls (draft) + POST /repos/objectstack-ai/objectstack/issues/38886/assignees [baozhoutao] + POST /repos/objectstack-ai/objectstack/issues/38886/labels [skip-changeset]; (2) this report comment on #38843 via post-stamped.mjs. git push (3 pushes plus the probe) is not a REST write.", "classifier_refusals": [], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: the segmenter platform words include 年假 and 脱密, drawn from the first measurement quoted questions; a provenance note for the holder report, recorded in bench/README.md and the PR acceptance notes" ] }objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@baozhoutao · baozhoutao · session_01RKKVngFfp7HBk6JUUr5vfN
os-dev-report
{ "issue": 38843, "status": "done", "branch": "claude/issue-38843-e0-offline-recompute", "pr": "https://github.com/objectstack-ai/objectstack/pull/38886", "session": "session_01RKKVngFfp7HBk6JUUr5vfN", "premise_still_valid": true, "summary": "REWORK round 1 (L1 comment 7306759677) is addressed at new head 9e5a234f (was afcef411), changing only bench/**. E1: recompute.mjs header and README Candidates now state the real condition. The service asks topK x 5 = 40 in the first round when the search is grouped or permission-filtered (widened = byRecord || filtered, knowledge-service-search.ts:228), whatever its scope. An ungrouped system search asks 8. The run models the grouped groupBy clause_hash search the first measurement ran, and --first-round-factor 1 models the ask of 8. E2: Reading the numbers now says the first measurement counted its first column at the policy level over 118 questions and its hit@3/8 at the clause level over 70, so it is not comparable with this clause-level hit@1. It gives the second-run recipe: same vectors.json, policy ids as clause, gold policies as gold, read the scoped vector-only hit@1, which is the 79.7% cell (94/118); read only hit@1 of that run. E3: new test: x holds one rare term; y and z hold two terms that are common in scope. Scoped (n = 3), x leads: 0.981 vs 0.940. Over all 100 passages, y leads: 4.210 vs 7.398. The test pins scoped hit@1 1 and unscoped 0. The old single-term case keeps only its out-of-scope pin, and its comment now says so. Nits, both done: affinity re-ordering (ADR-0161, K1 note) added to the README rest-of-a-search list; the parity test comment now says it compares against a hand copy of the stores fuse(), not an import, and that a change to the stores fuse() does not red it. PR body and the Fixes #38843 line untouched; PR stays draft.", "tests": "At 9e5a234f, all under os-verify-lock.sh. bench/recompute.test.mjs: Tests 12 passed (12). pnpm --filter @objectstack/service-segmenter test: Test Files 4 passed (4), Tests 41 passed (41). typecheck exit 0 (joined with &&, VERDICT command-exit 0). eslint --no-inline-config bench/: exit 0. E3 ablation via scripts/ablation-replace.mjs: inScopeCount = inScope.filter(Boolean).length changed to inScopeCount = passages.length (n counted over all passages). Result: 1 failed / 11 passed; only the new scoped-IDF test went red, and the fixture pins held, matching the seat probe. Restored: blob == HEAD 84baca4f6a6c, git diff HEAD empty.", "gates": "At 9e5a234f: dispatch-gates --commands re-derived the same 47 commands over the same 7 paths. 44 exit 0. Three are NOT MEASURED, each refused on its own prerequisite, as at afcef411: pnpm check:dual-build-cjs-loads :: exit 3 and pnpm check:lean-entry-closure :: exit 3 (whole tree not built); node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 3 (shallow clone; checker-health only). --ran: 47 derived, 44 run, 3 NOT-MEASURED, 0 UNRUN. CI on 9e5a234f at report time: 26 success, 19 skipped, 1 in_progress, 0 failed; not awaited.", "line_budget": "Round 1: +57 / -9 over 3 files (README.md, recompute.mjs, recompute.test.mjs). PR total +1003 / -9 over 7 files, each under 1,000 lines, below the 3,000-line threshold.", "files_changed": [ "packages/services/service-segmenter/bench/README.md", "packages/services/service-segmenter/bench/recompute.mjs", "packages/services/service-segmenter/bench/recompute.test.mjs" ], "deviations": [ "The worktree was rebuilt on the existing local branch with git worktree add, after checking that the local branch and origin are both at afcef411. dev-worktree.sh --resume-from refused because the local branch already existed from the removed round-0 worktree.", "The re-run of the 47 derived gate commands outlived the 600 s foreground cap, and the harness moved it to the background. Its result was awaited in-turn with a bounded until-loop and read before this report.", "Carried from round 0: the PR body has no attribution footer; the seat refreshes the body." ], "mcp_calls": "0", "api_writes": "1 this round: this report comment on #38843 via post-stamped.mjs (relay). git push is not a REST write. No PR body, label or assignee write.", "classifier_refusals": [], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@baozhoutao · baozhoutao · session_01RKKVngFfp7HBk6JUUr5vfN
2026-12-01T10:39Z · Landed: PR #38886 merged as
b26bb22aa6and closed this card throughFixes. Thepm:dispatchedstate label comes off now, as the closing rule requires. The data holder's run of the script is filed as its ownpm:awaiting-maintainercard under topic #38711 (named in the next seat comment there).feat(service-segmenter): E0 offline recompute of hit@1/3/8 for the ke…