Skip to main content

Pinecone

Pinecone is a managed vector database service designed for machine learning applications, offering both serverless and pod-based deployment options.

Key Features

  • Managed Service: Fully managed with no infrastructure to maintain
  • Serverless Option: Pay-per-use pricing with automatic scaling
  • High Performance: Optimized for low-latency vector search
  • Metadata Filtering: Advanced filtering on vector metadata
  • Namespaces: Organize vectors into separate namespaces within an index

Setup & Installation

Pinecone Cloud:
  • Sign up at pinecone.io
  • Create a new index with the desired dimensions
  • Get your API key and index host URL from the console
Local Development (Pinecone Local):
docker run -d \
  --name pinecone-local \
  -p 5081:5081 \
  ghcr.io/pinecone-io/pinecone-index:latest

Configuration Options

vectorConfig := &vectorstore.Config{
    Enabled: true,
    Type:    vectorstore.VectorStoreTypePinecone,
    Config: vectorstore.PineconeConfig{
        APIKey:    "your-pinecone-api-key",
        IndexHost: "your-index-host.svc.environment.pinecone.io",
    },
}

store, err := vectorstore.NewVectorStore(context.Background(), vectorConfig, logger)
For local development with Pinecone Local, any API key value works (e.g., “pclocal”). The index host should point to localhost:5081 by default.
Pinecone requires all IDs to be unique strings. Namespaces are created automatically when you first upsert vectors.
For the VectorStore interface API and usage examples, see Vector Store Architecture. For semantic caching setup, see Semantic Caching.