Overview

This manual is divided into several sections, each focusing on a specific aspect of the Pinecone-Kognitos integration.

Introduction

The integration of Pinecone with Kognitos offers a powerful and intuitive way to interact with Pinecone's vector database functionalities. This integration enables users to perform a wide range of operations on Pinecone namespaces and vectors, including connecting to Pinecone, retrieving data, manipulating data, and clearing data, all through the use of Kognitos’ natural language processing capabilities. This section provides an overview of the Pinecone-Kognitos integration and outlines the prerequisites for using Pinecone on Kognitos.

Prerequisites for Using Kognitos with Pinecone

Before you can start using Kognitos to interact with Pinecone, there are several prerequisites that need to be met:

  1. Pinecone Account: You need to have an active Pinecone account. If you do not have one, you can sign up for a Pinecone trial account to get started.
  2. API Key: Obtain your Pinecone API key, which is required for Kognitos to communicate with Pinecone. You can find this in your Pinecone dashboard under "API Keys".
  3. Basic Understanding of Pinecone Concepts: While Kognitos simplifies interactions, having a basic understanding of Pinecone concepts such as namespaces, vectors, and indexes will help you automate more effectively with Kognitos.

Once these prerequisites are met, you are ready to start leveraging the power of Kognitos to enhance your Pinecone experience, making it more accessible, efficient, and customizable.


Setting Up Pinecone Connection

Connecting to Pinecone

To interact with Pinecone using Kognitos, establishing a secure connection to your Pinecone instance is the first critical step. This section outlines the credentials required for this connection and provides a detailed, step-by-step guide to connect successfully.

Required Credentials

To connect to Pinecone, you will need the following credentials:

  1. Pinecone API Key: The API key for your Pinecone account.
  2. Pinecone Index Name: The name of the index you want to interact with.
  3. Pinecone Environment: The environment in which your Pinecone instance is running.

Step-by-Step Connection Process

  1. Gather Credentials: Ensure you have all the required credentials: Pinecone API key, index name, and environment.

  2. Connect Pinecone to Kognitos: To initiate a connection to Pinecone, use the following command:

    connect to pinecone with
        the pinecone api key is "<your_api_key_here>"
        the pinecone index name is "<your_index_name_here>"
        the pinecone environment is "<your_environment_here>"
    

    Replace <your_api_key_here>, <your_index_name_here>, and <your_environment_here> with your actual Pinecone API key, index name, and environment, respectively.

    connect to pinecone with
        the pinecone api key is "abc123"
        the pinecone index name is "example_index"
        the pinecone environment is "us-west1"
    
  3. Verify Connection: After executing the above command, Kognitos will attempt to establish a connection to Pinecone using the provided credentials. If the connection is successful, you can proceed with further operations like fetching, creating, or modifying Pinecone vectors. If the connection fails, verify your credentials and ensure that your Pinecone API key, index name, and environment are correct.

  4. Connection Established: Once the connection is successfully established, you are ready to perform various operations on Pinecone. You can now fetch data, create new records, update existing ones, delete records, and more.


Working with Pinecone Data

Interacting with Pinecone data is a core functionality when integrating Pinecone with Kognitos. This section covers how to fetch data, create and modify Pinecone vectors, and clear namespaces when necessary.

Retrieving Data

Getting a Pinecone's Namespace

To retrieve a specific namespace from Pinecone, use the following command:

get a pinecone's namespace whose name is "my_namespace"

Getting a Document's Vector

To retrieve the vector representation of a document, use the following commands:

get the document
get the document's vector

Or, if you have the document's full text:

the document's full text is "This is a sample document."
get the document's vector

Getting a String's Vector

To retrieve the vector representation of a string, use the following commands:

get the string's vector with
    the string is "Hello, world!"

Or, if you have the string directly:

the string is "Machine learning models"
get the string's vector

Finding a Namespace's Thing

To find a specific thing within a namespace based on a vector, use the following commands:

the namespace is "product_vectors"
the thing is like {"vector": [0.1, 0.2, 0.3, 0.4]}
find the namespace's thing

Or, for a different namespace and vector:

the namespace is "user_profiles"
the thing is like {"vector": [-0.5, 0.8, -0.2, 0.1]}
find the namespace's thing

Manipulating Data

Adding a Record to a Namespace

To add a new record to a Pinecone namespace, use the following command:

connect to Pinecone with
    the api key is "<your_api_key>"
the record is
    the vector is "[0.1, 0.2, 0.3, 0.4]"
    the title is "Example Document"
    the author is "John Doe"
the namespace is "documents"
add the record to the namespace

Clearing Data

Clearing a Namespace of Pinecone

To clear all data from a specific Pinecone namespace, use the following command:

connect to pinecone with
    the api key is "<your_api_key>"
clear the namespace "example_namespace" of pinecone

By following these guidelines, you can effectively manage Pinecone data in Kognitos, from fetching and creating records to updating and clearing them as needed.


Glossary of Terms

  • API (Application Programming Interface): A set of rules and protocols for building and interacting with software applications. Pinecone API allows external services like Kognitos to communicate with Pinecone to retrieve or modify data.
  • Namespace: A logical grouping of vectors in Pinecone, similar to a database table.
  • Vector: A numerical representation of data, often used in machine learning and data science for various computations.
  • Index: A collection of vectors in Pinecone, used for efficient similarity search and retrieval operations.

This documentation provides a comprehensive guide to using Pinecone with Kognitos, enabling you to leverage the full potential of both platforms for your data management and machine learning needs.