Search Over Memory Artifacts
Find relevant Facts, Summaries, or individual Messages across a Session, User, or more.
Searching for Facts, Summaries, or Messages
Zep offers similarity search over Facts, Summaries, and Messages stored within a Session, select Sessions, across all Sessions of a User, or across your entire Zep Project. This enables you to populate prompts with past conversations and conversation artifacts that are contextually similar to a specific query, organizing the results by a similarity Score.
Choosing Between Facts, Summaries, and Messages
Zep supports searching over Facts, Summaries, and Messages. Since individual messages might have little contextual information (consider a message containing just “yes”), Facts and Summaries typically yield higher quality search results.
MMR Reranking for Summaries
Summaries can sometimes overlap in information, especially when the Message Window is set low. In such cases, employing Maximum Marginal Relevance (MMR) to rerank search results can be beneficial. Zep includes built-in, hardware-accelerated support for MMR, making it simple and easy to use.
Constructing Search Queries
Zep’s Collection and Memory search support semantic search queries, JSONPath-based metadata filters, and a combination of both.
Memory search also supports querying by message creation date.
Read more about constructing search queries.
Python
TypeScript
Hybrid Search for Chat History with Metadata Filters
Besides the vector similarity search for Facts, Summaries, and Messages stored in Zep, you can also use metadata filters for your searches. You also have the option to conduct searches based purely on metadata.