Back to directory

temporal-rag

A post-retrieval layer for RAG pipelines that filters out expired documents, applies time decay and freshness scoring, and reranks results so a fresh, still-valid document outranks an outdated one.

temporal-rag

temporal-rag runs downstream of any vector search system and adds a validity filter that removes expired documents before scoring, a classifier that labels each document as static, versioned or event-based, an exponential decay scorer, a recency scorer normalized within the candidate pool, an event-relevance gate that stops freshness from overriding raw relevance, and a hybrid reranker that combines vector similarity with these temporal signals.

An advanced module adds a pattern that keeps a weak document only alongside a fresher partner, confidence tiers based on score margin and conflict, rejection-code logging keyed by query id, a hard date-range filter parsed from the query text, adaptive weighting of the temporal signal, a freshness report per document, and deduplication that collapses chains of superseding versions. It depends only on numpy and the Python standard library, and its demo uses a deterministic TF-IDF embedder so output is reproducible without an API key.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.