Pinecone is a vector database with broad functionality.This notebook goes over how to use a retriever that under the hood uses Pinecone and Hybrid Search. The logic of this retriever is taken from this documentation To use Pinecone, you must have an API key and an Environment. Here are the installation instructions.
OpenAIEmbeddings so we have to get the OpenAI API Key.
Setup Pinecone
You should only have to do this part once.Get embeddings and sparse encoders
Embeddings are used for the dense vectors, tokenizer is used for the sparse vectorLoad Retriever
We can now construct the retriever!Add texts (if necessary)
We can optionally add texts to the retriever (if they aren’t already in there)Use Retriever
We can now use the retriever!Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.