Re-embed memories when embeddingModel changes vector size

Abierto
#2 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript
Área
databases, search

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
0
Forks
0
Merge medio
20 h 29 min
PR fusionados (30 d)
28

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de HarperFast/agent-memory

Todos los issues de HarperFast/agent-memory

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.