Skip to content

Vectorstore Module

Overview

The Vectorstore module provides integration with vector databases for semantic search and retrieval capabilities. It enables document storage and retrieval for the RAG (Retrieval Augmented Generation) system.

Module Structure

vectorstore/
├── vectorstore.module.ts  # Module definition and dependency configuration
└── pinecone.service.ts    # Service for Pinecone vector database operations

Key Components

VectorstoreModule

The root module that configures dependencies for vector database operations:

  • Imports: ConfigModule, AzureModule (with forward reference)
  • Providers: PineconeService
  • Exports: PineconeService

PineconeService

Provides vector database operations: - Initialization of Pinecone client - Vector store creation and management - Document storage and retrieval - User-specific namespacing for data isolation

Configuration

The module is configured through environment variables:

PINECONE_API_KEY
PINECONE_ENVIRONMENT
PINECONE_INDEX