Skip to content

sessions-graph: embed messages, entities and edges in Memgraph #416

Description

@antejavor

Part of #390. Implements the decisions in #393.

What

  • Message embedding: a detached step at SESSION_END, independent of auto_reconcile, embeds the session's messages through MAGE's embeddings.text and stores the vectors in Memgraph. It costs no LLM, and the hook never waits on it.
  • Reconciliation: embeds the entity names and edge source sentences (r.text) it writes.
  • Catch-up command: embeds anything missing, including failed steps.
  • Model: BAAI/bge-small-en-v1.5 by default ([recall] embedding_model). The model name and dimension are recorded with the vectors, so a change is detected rather than mixing vectors.
  • doctor: checks that the MAGE embeddings module exists and the model loads.
  • Docs and bootstrap: move from memgraph/memgraph to memgraph-mage, with a 2 GiB minimum.

Done when

  • A real session's messages, entities and edges have vectors.
  • A model change is detected.
  • On a plain Memgraph, embedding is reported unavailable instead of failing silently.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions