Add an off-by-default glossary match to `knowledge.search`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- clickhouse, python
調査の方向性
Start with server/memory/app/search/term_leg.py, server/memory/domain/definitions.py, and server/memory/domain/definition_check.py to understand governed name matching, then inspect the lexical leg in server/knowledge/api/models_knowledge.py. The issue defines five acceptance cases, but leaves a broad design and rollout evidence open. Done means the optional behavior meets those cases, preserves the context budget, and has the paired comparison and latency evidence described.
索引モデルが issue の本文から書いたものです。
説明
Company
ClickHouse
Component
Knowledge (documents)
Use case
In #1457 a team asks for the rule for an active account using an internal abbreviation. The authoritative definition uses the full term, and another team uses the same abbreviation for a different metric. That issue specifies the comparison against hybrid document search and its fixture, and leaves the mechanism open.
A comparison needs a defined treatment. memory.search already serves a governed definition when the query names its term or an alias. knowledge.search has no such step, so a query that uses only the abbreviation finds a passage only where the source text happens to contain it.
Describe the solution you'd like
An option on knowledge.search, off by default, as the treatment #1457 measures. This is a proposal; nothing is implemented or measured.
- Match. The query runs through the exact name matching
memory.searchhas for governed definitions. It adds no model call and no table. - Expand. A named definition adds lexical candidates for its other names. Passages that enter only this way take at most a fixed share of
top_kand never displace a direct match. The context budget is unchanged. - Ambiguity. When more than one scope, within the caller's access and the reply's audience, defines the matched alias differently, the reply returns the alternatives and expands nothing. The request names the scopes compared, because the existing match reads the addressed namespace only.
- Receipt. The reply carries the definition's key, version and content hash, and marks each passage that entered through an added name.
- Nothing stored. No retrieval hint is kept, so a demotion, a revoked grant or an erasure needs no cleanup path: each search reads the definitions as they are then. The existing match reads without sequential consistency, so a promotion on another replica a moment earlier can miss one search.
- The definition is navigation evidence. An answer still needs a current, authorized source passage, as #1457 requires.
What Loom has that this builds on:
server/memory/app/search/term_leg.pymatches a query against governed names within a work budget.server/memory/domain/definitions.pyfolds and compares names;server/memory/domain/definition_check.pydecides which definitions are governed.- The lexical leg of
knowledge.search(server/knowledge/api/models_knowledge.py) takes the added candidates.
Acceptance fixture, the four cases #1457 names plus one:
- An alias absent from the source text returns the required passage with the option on and not with it off.
- An alias two scopes define differently returns both alternatives and expands nothing.
- After a definition is promoted again with a changed alias list, a search that reads the new promotion uses the new revision only.
- A query with no glossary term returns the baseline's hit list, unchanged.
- After a demotion or a revoked grant no passage is marked.
Evidence still needed before rollout:
- The comparison #1457 specifies, on the same fixture and context budget, as a paired result with an interval. Proposed rule: widen exposure only if the lower bound of the recall gain is above zero and wrong-source matches do not rise.
- Wrong-source matches from a short alias that is also a common word.
- p95 latency with the added candidates.
- Whether
memory_shared_definitions_maxcaps a glossary of the size a team maintains.
Describe alternatives you've considered
- Put the glossary in the reader's prompt. That spends the context budget on every query and ignores scope.
- Ask a model which glossary entries the query uses. That adds a model call to each search, and #1457 asks for exact matches.
- Keep a separate glossary table for documents. That is a second copy of the governed definitions with its own review and erasure path.
Where the need comes from
An AI tool suggested this feature
Additional context
Found by source review; no search was run and no comparison was made.
Related: Proposed as part of #1457. Roadmap: #1232.
- 主要言語
- Python
- スター
- 263
- フォーク
- 47
- 平均マージ
- 14時間 21分
- マージ済み PR(30日)
- 873
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ClickHouse/loom のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
ClickHouse/loom#2014 ·
メンテナーはふだん 1 日以内に返信
-
Options of loom period-digest, reextract, reconcile-status and demote-activity-narration print no help text対応中かも @VanshajPoonia が今日担当しました。 オープンbug good first issue help wanted up-for-grabs
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ClickHouse/loom#1988 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
A compiler-tier checkout fetch from a shallow mirror never records its head対応中かも @KaloyanNaumov が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
ClickHouse/loom#2016 ·
メンテナーはふだん 1 日以内に返信
-
Delta workers fetch the compiler-tier checkout under a hard-coded 600 s limit対応中かも @KaloyanNaumov が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
ClickHouse/loom#2012 ·
メンテナーはふだん 1 日以内に返信
-
loom participant retire cannot retire an orphaned participant after container replacement or host reboot対応中かも @l0K1ngg が今日担当しました。 オープンbug help wanted up-for-grabs
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
ClickHouse/loom#2007 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
ClickHouse/loom の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
TigreGotico/orthography2ipa#2950 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Unstructured-IO/unstructured#4876 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openfoodfacts/openfoodfacts-python#579 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
fairagro/m4.2_sql_to_arc#388 ·
メンテナーはふだん 1 日以内に返信