fix: make aiana installable and compatible with qdrant-client >= 1.12#17
Open
ry-ops wants to merge 2 commits into
Open
fix: make aiana installable and compatible with qdrant-client >= 1.12#17ry-ops wants to merge 2 commits into
ry-ops wants to merge 2 commits into
Conversation
Two bugs prevented the full (Qdrant-backed semantic) setup from working.
1. Unparseable pyproject.toml. Two optional-dependency entries had malformed
version specifiers with a doubled operator and stray quote:
"pytest>=">=9.0.3" -> "pytest>=9.0.3"
"cryptography>=">=46.0.6" -> "cryptography>=46.0.6"
This is invalid TOML ("Unclosed array"), so `pip install` failed before any
build step -- the package could not be installed at all.
2. QdrantStorage.search() used a removed client method. qdrant-client >= 1.12
removed Client.search() in favor of Client.query_points(). Because
_memory_search() wraps the Qdrant call in try/except, the resulting
AttributeError was swallowed and semantic search silently returned nothing.
Switched to query_points(query=..., ...).points (with_payload=True),
preserving the existing result mapping.
Verified end-to-end against a local Qdrant + local sentence-transformers
embedder: memory_add stores a 384-dim vector and memory_search retrieves it
(e.g. score ~0.6 for a paraphrased query).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
With all-MiniLM-L6-v2, clearly-relevant memories score ~0.40-0.48 for natural-language queries (e.g. 'what model does the MLX lab use' matched its target memory at 0.475), while irrelevant content scores < 0.1. The previous 0.5 floor silently dropped the relevant top hit, so memory_search returned nothing for reasonable queries. 0.3 surfaces the correct top result while still filtering noise. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three fixes so aiana's full (Qdrant-backed semantic) setup installs and actually returns results. Verified end-to-end on a fully local stack (local Qdrant + local
sentence-transformersembedder + a local MLX model via OpenCode).Bug 1 —
pyproject.tomlis unparseable (pip installfails)Two optional-dependency entries had malformed version specifiers (doubled operator + stray quote):
Invalid TOML (
tomllib.TOMLDecodeError: Unclosed array (at line 59)), so the package cannot be installed at all.Bug 2 —
QdrantStorage.search()calls a removed client methodqdrant-client >= 1.12removedQdrantClient.search()in favor ofQdrantClient.query_points(). The old call raisedAttributeError, which_memory_search()'stry/exceptsilently swallowed — so semantic search just returned nothing.Bug 3 — default
min_scoretoo strict (empty results for relevant queries)With
all-MiniLM-L6-v2, clearly-relevant memories score ~0.40–0.48 for natural-language queries, while irrelevant content scores < 0.1. Measured example:The old
min_score=0.5floor dropped these relevant top hits, somemory_searchreturned nothing for reasonable queries. Lowered the default to0.3, which surfaces the correct top result while still filtering noise.Verification
Python 3.13,
qdrant-client 1.18.0, local Qdrant +all-MiniLM-L6-v2:pip install -e .succeeds.memory_addstores a 384-dim vector inaiana_memories.memory_searchretrieves it viaquery_pointsand returns relevant hits at the new threshold.aiana_memory_addthenaiana_memory_search; both requests are visible in the Qdrant access log (PUT .../points,POST .../points/query).🤖 Generated with Claude Code