Zep is a long-term memory service for AI Assistant apps. With Zep, you can provide AI assistants with the ability to recall past conversations, no matter how distant, while also reducing hallucinations, latency, and cost.
Interested in Zep Cloud? See Zep Cloud Installation GuideNote: The
ZepVectorStore works with Documents and is intended to be used as a Retriever.
It offers separate functionality to Zepโs ZepMemory class, which is designed for persisting, enriching
and searching your userโs chat history.
Why Zepโs VectorStore? ๐ค๐
Zep automatically embeds documents added to the Zep Vector Store using low-latency models local to the Zep server. The Zep TS/JS client can be used in non-Node edge environments. These two together with Zepโs chat memory functionality make Zep ideal for building conversational LLM apps where latency and performance are important.Supported Search Types
Zep supports both similarity search and Maximal Marginal Relevance (MMR) search. MMR search is particularly useful for Retrieval Augmented Generation applications as it re-ranks results to ensure diversity in the returned documents.Installation
Follow the Zep Open Source Quickstart Guide to install and get started with Zep.Usage
Youโll need your Zep API URL and optionally an API key to use the Zep VectorStore. See the Zep docs for more information. In the examples below, weโre using Zepโs auto-embedding feature which automatically embed documents on the Zep server using low-latency embedding models. Since LangChain requires passing in aEmbeddings instance, we pass in FakeEmbeddings.
Note: If you pass in an Embeddings instance other than FakeEmbeddings, this class will be used to embed documents.
You must also set your document collection to isAutoEmbedded === false. See the OpenAIEmbeddings example below.
Example: Creating a ZepVectorStore from Documents & Querying
npm
Example: Querying a ZepVectorStore using a metadata filter
Example: Using a LangChain Embedding Class such as OpenAIEmbeddings
Related
- Vector store conceptual guide
- Vector store how-to guides