ractogateway.rag.stores.pinecone_store
Pinecone vector store (lazy import).
Install with: pip install ractogateway[rag-pinecone]
- class ractogateway.rag.stores.pinecone_store.PineconeStore(index_name, *, api_key=None, namespace='', batch_size=100)[source]
Bases:
BaseVectorStoreVector store backed by Pinecone cloud.
- Parameters:
index_name (
str) – Name of the Pinecone index (must already exist).api_key (
str|None) – Pinecone API key. Falls back toPINECONE_API_KEYenv var.namespace (
str) – Pinecone namespace for logical data isolation.environment – Deprecated Pinecone environment string (for legacy pod-based indexes).
batch_size (
int) – Number of vectors per upsert batch.
- 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:
- 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).