ZeusDB is a high-performance vector database powered by Rust, offering advanced features like product quantization, persistent storage, and enterprise-grade logging.
This documentation shows how to use ZeusDB to bring enterprise-grade vector search capabilities to your LangChain applications.
Setup
Install the ZeusDB LangChain integration package from PyPi:
Setup in Jupyter Notebooks
💡 Tip: If you are working inside Jupyter or Google Colab, use the %pip magic command so the package is installed into the active kernel:
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.