> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-devupd-1765394015-eccef47.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Pinecone

> [Pinecone](https://docs.pinecone.io/docs/overview) is a vector database with broad functionality.

## Installation and Setup

Install the Python SDK:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-pinecone
  ```

  ```bash uv theme={null}
  uv add langchain-pinecone
  ```
</CodeGroup>

## Vector store

There exists a wrapper around Pinecone indexes, allowing you to use it as a vectorstore,
whether for semantic search or example selection.

```python theme={null}
from langchain_pinecone import PineconeVectorStore
```

For a more detailed walkthrough of the Pinecone vectorstore, see [this notebook](/oss/python/integrations/vectorstores/pinecone)

### Sparse Vector store

LangChain's `PineconeSparseVectorStore` enables sparse retrieval using Pinecone's sparse English model. It maps text to sparse vectors and supports adding documents and similarity search.

```python theme={null}
from langchain_pinecone import PineconeSparseVectorStore

# Initialize sparse vector store
vector_store = PineconeSparseVectorStore(
    index=my_index,
    embedding_model="pinecone-sparse-english-v0"
)
# Add documents
vector_store.add_documents(documents)
# Query
results = vector_store.similarity_search("your query", k=3)
```

For a more detailed walkthrough, see the [Pinecone Sparse Vector Store notebook](/oss/python/integrations/vectorstores/pinecone_sparse).

### Sparse Embedding

LangChain's `PineconeSparseEmbeddings` provides sparse embedding generation using Pinecone's `pinecone-sparse-english-v0` model.

```python theme={null}
from langchain_pinecone.embeddings import PineconeSparseEmbeddings

# Initialize sparse embeddings
sparse_embeddings = PineconeSparseEmbeddings(
    model="pinecone-sparse-english-v0"
)
# Embed a single query (returns SparseValues)
query_embedding = sparse_embeddings.embed_query("sample text")

# Embed multiple documents (returns list of SparseValues)
docs = ["Document 1 content", "Document 2 content"]
doc_embeddings = sparse_embeddings.embed_documents(docs)
```

For more detailed usage, see the [Pinecone Sparse Embeddings notebook](/oss/python/integrations/vectorstores/pinecone_sparse).

## Retrievers

### Pinecone Hybrid Search

<CodeGroup>
  ```bash pip theme={null}
  pip install pinecone pinecone-text
  ```

  ```bash uv theme={null}
  uv add pinecone pinecone-text
  ```
</CodeGroup>

```python theme={null}
from langchain_community.retrievers import (
    PineconeHybridSearchRetriever,
)
```

For more detailed information, see [this notebook](/oss/python/integrations/retrievers/pinecone_hybrid_search).

### Self Query retriever

Pinecone vector store can be used as a retriever for self-querying.

***

<Callout icon="pen-to-square" iconType="regular">
  [Edit the source of this page on GitHub.](https://github.com/langchain-ai/docs/edit/main/src/oss/python/integrations/providers/pinecone.mdx)
</Callout>

<Tip icon="terminal" iconType="regular">
  [Connect these docs programmatically](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
</Tip>
