Operational vector upgrade

Historical Vector Search: Time-Travel for RAG Audit & Compliance

Reconstruct past retrieval states with VSEARCH ... AS_OF. Debug RAG hallucinations, audit compliance requirements, and reproduce exact vector search results from any point in your WAL history.

01

Why RAG Systems Need Reproducible Retrieval

When an AI agent produces a wrong answer, the first question is: "What context did the model receive?" In a traditional vector database, the index is mutable — vectors are added, updated, and deleted continuously. By the time you investigate, the index has moved on. You cannot reproduce the exact retrieval.

For regulated industries (healthcare, finance, legal), this is a compliance gap. Auditors may need to prove what a system "knew" at a specific time. Without time-travel, that proof is gone.

02

How AS_OF Reconstructs Past Vector State

VSEARCH ... AS_OF <unix-nanoseconds> replays retained vector WAL history into a temporary index, reconstructing the state of the tenant's embeddings at the specified timestamp. It then runs the query against that reconstructed index and returns results exactly as they would have appeared at that point in time.

This is per-tenant. Reconstructing Tenant A's past state does not affect Tenant B's live index. The temporary index is discarded after the query.

RESP wire protocol

Query Past Vector States with VSEARCH AS_OF

RESP commands
# Search the current index
VSEARCH docs 0.012 -0.043 0.091 ... 5

# Search the index as it was 24 hours ago
VSEARCH docs 0.012 -0.043 0.091 ... 5 AS_OF 1728840000000000000

# Search the index as it was at a specific incident timestamp
VSEARCH docs 0.012 -0.043 0.091 ... 10 AS_OF 1728756000000000000 MIN_SCORE 0.7

AS_OF accepts unix nanoseconds. Historical search is bounded by WAL retention — compacted entries are no longer available.

Python SDK

Audit RAG Retrieval with the Python Client

Python
from dbx import DBXClient
import time

client = DBXClient("http://localhost:8000", token="$DBX_TOKEN")

# Timestamp of the incident (e.g., when the wrong answer was generated)
incident_ts = int(time.mktime(time.strptime("2026-10-10 14:30:00", "%Y-%m-%d %H:%M:%S"))) * 10**9

# Reproduce the exact retrieval context from that moment
results = client.vsearch(
    tenant="acme-corp",
    index="docs",
    query=incident_query_vector,
    k=10,
    as_of=incident_ts
)

# Compare with current results
current = client.vsearch(
    tenant="acme-corp",
    index="docs",
    query=incident_query_vector,
    k=10
)

print(f"Past results:    {[r.id for r in results]}")
print(f"Current results: {[r.id for r in current]}")

Use Cases for Time-Travel Vector Search

A

RAG incident reproduction

When a customer reports a bad AI response, reproduce the exact documents the model retrieved at the time of the incident. Confirm whether the issue was in retrieval or generation.

B

Compliance audit trails

Prove what context was available at a specific timestamp for GDPR, CCPA, HIPAA, or internal compliance investigations. Export results with timestamps for audit documentation.

C

Embedding quality regression detection

Compare retrieval quality before and after an embedding model change. Identify whether a new model improved or degraded recall for specific query patterns.

Honest limits: Historical search uses a temporary index, costs more than current search, and is limited by WAL retention. This is not a continuous stream of past states — it is a point-in-time reconstruction.