Skip to content

lightrag-memgraph: vector query() silently drops dead candidates with no signal #225

Description

@antejavor

What's wrong

MemgraphVectorStorage.query() in integrations/lightrag-memgraph/src/lightrag_memgraph/vector_impl.py silently drops any vector-search candidate that no longer exists (dead due to Memgraph's deferred GC after a delete) — with no signal to the caller that fewer than top_k genuinely-live results were found.

If a bulk delete just ran, a query could return fewer than top_k (or zero) live results with no indication the shortfall is due to GC lag rather than a genuine lack of matching content. LightRAG's retrieval pipeline (and any other caller) has no way to distinguish "nothing else was similar enough" from "results were silently discarded".

Acceptance criteria

  • query() logs (at least at debug/warning level) when the raw vector_search.search() hit count differs from the live-candidate count returned, including the counts
  • Document this behavior (README or docstring) as a known Memgraph limitation so callers know under-return is possible

Blocked by

None - can start immediately

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions