This quickstart walks you through creating a Pinecone index and building a sample application for semantic search, recommendations, or RAG.Documentation Index
Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt
Use this file to discover all available pages before exploring further.
Prefer the command line? Try the Pinecone CLI!
Prefer the command line? Try the Pinecone CLI!
-
Install the CLI.
-
Authenticate and get started using Pinecone!
Get set up
To get started, you’ll need a Pinecone account and API key.1. Create a Pinecone account
If you’re new to Pinecone, sign up at app.pinecone.io and choose a plan:- Starter plan (free): Free access to most features, but you’re limited to one cloud region and need to stay under Starter plan limits.
-
Builder plan ($20/month): Higher quotas than Starter and predictable flat pricing with no usage overages. Ideal for small production apps. Indexes must be in the
us-east-1region of AWS. - Standard plan trial: 21 days and $300 in credits with access to Standard plan features and higher limits that let you test Pinecone at scale.
If you’re already on a Starter plan, you can upgrade to Builder at any time, or activate a Standard plan trial (one trial per organization).
2. Get a Pinecone API key
Create a new API key in the Pinecone console, or use the widget below to generate a key. If you don’t have a Pinecone account, the widget will sign you up for the free Starter plan.Build with Pinecone
Choose your approach to build with Pinecone below. Each approach achieves the same result—building a sample app for semantic search—but uses different tools and workflows.- Manual
- Cursor
- Claude Code
- n8n
Use Pinecone’s SDKs to manually create indexes, upsert data, and run queries.Upsert the sample dataset into a new namespace in your index.Because your index is integrated with an embedding model, you provide the textual statements and Pinecone converts them to dense vectors automatically.Pinecone is eventually consistent, so there can be a slight delay before new or changed records are visible to queries. You can view index stats to check if the current vector count matches the number of vectors you upserted (50):The response looks like this:Notice that most of the results are about historical structures and monuments. However, a few unrelated statements are included as well and are ranked high in the list, for example, a statement about Shakespeare.Notice that all of the most relevant results about historical structures and monuments are now ranked highest.
1. Install an SDK
Install the SDK for your preferred language:2. Create an index
This quickstart builds a semantic-search app on an index with dense vectors integrated with an embedding model hosted by Pinecone. You upsert and search with text, and Pinecone generates the vectors for you. For other ways to model and search data in Pinecone, see Index.If you prefer to use external embedding models, see Bring your own vectors.
3. Upsert text
Prepare a sample dataset of factual statements from different domains like history, physics, technology, and music. Model the data as records with an ID, text, and category.4. Semantic search
Search the index for ten records that are most semantically similar to the query, “Famous historical structures and monuments”.Again, because your index is integrated with an embedding model, you provide the query as text and Pinecone converts the text to a dense vector automatically.5. Rerank results
To get a more accurate ranking, search again but this time rerank the initial results based on their relevance to the query.6. Improve results
Reranking results is one of the most effective ways to improve search accuracy and relevance, but there are many other techniques to consider. For example:- Filtering by metadata: When records contain additional metadata, you can limit the search to records matching a filter expression.
-
Full-text search: For workflows where keyword and phrase matching matter (product SKUs, email addresses, domain-specific terms), we recommend an index with a document schema with one or more
stringfields declared withfull_text_searchenabled. It uses BM25 ranking on those FTS-enabled fields and supports Lucene query syntax, plus the text match operators ($match_phrase,$match_all,$match_any). A multi-field schema can declare BM25-indexedstringfields alongside adense_vectororsparse_vectorfield on the same index — combine them by restricting a dense (or sparse) search with a text-match filter on the lexical field, or by running separate searches and merging the results client-side. - Hybrid search: For vector-centric workflows on the vector API that need both dense and sparse vectors in a single index. For document-centric workflows, a multi-field document schema is the recommended path.
- Chunking strategies: You can chunk your content in different ways to get better results. Consider factors like the length of the content, the complexity of queries, and how results will be used in your application.
7. Clean up
When you no longer need your example index, delete it as follows:Next steps
Index data
Learn more about storing data in Pinecone
Search
Explore different forms of vector search.
Optimize
Find out how to improve performance