Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
14
15
text
stringlengths
92
1.69k
source
stringclasses
25 values
03cd7e06b3cc-0
This document contains details about Pinecone releases. For information about using specific features, see our API reference. June 21, 2023 The new gcp-starter region is now in public preview. This region has distinct limitations from other Starter Plan regions. gcp-starter is the default region for some new users. Ap...
https://docs.pinecone.io/docs/release-notes
03cd7e06b3cc-1
You can now try out our new Node.js client for Pinecone. February 14, 2023 New usage reports in the Pinecone console You can now monitor your current and projected Pinecone usage with the Usage dashboard. January 31, 2023 Pinecone is now available in AWS Marketplace You can now sign up for Pinecone billing through Amaz...
https://docs.pinecone.io/docs/release-notes
03cd7e06b3cc-2
Fixes "Connection Reset by peer" error after long idle periods Adds typing and explicit names for arguments in all client operations Adds docstrings to all client operations Adds Support for batch upserts by passing batch_size to the upsert method Improves gRPC query results parsing performance December 22, 2022 Pinec...
https://docs.pinecone.io/docs/release-notes
03cd7e06b3cc-3
October 31, 2022 Hybrid search (Early access) Pinecone now supports keyword-aware semantic search with the new hybrid search indexes and endpoints. Hybrid search enables improved relevance for semantic search results by combining them with keyword search. This is an early access feature and is available only by signing...
https://docs.pinecone.io/docs/release-notes
03cd7e06b3cc-4
Vertical scaling You can now change the size of the pods for a live index to accommodate more vectors or queries without interrupting reads or writes. The p1 and s1 pod types are now available in 4 different sizes: 1x, 2x, 4x, and 8x. Capacity and compute per pod double with each size increment. p2 pod type (Public Pre...
https://docs.pinecone.io/docs/release-notes
03cd7e06b3cc-5
Pinecone Console Guided Tour You can now choose to follow a guided tour in the Pinecone Console. This interactive tutorial walks you through creating your first index, upserting vectors, and querying your data. The purpose of the tour is to show you all the steps you need to start your first project in Pinecone. June 2...
https://docs.pinecone.io/docs/release-notes
03cd7e06b3cc-6
Query by ID You can now query your Pinecone index using only the ID for another vector. This is useful when you want to search for the nearest neighbors of a vector that is already stored in Pinecone. Improved index fullness accuracy The index fullness metric in describe_index_stats() results is now more accurate. Apr...
https://docs.pinecone.io/docs/release-notes
03cd7e06b3cc-7
pinecone_vector_count pinecone_request_count_total pinecone_request_error_count_total pinecone_request_latency_seconds pinecone_index_fullness (Public Preview) Note: The accuracy of the pinecone_index_fullness metric is improved. This may result in changes from historic reported values. This metric is in public previe...
https://docs.pinecone.io/docs/release-notes
155b13a20033-0
Overview This document describes the security protocols and practices in use by Pinecone. 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 API key for the relevant Pinecone project. Role-based access controls (RBAC) Each Pinecone organizati...
https://docs.pinecone.io/docs/security
155b13a20033-1
Encryption in transit Pinecone uses standard protocols to encrypt user data in transit. Clients open HTTPS or gRPC connections to the Pinecone API; the Pinecone API gateway uses gRPC connections to user deployments in the cloud. These HTTPS and gRPC connections use the TLS 1.2 protocol with 256-bit Advanced Encryption ...
https://docs.pinecone.io/docs/security
8ef910d61d8e-0
This page provides installation instructions, usage examples, and a reference for the Pinecone Node.JS client. ⚠️WarningThis is a public preview ("Beta") client. Test thoroughly before using this client for production workloads. No SLAs or technical support commitments are provided for this client. Expect potential b...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-1
The following example creates an index that only indexes the "color" metadata field. Queries against this index cannot filter based on any other metadata field. JavaScriptawait pinecone.createIndex({ createRequest: { name: "example-index-2", dimension: 1024, metadataConfig: { indexed: ["color"], ...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-2
Upsert vectors The following example upserts vectors to example-index. JavaScriptconst index = pinecone.Index("example-index"); const upsertRequest = { vectors: [ { id: "vec1", values: [0.1, 0.2, 0.3, 0.4], metadata: { genre: "drama", }, }, { id: "vec2", values:...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-3
Delete vectors The following example deletes vectors by ID. JavaScriptconst index = pinecone.Index("example-index"); await index.delete1({ ids: ["vec1", "vec2"], namespace: "example-namespace", }); Fetch vectors The following example fetches vectors by ID. JavaScriptconst index = pinecone.Index("example-index"); c...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-4
Describe a collection The following example returns a description of the collection example-collection. JavaScriptconst collectionDescription = await pinecone.describeCollection({ collectionName: "example-collection", }); Delete a collection The following example deletes the collection example-collection. JavaScript...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-5
ParametersTypeDescriptionindexNamestringThe name of the index.patchRequestPatchRequest(Optional) Patch request parameters. PatchRequest ParametersTypeDescriptionreplicasnumber(Optional) The number of replicas to configure for this index.podTypestring(Optional) The new pod type for the index. One of ...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-6
ParametersTypeDescriptionnamestringThe name of the collection to be created.sourcestringThe name of the source index to be used as the source for the collection. Example: JavaScriptawait pinecone.createCollection({ createCollectionRequest: { name: "example-collection", source: "example-index", }, }); creat...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-7
ParametersTypeDescriptionnamestrThe name of the index to be created. The maximum length is 45 characters.dimensionintegerThe dimensions of the vectors to be inserted in the index.metricstr(Optional) The distance metric to be used for similarity search: 'euclidean', 'cosine', or 'dotproduct'.podsint(Optional) The number...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-8
// The following example creates an index that only indexes // the 'color' metadata field. Queries against this index // cannot filter based on any other metadata field. await pinecone.createIndex({ createRequest: { name: "example-index-2", dimension: 1024, metadata_config: { indexed: ["color"], ...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-9
ParametersTypeDescriptioncollectionNamestringThe name of the collection. Example: JavaScriptconst collectionDescription = await pinecone.describeCollection({ collectionName: "example-collection", }); Return: collectionMeta : object Configuration information and deployment status of the collection. name : string Th...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-10
database : object name : string The name of the index. dimension : integer The dimensions of the vectors to be inserted in the index. metric : string The distance metric used for similarity search: 'euclidean', 'cosine', or 'dotproduct'. pods : integer The number of pods the index uses, including replicas. replicas : i...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-11
listIndexes pinecone.listIndexes() Return a list of your Pinecone indexes. Returns: array of strings The names of the indexes in your project. Example: JavaScriptconst indexesList = await pinecone.listIndexes(); Index() pinecone.Index(indexName: string) Construct an Index object. ParametersTypeDescrip...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-12
ParametersTypeDescriptionrequestParametersDescribeIndexStatsOperationRequestDescribe index stats request wrapper Types DescribeIndexStatsOperationRequest ParametersTypeDescriptiondescribeIndexStatsRequestDescribeIndexStatsRequestDescribe index stats request parameters DescribeIndexStatsRequest ...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-13
ParametersTypeDescriptionidsArrayThe vector IDs to fetch. Does not accept values containing spaces.namespacestring(Optional) The namespace containing the vectors. Returns: vectors : object Contains the vectors. namespace : string The namespace of the vectors. Example: JavaScriptconst fetchResponse = await index.fetch...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-14
ParameterTypeDescriptionnamespacestring(Optional) The namespace to query.topKnumberThe number of results to return for each query.filterobject(Optional) The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.includeValuesboolean(Optional) Indicates wh...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-15
Index.update() index.update(requestParameters: UpdateOperationRequest) Updates vectors in a namespace. If a value is included, it will overwrite the previous value. If setMetadata is included in the updateRequest, the values of the fields specified in it will be added or overwrite the previous value. Pa...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-16
ParametersTypeDescriptionrequestParametersUpsertOperationRequestUpsert operation wrapper Types UpsertOperationRequest ParametersTypeDescriptionupsertRequestUpsertRequestThe upsert request. UpsertRequest | Parameter | Type | Description | | vectors | Array | An array containing the vectors to upsert. Rec...
https://docs.pinecone.io/docs/node-client
8ef910d61d8e-17
Example: JavaScriptconst upsertResponse = await index.upsert({ upsertRequest: { vectors: [ { id: "vec1", values: [0.1, 0.2, 0.3, 0.4], metadata: { genre: "drama", }, }, { id: "vec2", values: [0.1, 0.2, 0.3, 0.4], metadata: { ...
https://docs.pinecone.io/docs/node-client
cc60f5f5e4a7-0
This page provides installation instructions, usage examples, and a reference for the Pinecone Python client. Getting Started Installation Use the following shell command to install the Python client for use with Python versions 3.6+: Pythonpip3 install pinecone-client Alternatively, you can install Pinecone in a Jupy...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-1
pinecone.init(api_key="YOUR_API_KEY", environment="YOUR_ENVIRONMENT") pinecone.create_index("example-index", dimension=1024) The following example creates an index that only indexes the "color" metadata field. Queries against this index cannot filter based on any other metadata field. Pythonmetadata_con...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-2
Describe index statistics The following example returns statistics about the index example-index. Pythonimport pinecone pinecone.init(api_key="YOUR_API_KEY", environment="YOUR_ENVIRONMENT") index = pinecone.Index("example-index") index_stats_response = index.describe_index_stats() Upsert vectors The following exampl...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-3
query_response = index.query( namespace="example-namespace", top_k=10, include_values=True, include_metadata=True, vector=[0.1, 0.2, 0.3, 0.4], filter={ "genre": {"$in": ["comedy", "documentary", "drama"]} } ) Delete vectors The following example deletes vectors by ID. Pythonimport ...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-4
Create collection The following example creates the collection example-collection from example-index. Pythonimport pinecone pinecone.init(api_key="YOUR_API_KEY", environment="YOUR_ENVIRONMENT") pinecone.create_collection("example-collection", "example-index") List collections The following example retu...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-5
configure_index() pinecone.configure_index(index_name, **kwargs) Configure an index to change pod type and number of replicas. ParametersTypeDescriptionindex_namestrThe name of the indexreplicasint(Optional) The number of replicas to configure for this index.pod_typestr(Optional) The new pod ty...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-6
ParametersTypeDescriptionnamestrThe name of the index to be created. The maximum length is 45 characters.dimensionintegerThe dimensions of the vectors to be inserted in the index.metricstr(Optional) The distance metric to be used for similarity search: 'euclidean', 'cosine', or 'dotproduct'.podsint(Optional) The number...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-7
## The following example creates an index that only indexes ## the 'color' metadata field. Queries against this index ## cannot filter based on any other metadata field. metadata_config = { 'indexed': ['color'] } pinecone.create_index('example-index-2', dimension=1024, metadata_config=metada...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-8
name : string The name of the collection. size: integer The size of the collection in bytes. status: string The status of the collection. describe_index() pinecone.describe_index(indexName) Get a description of an index. ParametersTypeDescriptionindex_namestrThe name of the index. Returns: database :...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-9
Example: Pythonimport pinecone pinecone.init(api_key='YOUR_API_KEY', environment='YOUR_ENVIRONMENT') index_description = pinecone.describe_index('example-index') list_collections() pinecone.list_collections() Return a list of the collections in your project. Returns: array of strings The names of the collections in...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-10
ParametersTypeDescriptionidsarray(Optional) array of strings vectors to delete.delete_allboolean(Optional) Indicates that all vectors in the index namespace should be deleted.namespacestr(Optional) The namespace to delete vectors from, if applicable.filterobject(Optional) If specified, the metadata filter here will be ...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-11
Example: Pythonimport pinecone pinecone.init(api_key='YOUR_API_KEY', environment='YOUR_ENVIRONMENT') index = pinecone.Index('example-index') index_stats_response = index.describe_index_stats() Index.fetch() Index.fetch(ids, **kwargs) The Fetch operation looks up and returns vectors, by ID, from a single namespace. T...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-12
ParametersTypeDescriptionnamespacestr(Optional) The namespace to query.top_kint64The number of results to return for each query.filterobject(Optional) The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.include_valuesboolean(Optional) Indicates whe...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-13
query_response = index.query( namespace='example-namespace', top_k=10, include_values=True, include_metadata=True, vector=[0.1, 0.2, 0.3, 0.4], filter={ 'genre': {'$in': ['comedy', 'documentary', 'drama']} } ) The following example queries the index example-index with a sparse-dense...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-14
ParametersTypeDescriptionidstrThe vector's unique ID.values[float](Optional) Vector data.set_metadataobject(Optional) Metadata to set for the vector.namespacestr(Optional) The namespace containing the vector. Example: Pythonimport pinecone pinecone.init(api_key='YOUR_API_KEY', environment='YOUR_ENVIRONMENT') index = p...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-15
Example: Pythonimport pinecone pinecone.init(api_key='YOUR_API_KEY', environment='YOUR_ENVIRONMENT') index = pinecone.Index('example-index') upsert_response = index.upsert( vectors=[ {'id': "vec1", "values":[0.1, 0.2, 0.3, 0.4], "metadata": {'genre': 'drama'}}, {'id': "vec2", "values":[0.2, 0.3, 0.4,...
https://docs.pinecone.io/docs/python-client
cc60f5f5e4a7-16
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...
https://docs.pinecone.io/docs/python-client
eb05f2902f12-0
This document describes how to monitor the usage and costs for your Pinecone organization through the Pinecone console. To view your Pinecone usage, you must be the organization owner for your organization. This feature is only available to organizations on the Standard or Enterprise plans. To view your usage through t...
https://docs.pinecone.io/docs/monitoring-usage
20c69b6bb780-0
Overview This category contains guides for tasks related to Pinecone billing. Tasks Setting up GCP Marketplace billing Setting up AWS Marketplace billing Changing your billing plan Understanding subscription statuses Updated 24 days ago Monitoring your usageUnderstanding subscription statusDid this page help you?YesNo
https://docs.pinecone.io/docs/manage-billing
91092c370872-0
Overview This topic provides guidance on managing the cost of Pinecone. For the latest pricing details, see our pricing page. For help estimating total cost, see Understanding total cost. To see a calculation of your current usage and costs, see the usage dashboard in the Pinecone console. The total cost of Pinecone us...
https://docs.pinecone.io/docs/managing-cost
91092c370872-1
Back up inactive indexes When a specific index is not in use, back it up using collections and delete the inactive index. When you're ready to use these vectors again, you can create a new index from the collection. This new index can also use a different index type or size. Because it's relatively cheap to store colle...
https://docs.pinecone.io/docs/managing-cost
91092c370872-2
Learn about choosing index type and size Learn about monitoring usage Updated about 1 month ago Understanding organizationsUnderstanding costDid this page help you?YesNo
https://docs.pinecone.io/docs/managing-cost
97a99c842e81-0
Overview This topic describes the calculation of total cost for Pinecone, including an example. All prices are examples; for the latest pricing details, please see our pricing page. While our pricing page lists rates on an hourly basis for ease of comparison, this topic lists prices per minute, as this is how Pinecone ...
https://docs.pinecone.io/docs/understanding-cost
97a99c842e81-1
The following equation calculates the total costs accrued over time: (Number of pods) * (pod size) * (number of replicas) * (minutes pod exists) * (pod price per minute) (collection storage in GB) * (collection storage time in minutes) * (collection storage price per GB per minute) To see a calculation of your curre...
https://docs.pinecone.io/docs/understanding-cost
97a99c842e81-2
Billing componentValueNumber of pods1Number of replicas3Pod sizex2Total pod count6Minutes in January44,640Pod-minutes (pods * minutes)267,840Pod price per minute$0.0012Collection storage1 GBCollection storage minutes44,640Price per storage minute$0.00000056 The invoice for this example is given in Table 2 below: Table ...
https://docs.pinecone.io/docs/understanding-cost
97a99c842e81-3
Next steps Learn about choosing index type and size Learn about monitoring usage Updated about 1 month ago Managing costMonitoring your usageDid this page help you?YesNo
https://docs.pinecone.io/docs/understanding-cost
13b908d24904-0
Overview A Pinecone organization is a set of projects that use the same billing. Organizations allow one or more users to control billing and project permissions for all of the projects belonging to the organization. Each project belongs to an organization. For a guide to adding users to an organization, see Add users...
https://docs.pinecone.io/docs/organizations
13b908d24904-1
Organization rolePermissions in organizationOrganization ownerProject owner for all projectsCreate projectsManage billingManags organization membersOrganization memberCreate projectsJoin projects when invitedRead access to billing Organization single sign-on (SSO) SSO allows organizations to manage their teams' access ...
https://docs.pinecone.io/docs/organizations
b05ea8e9b206-0
You can limit your vector search based on metadata. Pinecone lets you attach metadata key-value pairs to vectors in an index, and specify filter expressions when you query the index. Searches with metadata filters retrieve exactly the number of nearest-neighbor results that match the filters. For most cases, the search...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-1
null value, we recommend you remove that key from the metadata payload. For example, the following would be valid metadata payloads: JSON{ "genre": "action", "year": 2020, "length_hrs": 1.5 } { "color": "blue", "fit": "straight", "price": 29.99, "is_jeans": true } Supported metadata size P...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-2
...means the "genre" takes on both values. For example, queries with the following filters will match the vector: JSON{"genre":"comedy"} {"genre": {"$in":["documentary","action"]}} {"$and": [{"genre": "comedy"}, {"genre":"documentary"}]} Queries with the following filter will not match the vector: JSON{ "$and": [{ "...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-3
index.upsert([ ("A", [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], {"genre": "comedy", "year": 2020}), ("B", [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2], {"genre": "documentary", "year": 2019}), ("C", [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3], {"genre": "comedy", "year": 2019}), ("D", [0.4, 0.4, 0.4, 0.4, 0.4, ...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-4
]) await index.upsert({ vectors: [ { id: "A", values: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], metadata: { genre: "comedy", year: 2020 }, }, { id: "B", values: [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2], metadata: { genre: "documentary", year: 2019 }, }, { ...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-5
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" }, }, ], }); curl -i -X POST https://YOUR_INDEX-YOUR_PROJECT.svc.YOUR_ENVIRONMENT.pinecone.io/vectors/upsert \ -H 'Api-Key: YOUR_API_KEY' \ -H 'Content-Type: appli...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-6
"metadata": {"genre": "documentary", "year": 2019} }, { "id": "C", "values": [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3], "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": {"g...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-7
Projects on the gcp-starter environment do not support metadata strings containing the character Δ. Querying an index with metadata filters Metadata filter expressions can be included with queries to limit the search to only vectors matching the filter expression. For example, we can search the previous movies index fo...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-8
# Returns: # {'matches': [{'id': 'B', # 'metadata': {'genre': 'documentary', 'year': 2019.0}, # 'score': 0.0800000429, # 'values': []}], # 'namespace': ''} const queryResponse = await index.query({ vector: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], filter: { genre: { $in: [...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-9
curlcurl -i -X POST https://YOUR_INDEX-YOUR_PROJECT.svc.YOUR_ENVIRONMENT.pinecone.io/query \ -H 'Api-Key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "vector": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], "filter": {"genre": {"$in": ["comedy", "documentary", "drama"]}}, "topK": 1, "in...
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-10
A drama from 2020 (equivalent to the previous example): JSON{ "$and": [{ "genre": { "$eq": "drama" } }, { "year": { "$gte": 2020 } }] } A drama or a movie from 2020: JSON{ "$or": [{ "genre": { "$eq": "drama" } }, { "year": { "$gte": 2020 } }] }
https://docs.pinecone.io/docs/metadata-filtering
b05ea8e9b206-11
Deleting vectors by metadata filter To specify vectors to be deleted by metadata values, pass a metadata filter expression to the delete operation. This deletes all vectors matching the metadata filter expression. Projects in the gcp-starter region do not support deleting by metadata. Example This example deletes all v...
https://docs.pinecone.io/docs/metadata-filtering
ff471843e1bb-0
After your data is indexed, you can start sending queries to Pinecone. The Query operation searches the index using a query vector. It retrieves the IDs of the most similar vectors in the index, along with their similarity scores. t can optionally include the result vectors' values and metadata too. You specify the num...
https://docs.pinecone.io/docs/query-data
ff471843e1bb-1
# 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/query-data
ff471843e1bb-2
topK: 3, includeValues: true, }, namespace: "example-namespace", }); // 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, // ...
https://docs.pinecone.io/docs/query-data
ff471843e1bb-3
-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/query-data
ff471843e1bb-4
# 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] # }, # { # "id": "D", # "sco...
https://docs.pinecone.io/docs/query-data
ff471843e1bb-5
Depending on your data and your query, you may not get top_k results. This happens when top_k is larger than the number of possible matching vectors for your query. Querying by namespace You can organize the vectors added to an index into partitions, or "namespaces," to limit queries and other vector operations to only...
https://docs.pinecone.io/docs/query-data
ff471843e1bb-6
topK: 1, includeMetadata: true filters: { "genre": {"$eq": "documentary"} }, } })
https://docs.pinecone.io/docs/query-data
ff471843e1bb-7
curl -i -X POST https://YOUR_INDEX-YOUR_PROJECT.svc.YOUR_ENVIRONMENT.pinecone.io/query \ -H 'Api-Key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "vector": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], "filter": {"genre": {"$in": ["comedy", "documentary", "drama"]}}, "topK": 1, "includ...
https://docs.pinecone.io/docs/query-data
ff471843e1bb-8
will be returned. Examples The following example queries the index example-index with a sparse-dense vector. Pythoncurlquery_response = index.query( namespace="example-namespace", top_k=10, vector=[0.1, 0.2, 0.3, 0.4], sparse_vector={ 'indices': [10, 45, 16], 'values': [0.5, 0.5, 0.2] ...
https://docs.pinecone.io/docs/query-data
ff471843e1bb-9
Limitations Avoid returning vector data and metadata when top_k is greater than 1000. This means queries with top_k over 1000 should not contain include_metadata=True or include_data=True. For more limitations, see: Limits.Updated 5 days ago Sparse-dense embeddingsFiltering with metadataDid this page help you?YesNo
https://docs.pinecone.io/docs/query-data
089cf6017e8f-0
In addition to inserting and querying data, there are other ways you can interact with vector data in a Pinecone index. This section walks through the various vector operations available. Connect to an index If you're using a Pinecone client library to access an index, you'll need to open a session with the index: Pyt...
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-1
Describe index statistics Get statistics about an index, such as vector count per namespace: PythonJavaScriptcurlindex.describe_index_stats() const index = pinecone.Index("pinecone-index"); const indexStats = await index.describeIndexStats(); console.log(indexStats.data); curl -i -X GET https://YOUR_INDEX-PROJECT_NAME....
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-2
# Returns: # {'namespace': '', # 'vectors': {'id-1': {'id': 'id-1', # 'values': [0.568879, 0.632687092, 0.856837332, ...]}, # 'id-2': {'id': 'id-2', # 'values': [0.00891787093, 0.581895, 0.315718859, ...]}}} const fetchedVectors = await index.fetch(["id-1", "id-...
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-3
# "vectors": { # "id-1": { # "id": "id-1", # "values": [0.568879, 0.632687092, 0.856837332, ...] # }, # "id-2": { # "id": "id-2", # "values": [0.00891787093, 0.581895, 0.315718859, ...] # } # }, # "namespace": "" # }
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-4
Updating vectors There are two methods for updating vectors and metadata, using full or partial updates. Full update Full updates modify the entire item, that is vectors and metadata. Updating an item by id is done the same way as inserting items. (Write operations in Pinecone are idempotent.) The Upsert operation writ...
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-5
PythonJavaScriptcurlindex.fetch(["id-3"]) const fetchedVectors = await index.fetch(["id-3"]); curl -i -X GET https://YOUR_INDEX-YOUR_PROJECT.svc.YOUR_ENVIRONMENT.pinecone.io/vectors/fetch?ids=id-3 \ -H 'Api-Key: YOUR_API_KEY' Partial update The Update operation performs partial updates that allow changes to part of ...
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-6
will be returned. To update the value of item ("id-3", [3., 3.], {"type": "doc", "genre": "drama"}): PythonJavaScriptcurlindex.update(id="id-3", values=[4., 2.]) await index.update({ id: "id-3", values: [4, 2], }); curl -i -X POST https://YOUR_INDEX-YOUR_PROJECT.svc.YOUR_ENVIRONMENT.pinecone.io/vectors/update \ -...
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-7
argument. Any other fields will remain unchanged. To update the metadata of item ("id-3", [4., 2.], {"type": "doc", "genre": "drama"}): PythonJavaScriptcurlindex.update(id="id-3", set_metadata={"type": "web", "new": "true"}) await index.update({ id: "id-3", setMetadata: { type: "web", new: "true", }, }); ...
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-8
The updated item would now be ("id-3", [4., 2.], {"type": "web", "genre": "drama", "new": "true"}). Both vector and metadata can be updated at once by including both values and set_metadata arguments. To update the "id-3" item we write: PythonJavaScriptcurlindex.update(id="id-3", values=[1., 2.], set_metadata={"type": ...
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-9
The updated item would now be ("id-3", [1., 2.], {"type": "webdoc", "genre": "drama", "new": "true"}). Deleting vectors The Delete operation deletes vectors, by ID, from an index. Alternatively, it can also delete all vectors from an index or namespace. When deleting large numbers of vectors, limit the scope of delete ...
https://docs.pinecone.io/docs/manage-data
089cf6017e8f-10
namespace. Projects on the gcp-starter environment do not support the deleteAll parameter. Example: PythonJavaScriptcurlindex.delete(deleteAll='true', namespace='example-namespace') await index.delete1([], true, "example-namespace"); curl -i -X DELETE "https://YOUR_INDEX-YOUR_PROJECT.svc.YOUR_ENVIRONMENT.pinecone.io/ve...
https://docs.pinecone.io/docs/manage-data
b55bd8ef143b-0
After creating a Pinecone index, you can start inserting vector embeddings and metadata into the index. Inserting the vectors Connect to the index: Pythoncurlindex = pinecone.Index("pinecone-index") # Not applicable Insert the data as a list of (id, vector) tuples. Use the Upsert operation to write vectors into a ...
https://docs.pinecone.io/docs/insert-data
b55bd8ef143b-1
PythonJavaScriptcurl# Insert sample data (5 8-dimensional vectors) index.upsert([ ("A", [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]), ("B", [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]), ("C", [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]), ("D", [0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4]), ("E", [0.5, 0.5, 0.5, ...
https://docs.pinecone.io/docs/insert-data
b55bd8ef143b-2
{ 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], }, { 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...
https://docs.pinecone.io/docs/insert-data
b55bd8ef143b-3
}, ], }); curl -i -X POST https://YOUR_INDEX-YOUR_PROJECT.svc.YOUR_ENVIRONMENT.pinecone.io/vectors/upsert \ -H 'Api-Key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "vectors": [ { "id": "A", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] }, { "id...
https://docs.pinecone.io/docs/insert-data
b55bd8ef143b-4
"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/insert-data
b55bd8ef143b-5
Immediately after the upsert response is received, vectors may not be visible to queries yet. In most situations, you can check if the vectors have been received by checking for the vector counts returned by describe_index_stats() to be updated. This technique may not work if the index has multiple replicas. The databa...
https://docs.pinecone.io/docs/insert-data
b55bd8ef143b-6
Sending upserts in parallel By default, all vector operations block until the response has been received. But using our client they can be made asynchronous. For the Batching Upserts example this can be done as follows: PythonShell# Upsert data with 100 vectors per upsert request asynchronously # - Create pinecone.Inde...
https://docs.pinecone.io/docs/insert-data
b55bd8ef143b-7
Pinecone is thread-safe, so you can launch multiple read requests and multiple write requests in parallel. Launching multiple requests can help with improving your throughput. However, reads and writes can’t be performed in parallel, therefore writing in large batches might affect query latency and vice versa. If you e...
https://docs.pinecone.io/docs/insert-data
b55bd8ef143b-8
("B", [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2], {"genre": "documentary", "year": 2019}), ("C", [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3], {"genre": "comedy", "year": 2019}), ("D", [0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4], {"genre": "drama"}), ("E", [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], {"genre": "drama"}...
https://docs.pinecone.io/docs/insert-data
b55bd8ef143b-9
metadata: { genre: "comedy", year: 2020 }, }, { id: "B", values: [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2], metadata: { genre: "documentary", year: 2019 }, }, { id: "C", values: [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3], metadata: { genre: "comedy", year: 2019 }, },...
https://docs.pinecone.io/docs/insert-data
b55bd8ef143b-10
metadata: { genre: "drama" }, }, ], }); curl -i -X POST https://YOUR_INDEX-YOUR_PROJECT.svc.YOUR_ENVIRONMENT.pinecone.io/vectors/upsert \ -H 'Api-Key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "vectors": [ { "id": "A", "values": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,...
https://docs.pinecone.io/docs/insert-data
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
2