asmit dash
In publication

chronograph

In publication · license and copywriting pending

Temporally-aware RAG - every edge has a validity window and decay curve.

What it is

A temporal knowledge graph as a drop-in agent SDK. Single SQLite file per namespace, sqlite-vec embeddings on entities, and every relation in the graph carries explicit temporal metadata.

Why it's needed

Every RAG system in 2026 returns stale information confidently. Stock prices, org charts, regulations, product specs, employment relationships, market caps - all change. But vector retrieval doesn't know that, and Microsoft GraphRAG and the rest treat the graph as timeless. When a regulator asks 'who was CEO on March 1, 2024?', a timeless graph answers with whoever is CEO right now.

What it does

chronograph treats time as a first-class dimension. Every edge has a [valid_from, valid_until) window - closed means 'we know when this stopped being true,' open-ended means 'still believed.' Every edge has a decay_kind (step, exponential, linear, never) so confidence falls off according to a curve from the moment the fact was asserted. Retrieval is time-aware: 'true on date T', 'true right now', and 'still believed but stale' are three different queries. Forgetting is edge expiry, not deletion - lineage stays, and as_of queries always reconstruct the past.

How to use it

Install it:

git clone https://github.com/asmitdash/chronograph

Then call it:

from chronograph import Graph
from datetime import datetime, timezone

g = Graph.open("./facts.db")
g.write_edge(
    src="apple", relation="ceo", dst="cook",
    valid_from=datetime(2011, 8, 24, tzinfo=timezone.utc),
    valid_until=None,           # open-ended → still believed
    decay_kind="linear", decay_horizon_days=3650,
)
# "Who was CEO on date X?"
print(g.relations("apple", relation="ceo", at=datetime(2024, 3, 1, tzinfo=timezone.utc)))

Links