feat: Support for vector search with Qdrant#381
feat: Support for vector search with Qdrant#381Anush008 wants to merge 7 commits intoMemPalace:developfrom
Conversation
Comprehensive Code Review AvailableA detailed review of this PR has been conducted and is available at: 📊 Review SummaryArchitecture: ⭐⭐⭐⭐½ (4.5/5) 🎯 Key FindingsStrengths:
Critical Issues (Must Fix Before Merge):
📋 Recommended ActionsP0 - Must Fix (2-3 hours):
P1 - Should Fix (4-6 hours):
🔗 Full AnalysisThe complete 508-line review includes:
Location: Estimated Effort: 7-11 hours to merge-ready state Review conducted using comprehensive PR analysis methodology. All findings documented with actionable recommendations. |
|
With regards to the AI recommended actions above,
|
web3guru888
left a comment
There was a problem hiding this comment.
Nice abstraction layer. The VectorCollection protocol in backends/__init__.py is the right approach — it lets integrators swap backends without touching application code.
One thing I noticed: the Qdrant path returns a proper QdrantCollection class that explicitly implements VectorCollection, but the ChromaDB path returns native ChromaDB collection objects that satisfy the protocol through duck typing. This works today, but it's fragile — if a future ChromaDB release renames or reorders parameters on .query() or .get(), the protocol match breaks silently (no isinstance check, no type error at construction time).
Might be worth wrapping Chroma in a thin adapter class too (like ChromaCollection(VectorCollection)), even if it's just delegation. That way both backends fail the same way if the contract drifts.
Also: The _scroll_cursor state on QdrantCollection makes .get() with pagination stateful at the instance level. If two callers paginate the same collection concurrently (e.g., MCP handler + CLI status), they'll clobber each other's cursor. The ChromaDB path doesn't have this issue because offset/limit are stateless. Consider making scroll state caller-managed or using a separate iterator pattern.
It's highly unlikely that Chroma would do this without a major release. If they did, even wrapping it in |
Formalizes the BaseCollection/BaseBackend contract introduced as a seam in #413 into an interchangeability spec that third-party backends can build to. Driven by six in-flight backend PRs (#574, #643, #665, #697, #700, #381) each implementing the interface differently. Key decisions captured: entry-point distribution, typed QueryResult/ GetResult replacing Chroma dict shape, daemon-first multi-palace model via PalaceRef, required where-clause subset (incl. $contains), mandatory embedder injection with model-identity validation, capability tokens, shared pytest conformance suite, and a backend-neutral migrate/verify CLI.
Hi 👋
Description
This PR adds support for using Qdrant as a vector search provider in MemPalace.
Qdrant is an open-source vector search engine for high performance and massive scale.
Changes
Testing
I've unit tested this integration against a local Qdrant instance.
Setup
You can run Qdrant with
Set
The dashboard is accessible at http://localhost:6333/dashboard
Checklist
python -m pytest tests/ -v)ruff check .)