id stringlengths 14 15 | text stringlengths 92 1.69k | source stringclasses 25
values |
|---|---|---|
b55bd8ef143b-11 | "metadata": {"genre": "comedy", "year": 2019}
},
{
"id": "D",
"values": [0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4],
"metadata": {"genre": "drama"}
},
{
"id": "E",
"values": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
"metadata": {"genre": "drama"}
... | https://docs.pinecone.io/docs/insert-data |
b55bd8ef143b-12 | Upserting vectors with sparse values
Sparse vector values can be upserted alongside dense vector values.
Pythoncurl index = pinecone.Index('example-index') | https://docs.pinecone.io/docs/insert-data |
b55bd8ef143b-13 | upsert_response = index.upsert(
vectors=[
{'id': 'vec1',
'values': [0.1, 0.2, 0.3, 0.4],
'metadata': {'genre': 'drama'},
'sparse_values': {
'indices': [10, 45, 16],
'values': [0.5, 0.5, 0.2]
}},
{'id': 'vec2',
'values': [0.2, 0.3, 0.4, 0.5]... | https://docs.pinecone.io/docs/insert-data |
b55bd8ef143b-14 | 0.2,
0.3,
0.4
],
"sparseValues": {
"indices": [
10,
45,
16
],
"values": [
0.4,
... | https://docs.pinecone.io/docs/insert-data |
b55bd8ef143b-15 | Limitations
The following limitations apply to upserting sparse vectors:
You cannot upsert sparse vector values without a dense vector values.
Only s1 and p1 pod types using the dotproduct metric support querying sparse vectors. There is no error at upsert time: if you attempt to query any other pod type using sparse ... | https://docs.pinecone.io/docs/insert-data |
e26508dec703-0 | Overview
This document describes how to make backup copies of your indexes using collections.
To learn how to create an index from a collection, see Manage indexes.
⚠️WarningThis document uses collections. This is a public preview
feature. Test thoroughly before using this feature with production workloads.
Create a b... | https://docs.pinecone.io/docs/back-up-indexes |
e26508dec703-1 | Check the status of a collection
To retrieve the status of the process creating a collection and the size of the collection, use the describe_collection operation. Specify the name of the collection to check. You can only call describe_collection on a collection in the current project.
The describe_collection operation... | https://docs.pinecone.io/docs/back-up-indexes |
e26508dec703-2 | Results
Shellexample-collection
Delete a collection
To delete a collection, use the delete_collection operation. Specify the name of the collection to delete.
Deleting the collection takes several minutes. During this time, the describe_collection operation returns the status "deleting".
Example
The following example ... | https://docs.pinecone.io/docs/back-up-indexes |
3d66538aad8c-0 | In this topic, we explain how you can scale your indexes horizontally and vertically.
Projects in the gcp-starter environment do not support the features referred to here, including pods, replicas, and collections.
Vertical vs. horizontal scaling
If you need to scale your environment to accommodate more vectors, you ca... | https://docs.pinecone.io/docs/scaling-indexes |
3d66538aad8c-1 | You can only scale index sizes up and cannot scale them back down.
See our learning center for more information on vertical scaling.
Horizontal scaling
There are two approaches to horizontal scaling in Pinecone: adding pods and adding replicas. Adding pods increases all resources but requires a pause in upserts; adding... | https://docs.pinecone.io/docs/scaling-indexes |
3d66538aad8c-2 | Pause upserts.
Create a collection from the current index.
Create an index from the collection with new parameters.
Continue upserts to the newly created index. Note: the URL has likely changed.
Delete the old index if desired.
Adding replicas
Each replica duplicates the resources and data in an index. This means that... | https://docs.pinecone.io/docs/scaling-indexes |
15c98f511782-0 | In this section, we explain how you can get a list of your indexes, create an index, delete an index, and describe an index.
To learn about the concepts related to indexes, see Indexes.
⚠️WarningIndexes on the Starter (free) plan are deleted after 7 days of inactivity. To
prevent this, send any API request or log into... | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-1 | Creating an index
The simplest way to create an index is as follows. This gives you an index with a single pod that will perform approximate nearest neighbor (ANN) search using cosine similarity:
PythonJavaScriptcurlpinecone.create_index("example-index", dimension=128)
await pinecone.createIndex({
name: "example-inde... | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-2 | A more complex index can be created as follows. This creates an index that measures similarity by Euclidean distance and runs on 4 s1 (storage-optimized) pods of size x1:
PythonJavaScriptcurlpinecone.create_index("example-index", dimension=128, metric="euclidean", pods=4, pod_type="s1.x1")
await pinecone.createIndex({
... | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-3 | Create an index from a collection
To create an index from a collection, use the create_index operation and provide a source_collection parameter containing the name of the collection from which you wish to create an index. The new index is queryable and writable.
Creating an index from a collection generally takes abou... | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-4 | For more information about each pod type and size, see Indexes.
For the full list of parameters available to customize an index, see the create_index API reference.
Changing pod sizes
The default pod size is x1. After index creation, you can increase the pod size for an index.
Increasing the pod size of your index does... | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-5 | -H 'Content-Type: application/json' \
-d '{
"pod_type": "s1.x2"
}
}' | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-6 | Checking the status of a pod size change
To check the status of a pod size change, use the describe_index operation. The status field in the results contains the key-value pair "state":"ScalingUp" or "state":"ScalingDown" during the resizing process and the key-value pair "state":"Ready" after the process is complete.
... | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-7 | Replicas
You can increase the number of replicas for your index to increase throughput (QPS). All indexes start with replicas=1.
Indexes in the gcp-starter environment do not support replicas.
Example
The following example uses the configure_index operation to set the number of replicas for the index example-index to 4... | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-8 | See the configure_index API reference for more details.
Selective metadata indexing
By default, Pinecone indexes all metadata. When you index metadata fields, you can filter vector search queries using those fields. When you store metadata fields without indexing them, you keep memory utilization low, especially when y... | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-9 | The value for the metadata_config parameter is a JSON object containing the names of the metadata fields to index.
JSON{
"indexed": [
"metadata-field-1",
"metadata-field-2",
"metadata-field-n"
]
}
When you provide a metadata_config object, Pinecone only indexes the metadata fields prese... | https://docs.pinecone.io/docs/manage-indexes |
15c98f511782-10 | pinecone.create_index("example-index", dimension=128,
metadata_config=metadata_config)
pinecone.createIndex({
name: "example-index",
dimension: 128,
metadata_config: {
indexed: ["genre"],
},
});
curl -i -X POST https://controller.us-west1-gcp.pinecone.io/databases \
-H 'Api-Key: YOUR... | https://docs.pinecone.io/docs/manage-indexes |
76a3b703550b-0 | Overview
This document describes concepts related to Pinecone indexes. To learn how to create or modify an index, see Manage indexes.
An index is the highest-level organizational unit of vector data in Pinecone. It accepts and stores vectors, serves queries over the vectors it contains, and does other vector operations... | https://docs.pinecone.io/docs/indexes |
76a3b703550b-1 | Each s1 pod has enough capacity for around 5M vectors of 768 dimensions.
p1 pods
These performance-optimized pods provide very low query latencies, but hold fewer vectors per pod than s1 pods. They are ideal for applications with low latency requirements (<100ms).
Each p1 pod has enough capacity for around 1M vectors o... | https://docs.pinecone.io/docs/indexes |
76a3b703550b-2 | Pod size and performance
Pod performance varies depending on a variety of factors. To observe how your workloads perform on a given pod type, experiment with your own data set.
Each pod type supports four pod sizes: x1, x2, x4, and x8. Your index storage and compute capacity doubles for each size step. The default pod ... | https://docs.pinecone.io/docs/indexes |
76a3b703550b-3 | euclidean
This is used to calculate the distance between two data points in a plane. It is one of the most commonly used distance metric. For an example, see our image similarity search example.
When you use metric='euclidean', the most similar results are those with the lowest score.
cosine
This is often used to f... | https://docs.pinecone.io/docs/indexes |
61bf244afc2f-0 | Overview
If you are a project owner, follow these steps to change the name of your project.
Access the Pinecone Console.
Click Settings in the left menu.
In the Settings view, click the PROJECTS tab.
Next to the project you want to update, click .
Under Project Name, enter the new project name.
Click SAVE C... | https://docs.pinecone.io/docs/rename-project |
02acbd55900d-0 | Overview
If you are a project owner, follow these steps to change the maximum total number of pods in your project.
Change project pod limit in console
Access the Pinecone Console.
Click Settings in the left menu.
In the Settings view, click the PROJECTS tab.
Next to the project you want to update, click .
Under Pod L... | https://docs.pinecone.io/docs/change-project-pod-limit |
4b96f1fef33d-0 | Overview
If you are a project or organization owner, follow these steps to add users to organizations and projects.
Add users to projects and organizations
Access the Pinecone Console.
Click Settings in the left menu.
In the Settings view, click the USERS tab.
Click +INVITE USER.
(Organization owner only) Se... | https://docs.pinecone.io/docs/add-users-to-projects-and-organizations |
e4c8b57346db-0 | Overview
ℹ️InfoStarter (free) users can only have 1 owned project. To create a new project, Starter users must upgrade to the Standard or Enterprise plan or delete their default project.
Follow these steps to create a new project:
Access the Pinecone Console.
Click Organizations in the left menu.
In the Organizat... | https://docs.pinecone.io/docs/create-project |
aa8954e9aa20-0 | Overview
This document explains the concepts related to Pinecone projects.
Projects contain indexes and users
Each Pinecone project contains a number of indexes and users. Only a user who belongs to the project can access the indexes in that project. Each project also has at least one project owner. All of the pods in ... | https://docs.pinecone.io/docs/projects |
aa8954e9aa20-1 | Cloud regionenvironment valueTier availabilityGCP Starter (Iowa)*gcp-starterStarterGCP US-West-1 Free (N. California)us-west1-gcp-freeStarterGCP Asia-Southeast-1 (Singapore)asia-southeast1-gcp-freeStarterGCP US-West-4 (Las Vegas)us-west4-gcpStarterGCP US-West-1 (N. California)us-west1-gcpStandard / EnterpriseGCP US-Cen... | https://docs.pinecone.io/docs/projects |
aa8954e9aa20-2 | * This environment has unique features and limitations. See gcp-starter environment for more information.
Contact us if you need a dedicated deployment in other regions.
The environment cannot be changed after the project is created.
Project pod limit
You can set the maximum number of pods that can be used in total ac... | https://docs.pinecone.io/docs/projects |
aa8954e9aa20-3 | Project rolePermissions in organizationProject ownerManage project membersManage project API keysManage pod limitsProject memberAccess API keysCreate indexes in projectUse indexes in project
API keys
Each Pinecone project has one or more API keys. In order to make calls to the Pinecone API, a user must provide a valid ... | https://docs.pinecone.io/docs/projects |
e154854ddb3c-0 | Introduction
When planning your Pinecone deployment, it is important to understand the approximate storage requirements of your vectors to choose the appropriate pod type and number. This page will give guidance on sizing to help you plan accordingly.
As with all guidelines, these considerations are general and may not... | https://docs.pinecone.io/docs/choosing-index-type-and-size |
e154854ddb3c-1 | Each of these considerations comes with requirements for index size, pod type, and replication strategy.
Number of vectors
The most important consideration in sizing is the number of vectors you plan on working with. As a rule of thumb, a single p1 pod can store approximately 1M vectors, while a s1 pod can store 5M ve... | https://docs.pinecone.io/docs/choosing-index-type-and-size |
e154854ddb3c-2 | Pod typeDimensionsEstimated max vectors per podp15121,250,0007681,000,0001024675,000p25121,250,0007681,100,00010241,000,000s15128,000,0007685,000,00010244,000,000
Pinecone does not support fractional pod deployments, so always round up to the next nearest whole number when choosing your pods.
Queries per second (QPS)
... | https://docs.pinecone.io/docs/choosing-index-type-and-size |
e154854ddb3c-3 | As a rule, a single p1 pod with 1M vectors of 768 dimensions each and no replicas can handle about 20 QPS. It’s possible to get greater or lesser speeds, depending on the size of your metadata, number of vectors, the dimensionality of your vectors, and the top_K value for your search. See Table 2 below for more example... | https://docs.pinecone.io/docs/choosing-index-type-and-size |
e154854ddb3c-4 | Pod typetop_k 10top_k 250top_k 1000p1302520p21505020s1101010
*The QPS values in Table 2 represent baseline QPS with 1M vectors and 768 dimensions.
Adding replicas is the simplest way to increase your QPS. Each replica increases the throughput potential by roughly the same QPS, so aiming for 150 QPS using p1 pods means ... | https://docs.pinecone.io/docs/choosing-index-type-and-size |
e154854ddb3c-5 | Pod sizes
You can also start with one of the larger pod sizes, like p1.x2. Each step up in pod size doubles the space available for your vectors. We recommend starting with x1 pods and scaling as you grow. This way, you don’t start with too large a pod size and have nowhere else to go up, meaning you have to migrate to... | https://docs.pinecone.io/docs/choosing-index-type-and-size |
e154854ddb3c-6 | Example 2: Facial recognition
For this example, suppose you’re building an application to identify customers using facial recognition for a secure banking app. Facial recognition can work with as few as 128 dimensions, but in this case, because the app will be used for access to finances, we want to make sure we’re cer... | https://docs.pinecone.io/docs/choosing-index-type-and-size |
e154854ddb3c-7 | So we need 267 p1.x1 pods. We can reduce that by switching to s1 pods instead, sacrificing latency by increasing storage availability. They hold five times the storage of p1.x1, so the math is simple:
267 / 5 = 54 rounding up
So we estimate that we need 54 s1.x1 pods to store very high dimensional data for the face of... | https://docs.pinecone.io/docs/choosing-index-type-and-size |
7c8ea518c360-0 | This guide explains how to set up a Pinecone vector database in minutes.
1. Install Pinecone client (optional)
This step is optional. Do this step only if you want to use the Python client.
Use the following shell command to install Pinecone:
PythonJavaScriptpip install pinecone-client
npm i @pinecone-database/pinecone... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-1 | Use the "Hello, Pinecone!" colab notebook to write and execute Python in your browser.
Copy the commands below into your local installation of Python.
Use the cURL API commands below.
1. Initialize Pinecone
PythonJavaScriptcurlimport pinecone
pinecone.init(api_key="YOUR_API_KEY", environment="YOUR_ENVIRONMENT")
import... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-2 | ⚠️WarningIn general, indexes on the Starter (free) plan are archived as collections and deleted after 7 days of inactivity; for indexes created by certain open source projects such as AutoGPT, indexes are archived and deleted after 1 day of inactivity. To prevent this, you can send any API request to Pinecone and the c... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-3 | 5. Insert the data.
To ingest vectors into your index, use the upsert operation.
The upsert operation inserts a new vector in the index or updates the vector if a vector with the same ID is already present.
The following commands upsert 5 8-dimensional vectors into your index.
PythonJavaScriptcurl# Upsert sample data ... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-4 | ("E", [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5])
])
const upsertRequest = {
vectors: [
{
"id": "A",
"values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
},
{
"id": "B",
"values": [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
},
{
... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-5 | },
{
"id": "E",
"values": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
}
]
};
await index.upsert({ upsertRequest });
curl -i -X POST https://quickstart-YOUR_PROJECT.svc.YOUR_ENVIRONMENT.pinecone.io/vectors/upsert \
-H 'Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/js... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-6 | "id": "C",
"values": [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]
},
{
"id": "D",
"values": [0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4]
},
{
"id": "E",
"values": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
}
]
}' | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-7 | The cURL command above uses the endpoint for your Pinecone index.
ℹ️NoteWhen upserting larger amounts of data, upsert data in batches of 100 vectors or fewer over multiple upsert requests.
6. Get statistics about your index.
The following commands return statistics about the contents of your index.
PythonJavaScriptcur... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-8 | 7. Query the index and get similar vectors.
The following example queries the index for the three (3) vectors that are most similar to an example 8-dimensional vector using the Euclidean distance metric specified in step 2 ("Create an index.") above.
PythonJavaScriptcurlindex.query(
vector=[0.3, 0.3, 0.3, 0.3, 0.3, 0... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-9 | # 'values': [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]}],
# 'namespace': ''}
const queryRequest = {
topK: 3,
vector: [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3],
includeValues: true
}; | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-10 | const queryResponse = await index.query({ queryRequest });
// Returns:
/** {
"results": [],
"matches": [{
"id": "C",
"score": 0,
"values": [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]
}, {
"id": "D",
"score": 0.0799999237,
"values": [0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4]
}, {
"id": "B",
"score": 0.080... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-11 | -H 'Content-Type: application/json' \
-d '{
"vector": [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3],
"topK": 3,
"includeValues": true
}' | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-12 | # Output:
# {
# "matches":[
# {
# "id": "C",
# "score": -1.76717265e-07,
# "values": [0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3]
# },
# {
# "id": "B",
# "score": 0.080000028,
# "values": [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
# },... | https://docs.pinecone.io/docs/quickstart |
7c8ea518c360-13 | 8. Delete the index.
Once you no longer need the index, use the delete_index operation to delete it.
The following commands delete the index.
PythonJavaScriptcurlpinecone.delete_index("quickstart")
await pinecone.deleteIndex({ indexName:"quickstart" });
curl -i -X DELETE https://controller.YOUR_ENVIRONMENT.pinecone.io... | https://docs.pinecone.io/docs/quickstart |
a127577ba5d8-0 | Pinecone Overview
Pinecone makes it easy to provide long-term memory for high-performance AI applications. It’s a managed, cloud-native vector database with a simple API and no infrastructure hassles. Pinecone serves fresh, filtered query results with low latency at the scale of billions of vectors.
Vector embeddings p... | https://docs.pinecone.io/docs/overview |
a127577ba5d8-1 | Pinecone queries are fast and fresh.
Pinecone returns low-latency, accurate results for indexes with billions of vectors. High-performance pods return up to 200 queries per second per replica. Queries reflect up-to-the-second updates such as upserts and deletes. Filter by namespaces and metadata or add resources to imp... | https://docs.pinecone.io/docs/overview |
a127577ba5d8-2 | upsert_response = index.upsert(
vectors=[
{'id': 'vec1',
'values': [0.1, 0.2, 0.3],
'metadata': {'genre': 'drama'},
'sparse_values': {
'indices': [10, 45, 16],
'values': [0.5, 0.5, 0.2]
}},
{'id': 'vec2',
'values': [0.2, 0.3, 0.4... | https://docs.pinecone.io/docs/overview |
a127577ba5d8-3 | Query your index for the most similar vectors.
Specify the distance metric your index uses to evaluate vector similarity, along with dimensions and replicas.
PythonJavaScriptcurlpinecone.create_index("example-index", dimension=128, metric="euclidean", pods=4, pod_type="s1.x1")
await pinecone.createIndex({
name: "exam... | https://docs.pinecone.io/docs/overview |
a127577ba5d8-4 | # Returns:
# {'matches': [{'id': 'C',
# 'score': -1.76717265e-07,
# 'values': [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]},
# {'id': 'B',
# 'score': 0.080000028,
# 'values': [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]},
# {'... | https://docs.pinecone.io/docs/overview |
a127577ba5d8-5 | // Returns:
// {'matches': [{'id': 'C',
// 'score': -1.76717265e-07,
// 'values': [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]},
// {'id': 'B',
// 'score': 0.080000028,
// 'values': [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]},
// ... | https://docs.pinecone.io/docs/overview |
a127577ba5d8-6 | -d '{
"vector":[0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3],
"topK": 3,
"includeValues": true
}' | https://docs.pinecone.io/docs/overview |
a127577ba5d8-7 | Get started
Go to the quickstart guide to get a production-ready vector search service up and running in minutes.Updated 3 days ago QuickstartDid this page help you?YesNo | https://docs.pinecone.io/docs/overview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.