Skip to content

知识源加「检索方式」和混合比例:只用向量 / 只用关键词 / 混合(可设比例),由应用元数据指定,单次检索可覆盖 #38692

Description

@os-bob

Ruled: 7270218011 · letter A(变体) · 2026-11-30T06:16Z

已裁定。第 1、2、7、8 节的写法以裁决评论为准:用 vectorWeight(向量占比)代替 keywordWeight;比例排在 #38671 之后;单次覆盖推到第二期且只开放 mode;先合 ADR-0161 修订说明。

知识源需要一组「检索方式」声明:可选「只用向量」「只用关键词」「混合」,选「混合」时还能设关键词和向量两路的比例。由应用写在知识源定义里,随应用部署生效。目前 knowledge-turso 和 knowledge-pgvector 上的知识源只有一种检索方式,即两路等权混合;在中文口语问题上它比只用向量更不准、更慢,应用没法绕开。

比例的加权算法建议在现有的按名次合并上加权,不改成 Dify、RAGFlow 那种按分数加权。理由见「混合的比例」一节。

说明:「向量一路」指按语义相似度找段落,「关键词一路」指按字面匹配找段落。两路的结果现在用 RRF(倒数名次融合)合并:一个段落在每一路里排第几名,就得 1 / (60 + 名次) 分,两路相加,再除以两路都排第一时的得分,所以最终分在 0 到 1 之间。

为什么需要

在 BrightRule 的制度条款知识源上实测。知识源共 59,621 段,嵌入模型为 qwen3.7-text-embedding(1024 维),存储为 knowledge-turso。题目是 132 道真实员工问题,其中 118 道有标准制度、70 道有标准条款。员工账号经 MCP(外部 AI 客户端调平台工具的接口)调 search_knowledge,带提问人所属单位的检索范围和 groupBy: "clause_hash"(相同条文只取一条),每次取前 8 条(topK 8):

指标 混合(现状) 只用向量¹
第一条属于正确制度 76.3% 78.8%
前 3 条有正确条款 72.9% 88.6%
前 8 条有正确条款 91.4% 94.3%
一次检索耗时(中位) 562 ms 396 ms

¹ 「只用向量」是在本地框架里临时改代码跳过关键词一路测的,不是平台已有的功能。

同类平台都允许选检索方式:

  • Dify(官方文档「Setting indexing methods」;源码 api/core/rag/rerank/weight_rerank.py、api/core/rag/datasource/retrieval_service.py):知识库检索方式可选「Vector Search」「Full-Text Search」「Hybrid Search」。
  • RAGFlow(源码 internal/service/nlp/retrieval.go,main 92ce638a0a):有 VectorOnly 开关,只跑向量一路。

为什么放在知识源定义上

不放在适配器的插件选项里,原因有两个:

  • 哪种检索方式合适,取决于这个知识源的语料和提问语言。同一部署里的不同知识源可能需要不同的方式。
  • 插件选项属于部署,应用包带不走;托管环境里应用也改不了插件选项。

需要先说明一点:spec 19 删掉了 adapterConfig,理由是「没有适配器读每个知识源各自的配置,适配器的设置走挂载它的插件选项」(knowledge-source.zod.ts 里 adapterConfig 的删除说明)。本单提的不是把那个不定形的配置包加回来,而是一个有固定取值、每个适配器都要读或明确拒绝的声明字段,性质上和 source.documentBy 一样,是知识源自己的检索语义。

要做什么

1. spec 加字段

建议在 source 里加一个 retrieval 分组,和 #38606 刚加的 source.affinity(按提问人调整命中先后)放在一起:两者都是这个知识源「检索时怎么排」的声明。检索方式和比例放在同一个分组里。以下写法是建议,字段名、取值拼写和放在哪一层由平台定:

// ObjectKnowledgeSourceSchema 里,与 affinity 并列
retrieval: strictObject({
  // 省略:用适配器自己的默认方式,即现在的行为
  mode: z.enum(['hybrid', 'vector', 'keyword']).optional(),
  // 仅 mode 为混合(或省略且适配器默认混合)时可写;0 到 1,不含两端;省略按 0.5
  keywordWeight: z.number().gt(0).lt(1).optional(),
}).optional()

和 affinity 的关系:affinity 在知识服务里对已经合并好的命中调整先后,不改分数。retrieval.mode 决定适配器跑哪几路、怎么出分。两者先后作用,互不冲突。

  • vector(只用向量):只跑向量一路。
  • keyword(只用关键词):只跑关键词一路。问题里抽不出关键词时返回空结果。是否仍生成问题向量、用于关键词同分时按向量距离排先后(现在的同分规则),由平台决定。
  • hybrid(混合):两路都跑,按 RRF 合并,即 knowledge-turso 和 knowledge-pgvector 现在的行为。

省略时不写默认值,含义是「用适配器的默认方式」:knowledge-turso 和 knowledge-pgvector 是混合,knowledge-memory 是只用向量。不建议在 spec 里把默认值写成 hybrid,因为 knowledge-memory 从来只有向量一路,写死默认值会让已有的 memory 知识源变成「声明了一种它做不到的方式」。这样所有已有知识源的行为都不变。

2. 适配器声明自己支持哪些方式,不支持的在保存或注册时拒绝

建议在适配器的能力声明(AdapterCapabilities,现在只有 chunks 一项)里加一项,列出它支持的检索方式:knowledge-turso 和 knowledge-pgvector 三种都支持,knowledge-memory 只支持 vector。没有声明这一项的第三方适配器,只接受省略。

知识源明确写了它所用适配器不支持的方式时拒绝,并在提示里写出该适配器支持哪些方式:

  • 经 Studio 或 MCP 保存的知识源,在保存时拒绝(和现在「部署里没挂这个存储就在保存时拒绝」同一处)。
  • 写在代码里注册、或随软件包安装的知识源不经过保存,在注册时拒绝(现有先例:没写适配器又无法确定用哪个的知识源,已经是在注册时拒绝)。

不采用「不支持就悄悄按只用向量处理」,因为那样应用声明的方式和实际执行的方式不一致,排查时看不出来。

3. knowledge-turso 和 knowledge-pgvector 按字段决定跑哪几路

知识源定义已经随每次检索传给适配器(AdapterSearchOptions.source),适配器直接读这个字段即可。按次覆盖见第 8 点。

分数规则建议统一成一条:最终分 = 参与的各路 1 / (60 + 名次) 之和,除以「参与的各路都排第一」时的得分。

  • 混合时参与的是两路,结果和现在的分数、排序逐位相同。
  • 只用向量或只用关键词时参与的只有一路,第 1 名得 1 分,第 n 名得 61 / (60 + n) 分。

单路方式下的排序就是那一路自己的排序。只用向量时,向量一路现有的规则不变(余弦相似度不大于 0 的段落不返回,近似索引的重试和回退照旧)。

4. 不重建索引

切换检索方式只影响检索。两路读的是同一批段落,向量随段落入库,关键词索引在建表时建立,或在第一次用到关键词的检索时补建。新字段不计入索引指纹和 recipe hash(决定「要不要重建索引」的两个哈希),和 source.documentBy 的处理一样;这两个哈希只读嵌入模型、切分方式和 source 分组里的几个键,所以新字段不需要特别处理。「只用向量」的知识源是否还维护关键词索引,由平台决定。

5. Studio 表单

知识源表单加上「检索方式」下拉,带「默认」一项(对应省略);选「混合」时显示「关键词比例」输入(0 到 1,不含两端,留空按 0.5)。能否保存仍按现有的知识源编辑规则(例如只读软件包里的知识源不能在页面上改)。

6. 不改变「部署必须配嵌入模型」

三种检索方式下,索引都照常带向量建立,「只用关键词」只是检索时不用向量一路的排名。没配嵌入模型的部署能否只做关键词检索,不在这一单里。

7. 混合的比例(retrieval.keywordWeight)

为什么要能调:在同一知识源上按下面的名次加权公式离线重算,两路等权时「前 3 条有正确条款」71.4%²,关键词权重约 0.33 时 77.1%,只用向量 88.6%。比例对结果影响明显,不同知识源、不同语言合适的比例也不同,应该由应用按知识源声明。#38671 修好关键词一路的切词后,合适的比例还会变,所以写在元数据里、随应用调整比写死在平台里合适。

算法建议在现有 RRF 上加权:retrieval.keywordWeight 取值在 0 和 1 之间(不含两端),向量一路的权重为 1 减去它。只在混合时可写,其他方式下写了就在保存或注册时拒绝。最终分 = (向量权重 / (60 + 向量名次) + 关键词权重 / (60 + 关键词名次)),除以两路都排第一时的得分 1 / 61。省略时按 0.5 算,分数和排序与现在逐位相同(两个权重都是 0.5 时,分子分母同时减半,浮点结果不变)。要完全关掉一路用检索方式,不用把权重设成 0 或 1,所以两端不允许。

不采用 Dify、RAGFlow 那种按分数加权(最终分 = 关键词权重 × 关键词分 + 向量权重 × 向量余弦相似度)。两家的做法如下:

  • Dify(api/core/rag/rerank/weight_rerank.py):混合时两路各取 top_k、去重后重新打分,score = vector_weight × 向量余弦相似度 + keyword_weight × 关键词分。关键词分是用 jieba 抽词、在这批候选段落上算 TF-IDF 后的余弦相似度。没有另做归一化。也可以不用权重,改用重排模型。
  • RAGFlow(internal/service/nlp/retrieval.go、reranker.go,main 92ce638a0a):参数 vector_similarity_weight 默认 0.3,关键词权重为 1 减去它。最终分 sim = 关键词权重 × tsim + 向量权重 × vsim:vsim 是向量余弦相似度;tsim 是问题的加权词(单词权重 × 0.4,相邻两词组合 × 0.6)在段落里命中的权重占问题总权重的比例,在 0 到 1 之间。

不照搬的理由:

  1. 默认行为做不到不变。 按分数加权等于换掉现在的合并算法,不写权重的知识源排序也会变,所有已上线的知识源都受影响。
  2. 平台现在没有可用的关键词分。 两个适配器的关键词分是命中词的 BM25 IDF 之和,没有上限,只用来在关键词一路内部排名次。要按分数加权,得先在两个适配器里各定义一个 0 到 1 的关键词分,并为候选段落补算另一路的分数(只被向量一路排到的段落要补关键词分,反之亦然)。这是一个新的打分模型,不是加一个参数。
  3. 分数会随取多少条而变。 知识服务在带 groupBy 或权限过滤时会分两轮向适配器要结果(先要 topK × 5 条,不够再要 topK × 20 条),并把各知识源的结果按分数放在一起排序。按名次算的分数,同一段落在两轮里得分相同;像 Dify 那样在候选集上算的关键词分,候选集一变分数就变。
  4. 两个分数的分布不一样,权重不好解释。 余弦相似度的取值范围随嵌入模型而变,关键词分是另一种分布,同一个权重换了嵌入模型含义就变了。名次加权没有这个问题。

按分数加权不是永远不做:平台将来若加重排这一步(对候选段落统一重新打分),那时再评估更合适。

² 离线重算是在本地按 turso 适配器的 SQL 和合并逻辑复现的结果,等权时比平台实测的 72.9% 少一题。差异可能来自同文条款的合并处理没有完全复现(平台在 groupBy 下首轮向适配器要 topK × 5 = 40 条,适配器每一路各取 40 条,离线也按 40 条取)。这一题的差异不影响结论。

8. 单次检索可以覆盖

search_knowledge 工具和 IKnowledgeService.search 加一个可选参数 retrieval: { mode?, keywordWeight? },取值规则和知识源上的一样。生效顺序:单次检索的参数 > 知识源的声明 > 适配器的默认方式。用途:同一个知识源,大多数问题按语义找,但模型有时要按原文、编号、专有名词精确找(例如「第十二条」某个发文字号),这时临时用「只用关键词」或调高关键词比例更合适。

  • 一次检索查多个知识源时,单次参数对每个知识源都生效。某个知识源的适配器不支持这个方式时,这个知识源按「拒绝检索」报告(和现在适配器不可用时一样列在结果的 refused 里),其他知识源照常返回。
  • 工具说明里写清楚各方式适合什么问题,模型才知道什么时候该改。

范围说明

  • 这一单包括:知识源上的检索方式和混合比例声明、三个适配器的支持与拒绝、Studio 表单、单次检索覆盖。重排模型、托管环境是否开放给客户在页面上修改,不在这一单里。
  • 一次检索同时查多个知识源时,知识服务把各知识源的结果按分数放在一起排序。检索方式不同的知识源,分数不可直接比较:混合下只被一路排到的段落最高 0.5 分,单路方式下第 1 名是 1 分。这个问题现在就存在(knowledge-memory 返回的是余弦相似度,另两个适配器返回的是名次分),本单不解决,只请在文档里写明。
  • spec 的知识源定义不接受未声明的键,所以应用一旦写了这个字段,就必须跑在带这个字段的 spec 版本上。新字段是可选的纯新增,不影响已有定义。本地检出的 spec 版本是 19.0.0-next.2,希望能进 19 的下一个发布版本。

完成后

BrightRule 会把制度条款知识源设为「只用向量」,随应用发布,自托管和托管环境都生效,替换掉目前本地的临时改动。

相关:#38671(混合检索准确率)、#38676(检索耗时)、#38675(托管环境检索超时)


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    Contributor

    triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ

    Triage: route · needs-user-decision · area:ai · domain:spec · Feature · p2 · size M (spec field, three adapters, the Studio form, a per-search override).
    Grade: area:ai · Feature (a new declared retrieval mode and keyword weight on a knowledge source, plus an override on search_knowledge) · p2, not p1, since a Feature enters p1 only when it blocks a p1 · evidence measured by the filer (132 real questions on a 59,621-clause source: vector-only top-3 88.6% against hybrid 72.9%, and 396 ms against 562 ms median).
    Rationale: it adds an authorable key to the published knowledge-source schema and a parameter to a tool contract, and it is not a child of a topic the maintainer opened, so it is a non-pre-authorised feature with a contract change, which is on the human floor. It sits next to the open knowledge cards #38671 (hybrid accuracy), #38676 (latency) and #38675 (hosted timeout, p1); whether the bugs are fixed first or the mode is offered as an escape is part of the choice. The decision analysis (速读 and four axes) is owed by a decision thread, per decision-analysis.md.

  2. added
    area:ai
    domain:spec
    needs-user-decision
    priority:p2
    on Nov 30, 2026
  3. os-warren commented on Nov 30, 2026

    @os-warren
    Collaborator

    decision@os-warren · os-warren · session_01JQwxbaXfHXvoJs5bQn4iat

    维护者速读

    • 问题:做中文制度问答的应用(今天是 BrightRule 一家、一个约六万段的制度条款库)发现,平台默认的「语义加字面」混合检索在口语问题上比只按语义找更不准、也更慢:132 道真实员工问题里,前三条含正确条款的比例是 72.9% 对 88.6%,每次检索约 0.56 秒对 0.40 秒;员工每问一次都碰到,而应用没有任何正式办法改成「只按语义」。这个差距来自前一天刚上线的中文切词改动,已另立缺陷卡在排队修。
    • 选项:「全做」,应用按知识库声明检索方式和两路比例,模型还能逐次临时改,一份架构记录加约五个 PR;「只做检索方式声明」,应用在知识库上二选一(混合、只按语义),所用存储做不到就在保存时明确拒绝,比例和逐次临时改等有应用真要再加,一份架构记录加约两个 PR;「先不加,修完缺陷重测」,本卡零 PR,BrightRule 自建环境继续带私改代码、托管环境无解;「只给部署加开关」,整套部署统一关掉字面一路,一个 PR,但托管环境里的应用用不上。
    • 推荐「只做检索方式声明」:哪种找法合适是这份知识自己的属性,Dify、RAGFlow 这类平台都让人按知识库选,而且它是卡里唯一有实测、有人真要写的一项;比例在卡片自己的数据里最好也只到 77.1%,仍输给只按语义,逐次临时改没有任何实测。代码排在三张检索缺陷卡之后做,届时顺带重测。
    • 不定会怎样:BrightRule 自建环境继续跑私改的平台代码,托管环境的员工继续拿到更差的排序,直到中文切词缺陷修好;修好以后还要不要这个声明,也没有人负责重测和回答。

    Served-tier: CONTRACT_REVIEW_TIER
    Analysed-by: decision-thread isolated analyst sub-agent

    Decision analysis · 2026-11-30 · #38692, whether a knowledge source may declare which retrieval legs run for it. Read on origin/main at 5ac1ee0bc8. ⛔ Not a claim and not a ruling: the maintainer rules.

    Background

    Card #38692 (Feature, p2, area:ai, domain:spec, needs-user-decision), filed by os-bob for the BrightRule app, asks for four things in one card: (1) an authorable source.retrieval.mode (hybrid | vector | keyword) on knowledge_source; (2) source.retrieval.keywordWeight, a number in (0,1) that weights the two legs of the rank fusion; (3) a member on the adapter capability report listing the modes a store can run, with a refusal at save or registration when a source asks for one it cannot; (4) a per-search retrieval override on the search_knowledge tool and on IKnowledgeService.search. Plus the Studio form.

    The evidence is the filer's own measurement on one source (59,621 clause passages, 132 real employee questions, 70 of them with a labelled clause): top-3 clause hit 72.9% hybrid against 88.6% vector-only, median 562 ms against 396 ms. Vector-only was measured with a local patch of the store that skips the keyword leg. Triage (comment 7269349608) kept it on the human floor: a new authorable key and a tool-contract parameter outside any topic the maintainer opened.

    Three Bug cards sit on the same search path, all open as read: #38675 (p1; hosted scoped search times out on remote Turso; draft PR #38693, +261/−29, up since 05:07Z), #38676 (p2; the keyword leg is recomputed on every vector retry and the question is embedded twice; claimed 05:13Z, to be stacked on #38693), #38671 (p2, pm:queue; unspaced Chinese questions are cut into sliding 2- and 3-character pieces and merged at equal weight). Claim 7268984126 on #38675 puts all three on one card thread, in that order, because they edit the same files. Claim 7269464921 on #38676 notes that a release freeze is holding #38693 from landing, so the fixes are being stacked.

    The measured gap is one day old. Until PR #38469 merged (2026-11-29T05:28Z, +276/−21) an unspaced Chinese question was one keyword term that matched nothing, so hybrid search on Chinese was in effect vector-only; that PR's own summary says so (「解决混合检索在中文问题上实际只剩向量一路的问题」). It measured the keyword leg alone (top-5 hit 0.028 → 0.495) and not the fused answer, and it said the worst case was a worse keyword ranking with the vector leg answering as before. With equal-weight fusion that is not what happens: a noisy keyword leg demotes the vector leg's best passage. #38671 is the card for that.

    Governing text

    • ADR-0161 K1, the adapter's side of the boundary (maintainer ruling D1 of 2026-11-24, 「需要拍板的事项 都同意」): "Hybrid retrieval | How vector and keyword scores are blended, which index or scan is used, and how candidates are found." The card moves one part of this, which legs take part and at what weight, from the store to an authored declaration.
    • ADR-0161 K1, "Why the line is here": "The four on the left need facts only the platform has ... The four on the right need none of those". Which legs suit a body of text and its askers is a fact neither the platform nor the store has. It is the application author's.
    • ADR-0161 K8 rule 4: "The contract carries what an adapter reports, never how it is configured. ... Which provider, which key, how to batch, hybrid weights, rerank toggles and parser options stay in the adapter's own plugin options." keywordWeight is the "hybrid weights" this sentence names. A list of supported modes on the capability report is a report and fits the rule.
    • ADR-0161 K8 rule 5: "The list is closed. A member that is not in the table needs a dated note on this record first." A new member on AdapterCapabilities is such a member.
    • ADR-0161 K4, the adapterConfig row: its one reader "read four keys of it (datasetId, rerankModel, similarityThreshold, vectorSimilarityWeight)". The spec tombstone: "An adapter takes its settings as options of the plugin that mounts it." A per-source hybrid weight existed on this type and was retired four days ago (PR fix(settings)!: retire @objectstack/knowledge-ragflow and the Knowledge page's RAGFlow adapter option #37477, merged 2026-11-26).
    • ADR-0161 K9 rule 2: "A new argument enters that one definition ... No transport adds an argument of its own." The dated note of 2026-11-29 under K1: "The tool gains no argument (K9 rule 2): there is no opt-out until a consumer asks", and "Not in this note. ... Any change to how hits of different sources are merged." The same note: "No wrapper key holds the two: it would be a level kept for a third member this note does not admit, and no key is reserved (K4)."
    • ADR-0161, "Leaves unchanged": "the signature and return type of IKnowledgeService.search".
    • Epic 专题:知识检索平台化(应用写一份知识源配置就有可用的检索:开源、托管、企业版都能用) #37000, "Rulings that bound every child": "A key lands with its first reader in the same PR (ADR-0049); no type or key ships without its enforcer."
    • content/docs/protocol/knowledge.mdx §7.1: "Reranker hooks, hybrid retrieval toggles, MMR — adapter-private."
    • AGENTS.md Prime Directive chore: version packages #10, corollary: "never advertise or demo a capability the runtime doesn't actually deliver (declared ≠ enforced)". AGENTS.md has no text on retrieval modes: git grep -n -iE 'retrieval|hybrid|keyword|adapterConfig' origin/main -- AGENTS.md prints nothing.
    • pm-dispatch SKILL.md 〈升级与决策〉: 「协议为基准:spec 与代码不一致默认改代码;改协议、新增公开面另立卡,⛔ 不作 Bug 选项」. This is why "let the source choose vector-only", which 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671 lists as one possible fix, is this separate card and not part of that Bug.
    • Maintainer words on this topic: 2026-11-29, 「检索按提问人单位加权,每种知识的要求不同吧,你的评估不能只考虑当前的规章制度,要考虑客户可能开发的各种元数据应用」 (filing gate of [Decision] knowledge_source: a declarative retrieval block — rank hits by the asker's relation to a declared field, by recency, and expand a hit along declared structure #38412); 2026-11-27, 「但是我们作为元数据开发平台,不能只考虑制度库」 and 「云端不应该让客户配置向量模型」 (comments 7220000671 and 7218695999 on 专题:知识检索平台化(应用写一份知识源配置就有可用的检索:开源、托管、企业版都能用) #37000). His ruling on [Decision] knowledge_source: a declarative retrieval block — rank hits by the asker's relation to a declared field, by recency, and expand a hit along declared structure #38412 (record 7251603512) chose 「A 精简:排序加带出」, whose line reads 「不做硬筛选,按时间衰减等有应用要再加」: the part with a consumer was built, the parts without one were left to return with a consumer.

    Read together: as written, the governing text answers this card with "a plugin option of the store" or "nothing". Options A and B below are requests to amend ADR-0161 by a dated note, the way #38412 did (note PR #38511). No ruling yet says whether a source may declare its retrieval legs.

    Greps run: git grep -n -E 'hybrid weights|The list is closed|\*\*Hybrid retrieval\*\*' origin/main -- 'docs/adr/0161-*.md' (lines 102, 412, 413); git grep -n 'hybrid retrieval toggles' origin/main -- content/docs/protocol/knowledge.mdx (line 1499); git grep -n -iE 'adapterConfig|affinity|documentBy' origin/main -- packages/spec/src/ai/knowledge-source.zod.ts.

    Protocol statement

    Premises, each with its re-check

    1. The two SQL stores have one retrieval behaviour, two legs fused, and no option that changes it. git grep -n -E 'const vectorLeg|const terms = keywordTerms' origin/main -- packages/plugins/knowledge-turso/src/turso-adapter.ts packages/plugins/knowledge-pgvector/src/pgvector-adapter.ts (two lines each); git grep -n -E '^ [a-zA-Z]+\?:' origin/main -- packages/plugins/knowledge-turso/src/plugin.ts packages/plugins/knowledge-pgvector/src/plugin.ts lists no retrieval option (queryPrefix, vectorIndexThreshold, vectorIndexOverfetch are the nearest).
    2. The fusion is reciprocal rank with k = 60, divided by the score of a passage first in both legs. Holds as the card says. git grep -n -E 'RRF_K = 60|const best = 2 / \(RRF_K \+ 1\)' origin/main -- packages/plugins/knowledge-turso/src/turso-adapter.ts packages/plugins/knowledge-pgvector/src/pgvector-adapter.ts.
    3. The source reaches the store on every search, so a store can read a source key with no new plumbing. git grep -n -A2 'export interface AdapterSearchOptions' origin/main -- packages/spec/src/contracts/knowledge-adapter.ts (source: KnowledgeSource).
    4. The capability report has one member. git grep -n -A9 'export interface AdapterCapabilities' origin/main -- packages/spec/src/contracts/knowledge-adapter.ts (chunks?: boolean).
    5. The memory store has one leg, and that leg is lexical. git grep -n -E 'sparse token-frequency|embedTokens\(tokenize\(query\)\)' origin/main -- packages/plugins/knowledge-memory/src/index.ts. The card calls it "vector only"; see the notes below.
    6. search_knowledge takes six arguments and refuses any other. git grep -n 'const INPUT_KEYS' origin/main -- packages/services/service-knowledge/src/knowledge-tools.ts.
    7. A search over several sources orders their hits together by score. git grep -n -E 'b\.score - a\.score' origin/main -- packages/services/service-knowledge/src/knowledge-service.ts (lines 2599, 2778).
    8. Unspaced Chinese is cut into sliding pieces, at most 16 terms, since PR fix(knowledge): the keyword leg ranks unspaced Chinese, Japanese and Korean questions by 2- and 3-character pieces #38469. git grep -n 'MAX_KEYWORD_TERMS =' origin/main -- packages/plugins/knowledge-turso/src/sql.ts; gh api repos/objectstack-ai/objectstack/pulls/38469 --jq '.merged_at,.title'.
    9. The three Bug cards are open and serial on one thread, and none has landed. for n in 38675 38676 38671; do gh api repos/objectstack-ai/objectstack/issues/$n --jq '[.number,.state,([.labels[].name]|join(","))]|@tsv'; done; gh api repos/objectstack-ai/objectstack/pulls/38693 --jq '.state,.draft'; the serial order is in claim 7268984126 on knowledge-turso:远程 Turso 上带检索范围的 search_knowledge 稳定超时(单条 SQL 超过 10 秒),不带范围也要 25 秒 #38675.
    10. BrightRule's source names no store and would only add the one key. sed -n 23,34p src/knowledge/policy-clause.knowledge-source.ts in a checkout of objectstack-ai/brightrule (read at 0f618c6).
    11. The numbers are the filer's and were not reproduced here. The scripts and per-question data are local to the filer (知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671: 「复现脚本和逐题数据在本地」). Re-check: ask for them on the card.

    Where the card is off or silent:

    • It quotes the adapterConfig tombstone and not K1's "Hybrid retrieval" row, K8 rule 4 ("hybrid weights ... stay in the adapter's own plugin options"), rule 5, or docs §7.1. Those are the texts its request amends.
    • It presents the loss as a property of hybrid search. It is a one-day-old regression of the default (PR fix(knowledge): the keyword leg ranks unspaced Chinese, Japanese and Korean questions by 2- and 3-character pieces #38469), already carded as 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671.
    • Its own data argues against its weight key: the best weighted result is 77.1%, still 11.5 points under vector-only, and its "after landing" section says BrightRule will write vector-only. keywordWeight, the keyword value and the per-search override have no named writer.
    • "knowledge-memory supports only vector": its one leg is a token-frequency cosine, a lexical match. Reporting it as vector names a semantic leg it does not have. The note has to say what that store reports.
    • It says scores of sources in different modes "cannot be compared today either" and leaves it to docs. Today that only happens between the memory store and a SQL store, which do not meet in production. Under the card's scoring rule a one-leg source's 40th passage scores 0.61 and a two-leg source's passage found by one leg scores at most 0.5 (premise 7), so in one search over both, the one-leg source's hits crowd out the other's. That is new, and it is silent.
    • Minor: its vector-only first-hit figure (78.8%) differs from 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671's offline figure (79.7%); the card explains the hybrid difference (72.9% against 71.4%) and not this one.
    • The Dify and RAGFlow source citations were not re-read: those repositories are not reachable from this session.

    The concrete problem

    An application whose users ask in colloquial Chinese gets a worse and slower ranking from the platform's default search than from one of its two legs alone, and has no supported way to say "this knowledge base is searched by meaning only". The only route today is a private patch of the store, which works on a self-hosted deployment and does not exist on a hosted one. Separately, the default itself is defective for Chinese since yesterday, and that is being fixed as a Bug.

    The six items

    1. The problem in one line

    A knowledge base cannot say how it should be searched, so when the platform's default suits one kind of question badly, every employee asking that kind of question gets the worse answer and the app's owner can do nothing about it.

    2. Options, real cost, effort

    What is done What customers see Effort
    A The card as filed: declared mode (three values), declared keyword weight, capability report with refusal, Studio form, per-search override on the tool and the service. App authors get three settings per knowledge base; a model may switch mode on any single search. Weight numbers that nobody can check at save. A search across sources may answer partly, with the unsupported source listed as refused. domain:spec + domain:server · 1 note PR + about 5 PRs · note #38511 (+25/−0); key with first reader and form #38606 (+1,601/−197, 47 files); tool arguments #37393 (+778/−17, 8 files); weighted fusion and a one-leg run in the two SQL stores: 无先例
    B Declared mode only, a closed list of the two values that have a reader and a measured consumer (both legs, meaning only). The store reports what it can run; a source asking for more is refused at save and at registration, with the supported list in the message. No weight, no keyword-only value, no tool argument, no search option: each returns by a dated note with its first consumer. An app author picks one of two on the knowledge base (in Studio: default, hybrid, by meaning only); it ships with the app and works the same self-hosted and hosted. Existing knowledge bases are unchanged. Measured on BrightRule's source before the Bug fixes: top-3 72.9% → 88.6%, median 562 → 396 ms. domain:spec + domain:server · 1 note PR + 2 PRs, plus a skills-docs follow-up · #38511 (+25/−0); documentBy #38564 (+784/−41, 36 files) and #38606 (+1,601/−197, 47 files); a one-leg run in the SQL stores: 无先例 (nearest edit of the same functions: #38469, +276/−21, 12 files)
    C No new key. #38671 and #38676 are fixed as the Bugs they are; the 132 questions are re-run afterwards; this card closes or parks until then. Nothing changes until the Chinese cutting fix lands. BrightRule self-hosted keeps running patched platform code; BrightRule hosted keeps the worse ranking. If the fix reaches its target (hybrid no worse than meaning-only) the accuracy gap closes for every Chinese app without anyone writing a key. 0 PRs on this card. The two Bug cards are queued at triage size M each, no PR yet: 无先例
    D What ADR-0161 says today: a store plugin option that turns the keyword leg off for the whole deployment. One switch per deployment, for every knowledge base in it. A self-hosted operator can set it. A hosted app cannot, and the setting does not travel with the app. domain:server · 1 PR for two stores, plus a cloud change this card cannot size · 无先例 for a retrieval option (the stores' existing options arrived inside larger PRs, for example #38056, +1,113/−35)

    A per-search override on its own, without the source key, was considered and is not a row: it is the part of A with no measurement and with the silent failure described under axis ③, and it would leave the knowledge base unable to state its own default.

    3. Business meaning

    • A: every library gets a dial for how its catalogue is searched, a second dial for the mix, and every reader's assistant may turn both on each visit.
    • B: each library's own card says "search by meaning" or "search by meaning and by exact wording". A branch that cannot do what the card says refuses the card at the door.
    • C: the catalogue's exact-wording index was mis-cut yesterday; repair it, then see whether any library still wants a different way to search.
    • D: one switch in the building's plant room, the same for every library in the building, and tenants of a managed building have no key to that room.

    4. Four axes

    • Long-term fit. End state, two years on: a knowledge base on the platform states how it is searched from a short closed list; every store reports which of those it can run and a mismatch is refused when the knowledge base is saved; the default is good enough in Chinese, Japanese and Korean that most knowledge bases never set it; a second-stage reorder by a model, when it comes, is the lever for mixing, not a hand-set weight. This is how application-builder platforms model it: Dify (vector, full-text or hybrid per knowledge base), RAGFlow (per dataset), Amazon Bedrock Knowledge Bases (hybrid or semantic, with a service default). The search engines underneath (Azure AI Search, Weaviate's alpha, Elasticsearch retrievers) expose mode and weight per query, set by developer code and not by a model at run time. B is that end state for the part that exists today, and it amends ADR-0161 narrowly: the app says which legs take part, the store still owns how each leg ranks and how two are blended. A also writes a number into app metadata whose best value depends on how the store cuts words, which 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671 is about to change; the card says so itself (「合适的比例还会变」). That is a contract leaning on an implementation, and it reverses a retirement made four days ago. C grows no contract but leaves the one known case on a private fork of platform code, with no route on hosted. D makes search behaviour a property of the deployment, against the rule that a source is written once and builds on every store. None of the options slows the SQL stores to match the memory store: the capability report is what keeps them apart.
    • Real pull. One app, one source, one measurement by the filer: 11 more of 70 labelled questions answered in the top three with meaning-only, and about 170 ms saved per search. Every policy question an employee asks hits it. The pull is for meaning-only and nothing else: no app writes a weight, a keyword-only mode or a per-search switch, and the card's use case for the last (clause numbers, document codes) is described, not measured, while keyword-only measured 42.9% on this set. The pull is also partly a defect: if 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671 reaches its own target the accuracy gap closes, and what remains is the cost of one extra query per search (knowledge-turso 检索慢:关键词一路随向量重试重复执行、窄范围下近似检索反而比精确扫描慢、补查轮重复生成问题向量 #38676 measured the keyword leg at 160 ms median, 450 ms p90, locally). So the pull is real today and of unknown size next week.
    • AI error surface. B: an AI author that writes a mode the store cannot run is refused at save with the supported list, and a misspelt mode is refused at parse. That is loud. An AI author that writes meaning-only on a parts catalogue gets a stably worse ranking for that one source: quiet, but constant, visible in any evaluation and one line to undo. A: a weight is a free number. RAGFlow's default 0.3 is the vector weight and this key is the keyword weight, so a number carried over from another platform means the opposite and nothing says so. The per-search switch is chosen by a model on each call: keyword-only on a colloquial question returns little or nothing, and the employee reads "no policy found". Both are silent and reach the end user. C: nothing new to get wrong, but today's failure is silent too, since nothing tells an author that the default ranks Chinese worse. D: the same app ranks differently in two environments and nobody can see why.
    • No spread. C adds nothing. D adds one option on each of two stores. B adds one key with two values and one member on the capability report, and from then on every store, including third-party ones, has to report modes or accept only the default. A adds two more authored shapes and a tool argument that the cloud in-app agent must mirror byte for byte. Every declared key is a standing obligation, and spec 19 retired six keys from this type for having no reader (git grep -c 'retiredKey(' origin/main -- packages/spec/src/ai/knowledge-source.zod.ts).

    os-decision-facets
    ① 项目长远合理性 (long-term fit): B puts "how this knowledge is searched" on the knowledge base as a closed list, the model the reference platforms use, and amends ADR-0161 K1 and K8 rule 4 narrowly; A adds a hand-set weight tied to a keyword leg that is about to change and a model-chosen switch; C keeps a private fork of platform code as the special case; D ties search behaviour to the deployment; none slows the SQL stores for the memory store.
    ② 实际业务拉动 (real pull): one app, one source, measured by the filer (top-3 72.9% → 88.6%, 562 → 396 ms), hit on every policy question; pull is for meaning-only alone; zero pull for weight, keyword-only and per-search; part of the pull is the one-day-old defect #38671.
    ③ 防 AI 犯错 (AI error surface): B is a closed list refused loudly at save when the store cannot run it; A's weight and per-search switch fail silently in the employee's answer; C adds no surface and leaves today's silent default; D differs silently between environments.
    ④ 创业阶段不扩散 (no spread): C adds nothing, D one option per store, B one key with two values plus one report member, A three more surfaces with no consumer.
    Self-check: 只看①选 B;②③④ 是否翻转:否
    Prior rulings read: retrieval,hybrid,keyword,adapterconfig → 3 hits; ADR-0086 D1, ADR-0106 D3, ADR-0161 K8 rule 4 (listed as Decision §30, status line Proposed, in force since PR #37119 merged); thread: none; repo: objectstack-ai/objectstack

    Notes on those two lines. Self-check: ② and ④ trim A to B (no weight, no keyword-only value, no per-search switch) and put B's code behind the three Bug cards; ③ fixes the refusal as loud. ④ argues for C, and that moves timing, not the letter. No new gate is proposed. Prior rulings: node scripts/pm/check-prior-rulings.mjs --card 38692 alone exits 3 ("the card yielded no admissible search term", the title is Chinese), so the line above is from --card 38692 --terms retrieval,hybrid,keyword,adapterConfig: docs/adr 3 hits, AGENTS.md 0, the card's thread 0 rulings of 1 comment. ADR-0086 D1 and ADR-0106 D3 match on a word only (authorization, metadata cache) and do not answer this card. A second run with --terms knowledge,rerank,weights,capabilities gives 25 candidates with the same ADR-0161 rule on top. Also read by hand: ADR-0161 K1 with its note of 2026-11-29, K4, K8 rules 1 to 5, K9; epic #37000 and its thread; #38412 with ruling record 7251603512; PR #38606, #38564, #38511, #38469; the three Bug cards.

    5. Recommendation

    B. A knowledge base declares which retrieval legs run for it, from a closed list of two; the store reports what it can run and a mismatch is refused at save and at registration. It is the end-state shape, it is the one part of the card with a measured consumer, and it follows the pattern of the maintainer's own ruling on #38412: build the part with a consumer, let the rest return with one.

    Not taken:

    • A: the weight has no writer and its meaning moves with the store's word cutting, and the per-search switch hands a ranking choice to a model with no measurement that it chooses well and a silent failure when it does not.
    • C: it leaves the one measured consumer on patched platform code with nothing on hosted, and leaves the shape to be asked again after the re-measure.
    • D: a deployment-wide switch cannot differ per knowledge base, does not ship with the app, and a hosted app cannot set it.

    Effort note: B is one note and about two PRs against C's none. The ① readings are not close (C keeps the special case outside the platform), so the difference does not move the letter. It does set the order: B's code edits the files the #38675 thread holds, and a key lands with its reader in one PR, so every code PR of B queues behind #38675, #38676 and #38671. B therefore gives BrightRule no relief earlier than the Bug fix does. Its value is the declared shape, not speed.

    Confidence gaps (none of them changes the letter):

    6. After the ruling

    Related cards and PRs


    Generated by Claude Code

  4. os-bob commented on Nov 30, 2026

    @os-bob
    ContributorAuthor

    Ruling: 知识源可声明检索方式与向量占比,单次覆盖推后 · letter A(变体,见下) · maintainer 「同意,更新决策卡」 2026-11-30T06:00Z;复核修正 「全部采纳,修正裁决」 2026-11-30T06:16Z

    维护者裁定(2026-11-30,复核后修订版)

    本评论取代原单正文第 1、2、7、8 节的写法。初版发出后,经独立复核(Fable)修正了 5 处,维护者于 06:16Z 选择「全部采纳」。和卡上分析的选项相比,这是 A 的变体:比例的方向改为向量占比;单次覆盖推到第二期,且只开放 mode。

    维护者速读

    • 问题:知识源只能用两路等权混合检索,在中文口语问题上比只用向量更不准、更慢,应用没法改。
    • 裁定:知识源可以声明检索方式(只用向量 / 只用关键词 / 混合),混合时可以设向量占比;驱动报告自己支持哪些方式和默认值。
    • 不进知识源的:融合算法及其常数、重排、分数阈值、分词器,这些都是引擎自己的事。
    • 不定会怎样:BrightRule 只能继续靠本地临时改动,托管环境上用不了「只用向量」。

    一、知识源元数据

    source.retrieval?: strictObject({
      mode?: 'vector' | 'keyword' | 'hybrid',   // 省略 = 所绑定驱动的默认
      vectorWeight?: number,                     // 0 < x < 1,省略 = 等权;只在显式 mode: 'hybrid' 下可写
    })
    • vectorWeight 的含义是抽象的:混合时向量一路的相对分量。0.5 等于驱动的等权行为;调高不会让向量一路的命中名次变差。具体公式属于驱动的现行实现,不属于字段含义(见第五节)。
    • 方向和 Weaviate alpha、RAGFlow vector_similarity_weight 一致(向量占比)。不用原单的 keywordWeight。
    • 解析层拒绝:省略 mode、或 mode 为 vector / keyword 时写了 vectorWeight。retrieval: {} 允许,等同省略。
    • 要关掉一路用 mode,所以权重不能取 0 或 1。
    • 和 source.affinity 并列、先后作用。不计入索引指纹和 recipe hash,切换方式不用重建索引。

    各方式的语义

    • vector:只跑向量一路。
    • hybrid:两路都跑,按驱动的融合算法合并。
    • keyword:只跑关键词一路,不调用嵌入器、不生成问题向量;同分按段落 id 排,结果确定;问题里抽不出词就返回空。它适合文号、条款编号这类精确查找。想要「关键词为主、向量定先后」,应写 hybrid 加低的向量占比。

    二、驱动契约(报告,不是配置)

    AdapterCapabilities.retrieval?: {
      modes: readonly ('vector' | 'keyword' | 'hybrid')[],
      default: 'vector' | 'keyword' | 'hybrid',
    }
    • 支持 hybrid 就必须支持 vectorWeight,不单独声明。
    • turso、pgvector:三种都支持,默认 hybrid。
    • 没声明的驱动(含 memory;它不由运行时挂载):知识源只能省略 mode。检索报告和 Studio 显示「驱动未声明」。
    • 驱动探测到的增强能力(pgvector 的 pg_bigm、HNSW 等)走驱动自己的健康检查或日志,不进这份契约。
    • 生效值放进 AdapterSearchOptions.retrieval: { mode, vectorWeight? },由服务解析后交给驱动。这是逐次请求参数(同 topK、scope),不是配置。
    • 契约测试套件加用例:三种方式各一个;权重 0.5 与现状逐位相同;不支持的方式被拒。

    三、拒绝的四个落点

    1. 作者保存时(Studio / REST / MCP 草稿):400 VALIDATION_ERROR,列出驱动支持的方式。
    2. 注册时:只有此刻驱动已经可以解析时才拒绝,否则不下结论(启动期驱动在 start() 才注册,按 AGENTS.md 的启动期注册表规则,不在 init() 下结论)。软件包安装不经过保存门,靠第 3、4 条兜住。
    3. 启动完成后检查一次(先例 reportUnmountedAdapters):记 error 日志,点名知识源和驱动支持的方式。
    4. 每次检索:该知识源列进 refused(带错误码),不悄悄按默认方式跑。

    方式不被支持的知识源照常建索引,只拒绝检索。

    四、生效顺序与可见性

    • 生效顺序:单次检索参数(第二期)> 知识源声明 > 驱动默认。
    • 生效的 mode 及其来源写进 debug 日志和 Studio 的知识源状态,不进模型可见的工具答案。
    • Studio 下拉只列驱动支持的方式,「默认」一项标明是哪种。比例旁边给出定性提示:向量占比稍高于 0.5,只被关键词一路找到的段落就可能进不了答案,阈值随 topK 变化。
    • search_knowledge 的工具说明加一句:「分数只表示同一知识源内的先后,不表示相关程度」。单路方式下第一名总是满分。

    五、驱动的现行实现(turso、pgvector;写进驱动文档和 ADR 修订说明)

    • 加权 RRF,常数 60:(w/(60+v) + (1−w)/(60+k)) / (w/61 + (1−w)/61)。保留「除以最佳分」的写法。改写成「乘以 61」会有大量末位差异(全组合实测 13,369 / 40,400 处)。
    • 钉子测试:全名次组合下 w = 0.5 与现在的 fuse() 逐位相等。同分规则(先比向量名次,再比段落 id)不动。
    • 权重改的是 TypeScript 的 fuse(),mode 改的是 SQL(少拼一路)。
    • 单路方式:第 n 名得 61/(60+n)。memory 保持返回余弦相似度不变。契约只要求同一知识源内分数随名次不增。
    • RRF 常数等引擎参数本期不开放为插件选项。

    六、永远不进知识源协议

    融合算法及其常数、重排、分数阈值、分词器。平台以后如果统一做重排,那是知识服务的配置。

    七、默认值与索引

    八、ADR-0161 修订说明(单独 PR,Tier H,由维护者亲手合并)

    需要写到的内容:

    1. K8 第 4 条:「hybrid weights」改划给知识源声明;rerank toggles、parser options 照旧留在驱动。
    2. K8 第 4 条补一句:逐次检索的请求参数不属于「配置」。
    3. K1 表「Hybrid retrieval」一行:知识源声明跑哪几路、向量分量多少;驱动仍然决定怎么找候选、怎么融合。
    4. 标题、D1 关键词行、TL;DR 第 1 条里「adapters own hybrid retrieval」的含义同步收窄。
    5. 登记 AdapterCapabilities.retrieval、AdapterSearchOptions.retrieval 两个成员的完整形状,以及第 1 条规则要求的契约测试用例。
    6. vectorWeight 的抽象含义,和现行实现的公式(第五节)。RRF 常数不开放。
    7. 回应 2026-11-29 修订里「权重没有作者能核对的单位」那句,并说明「只被一路命中最多 0.5 分」不再成立。
    8. 「一份知识源在每种存储上都能建」的有意例外:显式声明了存储不支持的方式会被拒。
    9. 拒绝的四个落点,以及被拒的知识源照常建索引。
    10. 已知缺口:检索方式不同的知识源之间分数不可比;单路方式下分数只反映名次。
    11. 单个数权重的退出路径:将来真有第三路时,加按路写法,旧写法保留原意。keyword 方式的语义(第一节)。

    content/docs/protocol/knowledge.mdx §7.1 的修改随代码 PR 走。ui/(Studio 表单)和 skills/(AI 作者文档)是受治理路径,各自单独提 PR。

    分期

    1. 零期:ADR-0161 修订说明 PR,维护者合并。
    2. 一期 a:mode(三种)、能力声明、四个拒绝落点、Studio 表单、工具说明。
    3. 一期 b:vectorWeight。排在 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671 修好切词之后,修好后实测,确认权重有可用的区间。
    4. 二期:search_knowledge 单次覆盖,只开放 mode。届时还要定两件事:知识源能不能声明「不许覆盖」;覆盖成混合时用哪个权重。cloud 应用内 agent 的工具定义要同步。

    和其他单的关系

    BrightRule 的上线顺序

    平台发版 → cloud 托管运行时升级到该版本 → BrightRule 升级 @objectstack/spec,在制度条款知识源上写 retrieval: { mode: 'vector' }(不指定 adapter),去掉本地临时改动,重跑 132 题。知识源 schema 是严格对象,顺序反了的话,旧环境安装会被拒。


    Analysis (for reviewers and agents)

    Served-tier: TIER_DEFAULT
    Analysed-by: project decision thread (initial analysis and adversarial review by isolated sub-agents; files in the maintainer's project: 决策分析-38692/Fable-检索协议分析.md, Fable-裁决复核.md)

    • Letter: A-variant relative to analysis comment 7269548416 (A full / B modes only / C defer / D plugin switch). Deviations from A: vectorWeight (vector share) instead of keywordWeight; weight sequenced after 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671 (phase 1b); per-call override phase 2, mode only; fusion/RRF constant/rerank/threshold/tokenizer stay out of the source schema; RRF constant not exposed as plugin option.
    • Governing text amended: ADR-0161 K8 rule 4 (L412), K1 Hybrid retrieval row (L102), title/D1/TL;DR wording, 2026-11-29 note rationale (L124), K4 "builds on every store". Rule 5 (closed list) satisfied by registering two members in the dated note.
    • Verified on main: fusion lives in fuse() (turso-adapter.ts:1631, pgvector-adapter.ts:1385), best = 2/(RRF_K+1); AdapterCapabilities holds only chunks; adapters register in start() after code-registered sources at init() (knowledge-service.ts:404-406), hence no init-time verdict; save admission in packages/metadata-core/src/knowledge-source-save-admission.ts excludes package installs.
    • Bit-identity at w = 0.5 holds only with the divide-by-best form (13,369/40,400 last-bit differences when rewritten as multiply-by-61); pin test required.
    • Keyword-only window: with final topK 8, a keyword-only rank-1 hit falls behind the 8th vector-only hit once w > 68/129 ≈ 0.53; window varies with topK and the ×5/×20 fetch rounds, so no fixed number is written into the protocol.
    • Process: card body needs a Ruled: line (added with this revision); the lane seat replaces the state label (suggested pm:blocked with Blocked-by: the ADR note PR) on Notify: ruling.

    Generated by Claude Code

  5. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

    2026-11-30T06:22Z · State after the ruling: needs-user-decision → pm:blocked.

    The maintainer's ruling is recorded in 7270218011, and the body's 06:16Z revision supersedes body sections 1, 2, 7 and 8. It sets out the phases:

    Blocked-by: the maintainer's knowledge pause of 2026-11-30T05:39Z (「暂时不开工新的知识任务」). When he lifts it, phase 0 is claimed first, and this card then waits on that PR (Blocked-by: the phase-0 PR). Phase 1b also waits on #38671, which is back in the queue under the same pause.

  6. added
    pm:blocked
    and removed
    needs-user-decision
    on Nov 30, 2026
  7. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

    2026-11-30T06:24Z · Claim · phase 0 and phase 1a of ruling 7270218011, on the maintainer's 「先解决 一期 a」 and 「零期: + 1a」 (2026-11-30T06:23Z). They lift the knowledge pause for this card's phase 0 and 1a only. Phases 1b and 2 stay unstarted.

    Claim: PM loop round 1
    Session: session_01JQwxbXyLoBzNYY1U8SNPFu
    Account: os-warren
    Branch: new branches, one per PR, named by claim amendments on the threads' first reports. Phase 0 is from origin/main at 5a77a7063e. Phase 1a PRs stack where the file they change is held: on #38700 (claude/project-thread-e6npb2) for service-knowledge, and on #38697 (claude/project-thread-slovhl-38676) for knowledge-turso. Everything else is from origin/main.
    Worktree: objectstack-issue-38692-p0, objectstack-issue-38692-1a
    Domain: domain:spec
    Seat: repo:objectstack#2
    Area: o2-A (area:ai)
    File surface:

  8. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 30, 2026
  9. 9 remaining items

  10. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-warren · session_01JQwxbaASqBozmmj1n5tbUf

    Phase 1a, the pgvector PR is open: #38745 (draft, stacked on #38720), built on main after #38726 (B2) merged as f782a12. It keeps B2's SET LOCAL statement_timeout ranking statement, its coded refusals (src/errors.ts) and its pool default of 20. Under mode: 'vector' it writes no keyword condition into any statement, pinned in retrieval-modes.test.ts (the same pin is on #38721 for turso). Against live PostgreSQL 16 + pgvector: 17 files, 154 tests passed. Landing order, as agreed: #38720, then #38721, #38722 and #38745, then #38730 and #38732. Read at 2026-11-30T10:01Z.

  11. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

    2026-11-30T17:01Z · Phase 1a landed. This seat releases the card to seat repo:objectstack#3 (os-steve), as a handover, not an abandonment.

    Phase 1a, source.retrieval.mode: all six PRs are on main.

    PR What it does Merge
    #38714 phase 0: ADR-0161 dated note 95ffacc
    #38720 spec: source declaration + adapter contract (AdapterCapabilities.retrieval, AdapterSearchOptions.retrieval, both optional per ruling 7272337479) f576dee
    #38722 service: effective mode, four refusal points (save 400, code registration, boot error log, search 503 SERVICE_UNAVAILABLE as the maintainer confirmed at 2026-11-30T12:40Z); liveness row live d316627
    #38721 knowledge-turso runs one leg or both 9bb2762
    #38745 knowledge-pgvector runs one leg or both 8a7e65b
    #38730 Studio retrieval-mode picker 643519b
    #38732 search_knowledge score text + AI skill row 09eea10

    Release. The work held under this seat's takeover of o2-A ends here. Provenance: who = the maintainer (Warren, os-warren); words, verbatim: 「ai 区也交接给 3号座位了,你不用接新任务。」; where = os-warren's fleet project timeline, 2026-11-30T12:46Z. This seat was told to land only the in-hand 1a PRs, and it has.

    Card state.

    • pm:dispatched is off and the assignee is off.
    • pm:on-hold is on, because phases 1b (vectorWeight, the hybrid ratio) and 2 (the per-search override) are still under the maintainer's knowledge hold (2026-11-30T05:39Z, with phase 0 and 1a released at 2026-11-30T06:23Z).
    • Restart condition: the maintainer's word releasing 1b or 2.

    Follow-up for the next owner, not filed: the Studio picker re-sends the index_status request on each keystroke of the draft's adapter (#38730 contract record N1).

  12. added
    pm:on-hold
    and removed
    pm:dispatched
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aidomain:specpm:on-holdpriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions