Skip to main content

RAG Pipeline with Z3rno

This guide shows how to build a retrieval-augmented generation (RAG) pipeline using Z3rno as the memory and retrieval layer. Unlike traditional RAG systems that use static vector databases, Z3rno provides a living memory that decays, transitions, and maintains temporal awareness.

Why Z3rno for RAG?

Traditional vector databases store documents as static embeddings. Z3rno adds:
  • Temporal awareness — query what was known at a specific point in time with as_of.
  • Importance scoring — high-importance memories rank higher than low-importance ones, even if vector similarity is equal.
  • Memory decay — outdated information naturally fades, keeping results fresh without manual pruning.
  • Graph augmentation — traverse relationships between memories to surface contextually relevant information that pure vector search misses.
  • Multi-tenancy — serve multiple users from a single deployment without data leakage.

Basic RAG Pattern

Multi-Type RAG

Recall from different memory types to build richer context:

Graph-Augmented RAG

Use graph traversal to find related memories that vector search alone would miss:

Temporal RAG

Query what an agent knew at a specific point in time — useful for auditing and debugging:

Store-After-Generate Pattern

After generating a response, store the interaction as memory so future queries benefit from it:

With LangChain

See the LangChain integration guide for using Z3rnoRetriever in LangChain RAG chains.

Next Steps