Pinecone

The Pinecone component is a data connector that allows users to build and search vector datasets. It can carry out the following tasks:

#Release Stage

Alpha

#Configuration

The component configuration is defined and maintained here.

FieldField IDTypeNote
API Key (required)api_keystringFill your Pinecone AI API key. You can create a api key in Pinecone Console
Pinecone Base URL (required)urlstringFill in your Pinecone base URL. It is in the form [https://index_name-project_id.svc.environment.pinecone.io]

Pinecone connector resources can be created in two ways:

#No-code Setup

  1. Go to the Connectors page and click + Create Connector.
  2. Select Pinecone.
  3. Fill in a unique ID for the resource. Optionally, give a short description in the Description field.
  4. Fill in the required fields described in Resource Configuration.

#Low-code Setup

cURL(Instill-Cloud)
cURL(Instill-Core)
Copy

curl -X POST https://api.instill.tech/vdp/v1beta/users/<user-id>/connectors \
--header 'Authorization: Bearer <Instill-Cloud-API-Token>' \
--data '{
"id": "my-pinecone",
"connector_definition_name": "connector-definitions/pinecone",
"description": "Optional description",
"configuration": {
"api_key": <api-key>,
"url": <url>
}
}'

For other component operations, please refer to the API reference.

#Supported Tasks

#Query

Retrieve the ids of the most similar items in a namespace, along with their similarity scores.

InputIDTypeDescription
Task ID (required)taskstringTASK_QUERY
IDidstringThe unique ID of the vector to be used as a query vector. If present, the vector parameter will be ignored.
Vector (required)vectorarray[number]An array of dimensions for the query vector.
Top K (required)top_kintegerThe number of results to return for each query
NamespacenamespacestringThe namespace to query
FilterfilterobjectThe filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
Minimum Scoremin_scorenumberExclude results whose score is below this value
Include Metadatainclude_metadatabooleanIndicates whether metadata is included in the response as well as the IDs
Include Valuesinclude_valuesbooleanIndicates whether vector values are included in the response
OutputIDTypeDescription
NamespacenamespacestringThe namespace of the query
Matchesmatchesarray[object]The matches returned for the query

#Upsert

Writes vectors into a namespace. If a new value is upserted for an existing vector id, it will overwrite the previous value.

InputIDTypeDescription
Task ID (required)taskstringTASK_UPSERT
ID (required)idstringThis is the vector's unique id
Values (required)valuesarray[number]An array of dimensions for the vector to be saved
NamespacenamespacestringThe namespace to query
MetadatametadataobjectThe vector metadata
OutputIDTypeDescription
Upserted Countupserted_countintegerNumber of records modified or added

Last updated: 4/5/2024, 1:22:27 PM