-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
databaseneeds-triageNew issue that hasn't been reviewed/prioritized yetNew issue that hasn't been reviewed/prioritized yettaskGeneral work item (implementation, setup, cleanup) – most common labelGeneral work item (implementation, setup, cleanup) – most common label
Milestone
Description
Description
Create a clean, persistent FAISS vector store abstraction that links vectors to SQLite metadata (incidents / model versions) for efficient RAG-style retrieval in the Assistant (and limited edge use).
Type
- Task
Focus Area (pick one)
- Shared Utils & Models
Priority
- Medium
Acceptance Criteria
- File:
shared/src/database/faiss.py— low-level wrapper - File:
shared/src/database/faiss_service.py— higher-level service - Supports:
-
add_vectors(vectors: np.ndarray, metadata: list[dict]) → list[int] -
search(query_vector: np.ndarray, k: int = 5) → list[dict](with score + metadata)
-
- Default index:
IndexFlatL2(MVP); future path forIndexIVFFlat - Persistent save/load via
faiss.write_index/faiss.read_index - Index path from Pydantic Settings
- Metadata rows inserted into
faiss_vectors_metadatatable (vector_id FK) - Async-friendly (run FAISS sync calls in thread if needed)
- Health check: index size, dimension consistency
- Unit tests: mock vectors, search recall, persistence round-trip
- Google-style docstrings + full type hints
Blocker / Dependencies
- [Database] Define Pydantic v2 models and initial relational schema
- [Database] Implement robust async SQLite session factory + connection pooling
Notes / Links
- Related files:
shared/src/database/schemas.py,shared/src/core/settings.py - Reference: FAISS wiki + Python bindings documentation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
databaseneeds-triageNew issue that hasn't been reviewed/prioritized yetNew issue that hasn't been reviewed/prioritized yettaskGeneral work item (implementation, setup, cleanup) – most common labelGeneral work item (implementation, setup, cleanup) – most common label
Projects
Status
Manual QA Testing