Pinecone
StartKit.AI seamlessly integrates with Pinecone, a vector database that’s essential for building and scaling AI applications.
You can think of Pinecone as your AI’s memory. It’s where the AI stores extra textual data to be retrieved later. This is sometimes referred to as “Retrieval Augmented Generation” (RAG) or simply “embeddings”.
You can read more about RAG in our advanced guide here.
Pinecone is recommended but not essential, so if you don’t want to setup Pinecone right now then you can skip this step.
Setup Pinecone
-
Visit Pinecone’s website: https://pinecone.io
-
Create an Account: Follow the prompts to create a new account. You’ll need to provide some basic information about yourself and your organization.
-
API Key: Once your account is set up, you will be provided with an API key.
-
Add the API Key to the .env file:
- You’ll also need to create a Pinecone index. Simply click the blue “Create Index” button in the Pinecone dashboard.
Name the index whatever you like, and set the dimensions to 1,536. For more info about embedding dimensions, check out our guide for RAG.
Select the Serverless capacity mode, and click “Create Index”.
Config .env
- Copy the URL of your new Pinecone instance and add that to the .env file.
In order to secure requests, the Pinecone connection needs a bearer token. We use a random 32 character string for this. This script will create a random 32 character string and adds it to your .env file:
Installing Python and Poetry
To query Pinecone we’re using an open-source library built by OpenAI called their chatgpt-retrieval-plugin
. This is what ChatGPT uses itself for fetching and storing it’s memory.
This library requires python
, pip
, and poetry
to be installed on your system. If you’re running OSX or Linux you probably already have python and pip installed. But if not you can install them from the python website here.
Once you have pip installed you can use it to install poetry:
Now the plugin will run automatically when you run StartKit.AI for the first time.
Done!
Done! StartKit.AI will now use your Pinecone index for it’s memory!