Skip to content

fix(memory): replace deprecated search_points with query() API in QdrantOps#3428

Merged
bug-ops merged 1 commit intomainfrom
3425-qdrant-query-api
Apr 26, 2026
Merged

fix(memory): replace deprecated search_points with query() API in QdrantOps#3428
bug-ops merged 1 commit intomainfrom
3425-qdrant-query-api

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 26, 2026

Summary

  • Replaces client.search_points(SearchPointsBuilder::new(...)) with client.query(QueryPointsBuilder::new(...)) in QdrantOps::search
  • Removes the l2_normalize workaround added in fix(memory): normalize gRPC query vector to fix near-zero cosine scores #3422 — Ollama embeddings are already unit-normalized (norm ≈ 1.0), so it had no effect
  • Fixes skill injection scores: the deprecated gRPC search_points path returned ~0.011 cosine scores; the new query() API returns ~0.53 for the same vectors

Root Cause

The deprecated legacy gRPC search_points path does not handle cosine normalization correctly, producing near-zero scores. The query() API (recommended by qdrant-client 1.17.0) returns correct scores. All skill candidates were falling below the 0.20 injection threshold, so zero skills were injected per turn.

Test Plan

  • cargo build -p zeph-memory — passes
  • cargo clippy -p zeph-memory -- -D warnings — zero warnings
  • cargo nextest run --workspace --lib --bins — 8593 tests pass
  • Live session test: run agent with cargo run --features full -- --config .local/config/testing.toml, verify skill injection scores ≥ 0.3 in WARN log

Closes #3425

@github-actions github-actions Bot added memory zeph-memory crate (SQLite) rust Rust code changes bug Something isn't working size/M Medium PR (51-200 lines) labels Apr 26, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 26, 2026 00:40
…antOps

The deprecated gRPC search_points path produced near-zero cosine scores
(~0.011) for skill injection, causing all candidates to fall below the
0.20 threshold and zero skills to be injected per turn.

Replace SearchPointsBuilder + client.search_points() with
QueryPointsBuilder + client.query() as recommended by qdrant-client
1.17.0. The Query API returns correct scores (~0.53) for the same
unit-normalized vectors.

Also remove the l2_normalize workaround added in #3422 — it had no
effect since Ollama embeddings are already unit-normalized (norm ≈ 1.0).

Closes #3425
@bug-ops bug-ops force-pushed the 3425-qdrant-query-api branch from cff63e3 to 5fdc6ca Compare April 26, 2026 00:46
@bug-ops bug-ops merged commit d8282c1 into main Apr 26, 2026
32 checks passed
@bug-ops bug-ops deleted the 3425-qdrant-query-api branch April 26, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working memory zeph-memory crate (SQLite) rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(memory): #3422 l2-normalize fix incomplete — skill injection scores still 0.011 despite normalization

1 participant