{"repo":"Emmimal/temporal-rag","free":true,"listed":false,"github":"https://github.com/Emmimal/temporal-rag","clone":"git clone https://github.com/Emmimal/temporal-rag.git","description":"A post-retrieval temporal layer for RAG systems — validity filtering, time decay, document kind classification, and hybrid reranking in one pipeline.","language":"Python","stars":49,"topics":["document-retrieval","freshness","information-retrieval","knowledge-base","llm","nlp","python","rag","reranking","retrieval-augmented-generation"],"license":"MIT","category":"ai-agents","readme_excerpt":"temporal-rag A post-retrieval temporal layer for RAG systems — validity filtering, time decay, and freshness tracking that runs downstream of any vector search system. Most RAG tutorials stop at: retrieve documents, rank by cosine similarity, send to the model. This library handles what comes next — deciding whether a retrieved document is still true, whether it has been superseded, and whether a fresh signal is actually relevant to the query being asked. Read the full write-up on Towards Data Science → RAG Is Blind to Time — I Built a Temporal Layer to Fix It in Production --- What It Does Three files, one retrieve() call: Component Job --- --- Validity filter Hard-removes EXPIRED documents before any scoring Kind classifier Labels every document STATIC / VERSIONED / EVENT Decay scorer Exponential decay: 0.5 ^ (age / half life) Recency scorer Normalised freshness position within the candidate pool EVENT relevance gate Raw cosine floor — freshness cannot override relevance Hybrid reranker Combines vector similarity with all temporal signals Advanced patterns (in advanced.py ): Pattern Job --- --- PAIR executor Weak documents retrieved only alongside a fresher partner Confidence tiers HIGH / MEDIUM / LOW based on score margin and conflict Failure logging Rejection codes keyed by query id for full auditability Conflict detection Severity-aware boost and confidence penalty when facts change Time-range filter Parses date windows from query text and applies a hard filter Adaptive ","default_branch":null,"files":null,"tree":[],"storefront":"/r/Emmimal","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Emmimal/temporal-rag/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}