entity 相似度提案者斷頭——alias 持久層完整但沒人餵 pending(entity-graph-embed 掏空後 base 端沒補建) #60
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[總管] 2026-07-17 讀 code 定性(leo 問「KBDB normalize 會把像不像存成 alias 嗎」)。
好消息:alias 持久層完整存在(leo 記憶正確):graph plugin 有 entity record(canonical+aliases_json)+
entity_pendingrecord(alias 候選+candidate_canonical+similarity 分數欄)+confirm/reject API——確認後addAlias把「像不像」的結論持久化成 alias。alias 一旦確認=exact-match 資產、不依賴任何 embedding model,模型換代 alias 不失效——這正是對「十年後模型失去辨識力」的正解結構。壞消息:提案者不存在:全庫沒有任何 code 會自動算相似度去建 pending alias。原本插件的
entity-graph-embed.ts(聚合 triplet 向量→認知向量→Vectorize)2026-06-14 依鐵律「embedding 非插件職責」掏空成 no-op 殼,註明「搬到基本盤 embed 模組」——沒人搬。現況 entity 查找只有 exact match(小寫去空白),新實體撞既有實體的變體時不會有人提案合併。建議修法(base embed 模組內):新實體寫入時(或批次 job)拿 canonical+gloss 打 Vectorize query 比對既有 entities,similarity 超閾值 →
createPendingAlias(API 已在),人/AI confirm 落 alias。與 #58(vector delete)/#59(model 可配置)同屬 embed 模組補完家族。附帶小缺口:
addAlias因 base 缺PUT /records/:id用「重建 record」workaround(entity-crud.ts:45 已註記)。[總管] 2026-07-17 leo 定案補充規格:
entity_pending補judge溯源欄:記判斷來源(model 名/服務/人)+判斷時間,與既有 similarity 欄並列——多 judge 並存時可稽核「誰說的、什麼時候說的」。system-dev/docs/3-specs/rag-wave1/normalize-and-retrieval-strategy.md)。