.ipynb
.pdf
Tigris
 Contents 
Initialize Tigris vector store
Similarity Search
Similarity Search with score (vector distance)
Tigris#
Tigris is an open source Serverless NoSQL Database and Search Platform designed to simplify building high-performance vector search applications.
Tigris eliminates the infrastructure complexity of managing, operating, and synchronizing multiple tools, allowing you to focus on building great applications instead.
This notebook guides you how to use Tigris as your VectorStore
Pre requisites
An OpenAI account. You can sign up for an account here
Sign up for a free Tigris account. Once you have signed up for the Tigris account, create a new project called vectordemo. Next, make a note of the Uri for the region you’ve created your project in, the clientId and clientSecret. You can get all this information from the Application Keys section of the project.
Let’s first install our dependencies:
!pip install tigrisdb openapi-schema-pydantic openai tiktoken
We will load the OpenAI api key and Tigris credentials in our environment
import os
import getpass
os.environ['OPENAI_API_KEY'] = getpass.getpass('OpenAI API Key:')
os.environ['TIGRIS_PROJECT'] = getpass.getpass('Tigris Project Name:')
os.environ['TIGRIS_CLIENT_ID'] = getpass.getpass('Tigris Client Id:')
os.environ['TIGRIS_CLIENT_SECRET'] = getpass.getpass('Tigris Client Secret:')
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.text_splitter import CharacterTextSplitter
from langchain.vectorstores import Tigris
from langchain.document_loaders import TextLoader
Initialize Tigris vector store#
Let’s import our test dataset:
rtdocs_stable/api.python.langchain.com/en/stable/modules/indexes/vectorstores/examples/tigris.html