Skip to content

fix: vector_search() always returns empty — E2E tests + LangChain similarity_search() #20

@polaz

Description

@polaz

Problem

CoordinodeClient.vector_search() always returns an empty list, even when nodes with embedding properties exist in the graph. This silently breaks:

  • CoordinodePropertyGraphStore.vector_query() in llama-index adapter
  • Any LangChain workflow relying on vector similarity
client = CoordinodeClient("localhost:7080")
results = client.vector_search(label="Chunk", property="embedding", vector=[...], top_k=5)
# → [] (always empty, even with data)

Root cause

This is a DB-side gap: VectorService gRPC endpoint exists and accepts requests, but the wiring from VectorService to the HNSW index executor is incomplete in CoordiNode v0.3. The RPC returns without querying the index.

Tracked as G073 in CoordiNode DB repository.

SDK work (after G073 is fixed in DB)

Once G073 is resolved and vector_search returns actual results:

  1. Add E2E integration testtest_vector_search_returns_results with a real embedding vector
  2. Add similarity_search() to LangChain adapter (CoordinodeGraph) — currently missing; should wrap client.vector_search() with label/property defaults
  3. Verify vector_query() in LlamaIndex adapter — test against live DB, confirm scores are correct (currently returns r.distance — verify this matches expected similarity semantics)

Acceptance criteria

  • client.vector_search(label="Chunk", property="embedding", vector=[...], top_k=5) returns results when data exists
  • Integration test passes against live CoordiNode instance
  • CoordinodeGraph.similarity_search(query_vector, k=5) implemented in LangChain adapter
  • LlamaIndex vector_query() tested E2E

Gate

Blocked by G073 — requires CoordiNode DB fix: VectorService → HNSW executor wiring.
Do not start SDK implementation until a CoordiNode release with G073 fixed is available.

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