Skip to main content
ZeusDB is a vector database written in Rust. It supports product quantization, persistent storage, and logging for operational use.
The following sections show how to use ZeusDB with LangChain.

Setup

Install the ZeusDB LangChain integration package from PyPI:
Setup in Jupyter Notebooks

Getting started

This example uses OpenAIEmbeddings, which requires an OpenAI API key: Get your OpenAI API key here If you prefer, you can also use this package with any other embedding provider (Hugging Face, Cohere, custom functions, etc.). Install the LangChain OpenAI integration package from PyPI:

Please choose an option below for your OpenAI key integration

Option 1: 🔑 Enter your API key each time Use getpass in Jupyter to securely input your key for the current session:
Option 2: 🗂️ Use a .env file Keep your key in a local .env file and load it automatically with python-dotenv
🎉 Nicely done! You are good to go.

Initialization


Manage vector store

2.1 add items to vector store

2.2 update items in vector store

2.3 delete items from vector store


Query vector store

3.1 query directly

Performing a simple similarity search:
If you want to execute a similarity search and receive the corresponding scores:

3.2 query by turning into retriever

You can also transform the vector store into a retriever for easier usage in your chains:

ZeusDB-Specific features

4.1 Memory-Efficient setup with product quantization

For large datasets, use Product Quantization to reduce memory usage:

4.2 persistence

Save and load your vector store to disk: How to Save your vector store
How to Load your vector store

Usage for retrieval-augmented generation

For guides on how to use this vector store for retrieval-augmented generation (RAG), see the following sections:

API reference

For detailed documentation of all ZeusDBVectorStore features and configurations head to ZeusDB Docs.