Re-embed memories when embeddingModel changes vector size

オープン
#2 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript
領域
databases, search

調査の方向性

Read DESIGN.md sections “Search and bootstrap” and “One vector space” to understand the stated constraints. Then locate the Memory model, embedding option reload handling, and vector index setup; the issue does not name their files or tests. Done means existing rows are re-embedded with the configured model and a dimension-changing reload is handled safely.

索引モデルが issue の本文から書いたものです。

説明

Problem

embeddingModel can be changed in the plugin options, but rows already embedded by the previous model are not re-embedded. Harper's HNSW index fixes its vector size at the first vector, so a model with a different size:

  • leaves new and revised rows out of the vector index (Harper skips them with a warning);
  • makes vector queries fail, so search falls back to full-text only and logs it once per model;
  • keeps rows written under the mismatched model out of the vector lane even after the option is reverted, until each is revised.

Nothing rejects or warns about the change when the options reload. Same-size model switches are handled: the vector lane only compares rows tagged with the configured embeddingModel, and older rows stay reachable through full-text.

Proposed

A migration that re-embeds every Memory row with the configured model, rebuilding the vector index when its size changes, plus a check that refuses (or warns about) a dimension-changing reload until the migration runs.

Refs: the v0 core PR (DESIGN.md "Search and bootstrap", "One vector space").

Review-Deferral: 6ceee23de50a8167 severity=minor category=reliability

🤖 Generated by Claude Opus 5.5 (Claude Code); posted via @kriszyp.

主要言語
JavaScript
スター
0
フォーク
0
平均マージ
20時間 29分
マージ済み PR(30日)
28

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

HarperFast/agent-memory のほかの issue

HarperFast/agent-memory の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。