Rockset is a real-time search and analytics database built for the cloud. Rockset uses a Converged Index™ with an efficient store for vector embeddings to serve low latency, high concurrency search queries at scale. Rockset has full support for metadata filtering and handles real-time ingestion for constantly updating, streaming data.This notebook demonstrates how to use
Rockset
as a vector store in LangChain. Before getting started, make sure you have access to a Rockset
account and an API key available. Start your free trial today.
You’ll need to install langchain-community
with pip install -qU langchain-community
to use this integration
Rockset
console to create a collection with the Write API as your source. In this walkthrough, we create a collection named langchain_demo
.
Configure the following ingest transformation to mark your embeddings field and take advantage of performance and storage optimizations:
(We used OpenAI text-embedding-ada-002
for this examples, where #length_of_vector_embedding = 1536)
Oregon(us-west-2)
region.
Rockset
.
Rockset.add_texts()
. Rockset will otherwise generate a unique ID for each document. Regardless, Rockset.add_texts()
returns the IDs of inserted documents.
To delete these docs, simply use the Rockset.delete_texts()
function.
Rockset
collection, inserted
documents with OpenAI embeddings, and searched for similar documents with and without metadata filters.
Keep an eye on https://rockset.com/ for future updates in this space.