mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-06-11 09:24:44 +02:00
feat(knowledge): add Qdrant backend with SQLite fallback
- Add QdrantKnowledgeSearch class for hybrid dense+sparse vector search - Query RECON's 2.8M vector database via TEI embeddings + Qdrant - Uses RRF (Reciprocal Rank Fusion) for hybrid search merging - Extended KnowledgeConfig with Qdrant/TEI settings - Auto backend tries Qdrant first, falls back to SQLite FTS5 - Graceful degradation if RECON infrastructure unreachable Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6119f33f57
commit
b11874f016
3 changed files with 255 additions and 14 deletions
|
|
@ -154,9 +154,22 @@ class MeshMonitorConfig:
|
|||
|
||||
@dataclass
|
||||
class KnowledgeConfig:
|
||||
"""FTS5 knowledge base settings."""
|
||||
"""Knowledge base settings."""
|
||||
|
||||
enabled: bool = False
|
||||
backend: str = "auto" # "qdrant", "sqlite", or "auto" (try qdrant, fall back to sqlite)
|
||||
|
||||
# Qdrant / RECON settings
|
||||
qdrant_host: str = "" # e.g., "192.168.1.150"
|
||||
qdrant_port: int = 6333
|
||||
qdrant_collection: str = "recon_knowledge_hybrid"
|
||||
tei_host: str = "" # TEI embedding service host
|
||||
tei_port: int = 8090
|
||||
sparse_host: str = "" # Sparse embedding service host
|
||||
sparse_port: int = 8091
|
||||
use_sparse: bool = True # Enable hybrid dense+sparse search
|
||||
|
||||
# SQLite fallback settings
|
||||
db_path: str = ""
|
||||
top_k: int = 5
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue