ractogateway.rag.stores.base
Abstract base class for vector stores.
- class ractogateway.rag.stores.base.BaseVectorStore[source]
Bases:
ABCPersist and search embedding vectors.
All vector stores share the same interface:
add(),search(),delete(),clear(), andcount(). The underlying storage backend is determined by the concrete subclass.- abstractmethod add(chunks)[source]
Add chunks (with embeddings) to the store.
- Parameters:
chunks (
list[Chunk]) – Chunks to index. Each chunk must have a non-Noneembedding.- Raises:
ValueError – If any chunk has
embedding=None.- Return type:
- abstractmethod search(embedding, top_k=5, filters=None)[source]
Search for the top_k most similar chunks.
- Parameters:
- Return type:
- Returns:
list[RetrievalResult] – Ranked list of results (rank 1 = most similar).
- abstractmethod delete(chunk_ids)[source]
Remove chunks with the given IDs from the store.
- Return type: