Pinecone Tutorial: Cloud Vector Database

Pinecone is a fully managed vector database.

Learn to use Pinecone for semantic search and RAG.

Getting Started

1. Create Pinecone account

2. Get API key

3. Create an index

4. Start adding vectors

Installation

pip install pinecone-client

Example

import pinecone

pinecone.init(api_key=”your-key”, environment=”us-west1″)

pinecone.create_index(“my-index”, dimension=1536)

index = pinecone.Index(“my-index”)

index.upsert([(“id1”, embedding1, {“text”: “hello”})])

results = index.query(vector=query_embedding, top_k=5)

Pricing

Free tier available. Paid plans scale with usage.

Conclusion

Pinecone is easy to use and scalable!

Leave a Comment