Build knowledgeable AI
Pinecone serverless lets you deliver remarkable GenAI applications faster.
Build knowledgeable AI applications in minutes
Quickstart
Start building with a serverless vector database today
Create an account and your first index in 30 seconds, then upload a few vector embeddings from any model… or a few billion.
Get Started
Generate your API key and implement in seconds.
# Install these packages:
# !pip install pinecone
# !pip install pinecone_datasets
from pinecone import Pinecone, ServerlessSpec
from pinecone_datasets import load_dataset
# Initialize Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
# Create the index if it doesn't already exist
pc.create_index(name="hello-pinecone", dimension=1536, spec=ServerlessSpec(cloud='aws', region='us-east-1'))
# Connect to the index
index = pc.Index(name='hello-pinecone')
# Load the dataset
dataset = load_dataset("langchain-python-docs-text-embedding-ada-002")
# Define a function to upsert batches
def upsert_batch(batch):
index.upsert(vectors=batch)
print("Your index has been created! Uploading a few items from the dataset...")
# Upsert the first 1000 entries from the dataset
for i, batch in enumerate(dataset.iter_documents(batch_size=50)):
index.upsert(vectors=batch)
if (i + 1) * 50 >= 1000:
break
# Function to get the first entry
def get_first_entry(dataset):
for batch in dataset.iter_documents(batch_size=1):
return batch[0]['values'].tolist()
# Query the index
print(index.query(
vector=get_first_entry(dataset),
top_k=1,
include_values=True,
include_metadata=True
))
Pinecone is the vector database that helps power AI for the world’s best companies
Start and scale seamlessly
Create an account and your first index in 30 seconds, then upload a few vector embeddings from any model… or a few billion.
Perform low-latency vector search to retrieve relevant data for search, RAG, recommendation, detection, and other applications.
Pinecone is serverless so you never have to worry about managing or scaling the database.
from pinecone import Pinecone, ServerlessSpec
# Create a serverless index
# "dimension" needs to match the dimensions of the vectors you upsert
pc = Pinecone(api_key="YOUR_API_KEY")
pc.create_index(name="products", dimension=1536,
spec=ServerlessSpec(cloud='aws', region='us-east-1')
)
# Target the index
index = pc.Index("products")
# Mock vector and metadata objects (you would bring your own)
vector = [0.010, 2.34,...] # len(vector) = 1536
metadata = {"id": 3056, "description": "Networked neural adapter"}
# Upsert your vector(s)
index.upsert(
vectors=[
{"id": "some_id", "values": vector, "metadata": metadata}
]
)
Search and scale seamlessly
Perform low-latency vector search to retrieve relevant data for search, RAG, recommendation, detection, and other applications.
Quickstart Guide# Mock vectorized search query (vectorize with LLM of choice)
query = [0.13, 0.45, 1.34, ...] # len(query) = 1536, same as the indexed vectors
# Send query with (optional) filter to index and get back 1 result (top_k=1)
index.query(
vector=query,
filter={"description": {"$eq": "Networked neural adapter"}},
top_k=1
)
More relevant results make better applications
Filter by
metadata
Combine vector search with familiar metadata filters to get just the results you want.
Find
context
Fast and accurate vector search over all your data.
Update in
real time
As your data changes, the Pinecone index is updated in realtime to provide the freshest results.
Make (the right)
keywords matter
Combine vector search with keyword boosting for the best of both worlds (hybrid search).
30k+
organizations
96%
recall*
51ms
query latency (p95)*
Part of the developer-favorite AI stack
Use Pinecone with your favorite cloud provider, data sources, models, frameworks, and more.
Data source
Embedding model
Pinecone Vector Database
Search application
Join the movement
Join a growing community of 400,000+ ambitious developers building the next generation of applications with Pinecone.
Events
Learn and connect with your peers, in person and online.
Billions
of records in Pinecone
Notion is leading the AI productivity revolution. Our launch of a first-to-market AI feature was made possible by Pinecone serverless. Their technology enables our Q&A AI to deliver instant answers to millions of users, sourced from billions of documents. Best of all, our move to their latest architecture has cut our costs by 60%, advancing our mission to make software toolmaking ubiquitous.
Akshay Kothari
Co-Founder and COO, Notion
Secure and Enterprise-ready
Meet security and operational requirements to bring AI products to market faster.
Secure
Control your data and know it’s safe. Pinecone is SOC 2 and HIPAA certified.
Reliable
Powering mission-critical applications of all sizes, with support SLAs and observability.
Cloud-native
Fully managed in the cloud of your choice. Also available via marketplaces: AWS, Azure, GCP.
Start building knowledgeable AI now
Create your first index for free, then upgrade and pay as you go when you're ready to scale, or talk to sales.