pinecone

package
v0.29.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 7 Imported by: 0

README

---
title: "Pinecone"
lang: "en-US"
draft: false
description: "Learn about how to set up a VDP Pinecone component https://github.com/instill-ai/instill-core"
---

The Pinecone component is a data component that allows users to build and search vector datasets.
It can carry out the following tasks:
- [Query](#query)
- [Upsert](#upsert)

## Release Stage

`Alpha`

## Configuration

The component definition and tasks are defined in the [definition.json](https://github.com/instill-ai/component/blob/main/data/pinecone/v0/config/definition.json) and [tasks.json](https://github.com/instill-ai/component/blob/main/data/pinecone/v0/config/tasks.json) files respectively.

## Setup


In order to communicate with Pinecone, the following connection details need to be
provided. You may specify them directly in a pipeline recipe as key-value pairs
within the component's `setup` block, or you can create a **Connection** from
the [**Integration Settings**](https://www.instill.tech/docs/vdp/integration)
page and reference the whole `setup` as `setup:
${connection.<my-connection-id>}`.

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Field | Field ID | Type | Note |
| :--- | :--- | :--- | :--- |
| API Key (required) | `api-key` | string | Fill in your Pinecone AI API key. You can create an api key in Pinecone Console  |
| Pinecone Base URL (required) | `url` | string | Fill in your Pinecone base URL. It is in the form  |

</div>




## Supported Tasks

### Query

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

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_QUERY` |
| ID | `id` | string | The unique ID of the vector to be used as a query vector. If present, the vector parameter will be ignored. |
| Vector (required) | `vector` | array[number] | An array of dimensions for the query vector. |
| Top K (required) | `top-k` | integer | The number of results to return for each query |
| Namespace | `namespace` | string | The namespace to query |
| Filter | `filter` | object | The filter to apply. You can use vector metadata to limit your search. See more details <a href="https://www.pinecone.io/docs/metadata-filtering/">here</a>. |
| Minimum Score | `min-score` | number | Exclude results whose score is below this value |
| Include Metadata | `include-metadata` | boolean | Indicates whether metadata is included in the response as well as the IDs |
| Include Values | `include-values` | boolean | Indicates whether vector values are included in the response |
</div>






<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Namespace | `namespace` | string | The namespace of the query |
| [Matches](#query-matches) | `matches` | array[object] | The matches returned for the query |
</div>

<details>
<summary> Output Objects in Query</summary>

<h4 id="query-matches">Matches</h4>

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Field | Field ID | Type | Note |
| :--- | :--- | :--- | :--- |
| ID | `id` | string | The ID of the matched vector |
| Metadata | `metadata` | object | Metadata |
| Score | `score` | number | A measure of similarity between this vector and the query vector. The higher the score, the more similar they are. |
| Values | `values` | array | Vector data values |
</div>
</details>

### Upsert

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

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_UPSERT` |
| ID (required) | `id` | string | This is the vector's unique id |
| Values (required) | `values` | array[number] | An array of dimensions for the vector to be saved |
| Namespace | `namespace` | string | The namespace to query |
| Metadata | `metadata` | object | The vector metadata |
</div>






<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Upserted Count | `upserted-count` | integer | Number of records modified or added |
</div>

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(bc base.Component) *component

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL