Hierarchical temporal RAG using Allen's Interval Algebra for formal temporal constraint reasoning with Interval Event Units (IEUs) organized in Thematic Forest
Scanned 9/11/2026
Install to Claude Code
npx -y skills add hiyenwong/ai_collection --skill ia-rag-interval-algebra-temporal --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Ia Rag Interval Algebra Temporal?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hiyenwong-ia-rag-interval-algebra-temporal-2c23315e)More formats (shields.io, HTML) on the badges page.
---
name: ia-rag-interval-algebra-temporal
description: Hierarchical temporal RAG using Allen's Interval Algebra for formal temporal constraint reasoning with Interval Event Units (IEUs) organized in Thematic Forest
version: 1.0.0
category: ai_collection
tags: [deep-learning, RAG, temporal-reasoning, knowledge-graph, interval-algebra]
arxiv: 2606.06044v1
paper_title: "IA-RAG: Interval-Algebra-Driven Temporal Reasoning for Dynamic Knowledge Retrieval"
authors: ["Xiaoman Wang", "Yaoze Zhang", "Wenzhuo Fan", "Hongwei Zhang", "Ding Wang et al."]
published: 2026-06-04
activation_keywords: [temporal RAG, interval algebra, Allen's relations, temporal reasoning, dynamic knowledge, time-aware retrieval]
github: https://github.com/xiaoAugenstern/LogicalRAG_TemporalQA
---
# IA-RAG: Interval-Algebra Temporal Reasoning
## Core Innovation
Models knowledge as **time intervals** with formal temporal constraints governed by **Allen's Interval Algebra**.
## Problem Addressed
Existing RAG limitations:
- Treat knowledge as **static**
- Associate time with **coarse-grained timestamps**
- Fail to capture **temporal structures**: duration, overlap, containment
## Methodology
### Knowledge Representation
1. **Interval Event Units (IEUs)**: Facts as time intervals
2. **Thematic Forest**: Hierarchical organization of IEUs
3. **Allen's Interval Algebra**: 13 temporal relations
### Allen's Interval Relations
```
Before (b) After (bi)
Meets (m) Met-by (mi)
Overlaps (o) Overlapped-by (oi)
Starts (s) Started-by (si)
During (d) Contains (di)
Finishes (f) Finished-by (fi)
Equals (=)
```
### Key Mechanisms
**Sub-graph Time Tightening**:
- Refines fuzzy intervals through logical constraints
- Handles incomplete/uncertain temporal boundaries
- Propagates constraints across connected events
**Interval-Algebra-Guided Traversal**:
- Implicit temporal semantic retrieval
- Query-compatible interval relations
- Temporal constraint-aware navigation
## Implementation Pattern
```python
from datetime import datetime
class IntervalEventUnit:
def __init__(self, start, end, content):
self.interval = (start, end)
self.content = content
self.duration = end - start
def allen_relation(self, other_ieu):
"""Compute Allen's Interval Algebra relation"""
s1, e1 = self.interval
s2, e2 = other_ieu.interval
if e1 < s2: return 'b' # Before
if e1 == s2: return 'm' # Meets
if s1 < s2 < e1 < e2: return 'o' # Overlaps
if s1 == s2 and e1 < e2: return 's' # Starts
if s2 < s1 and e1 < e2: return 'd' # During
if s2 < s1 < e2 < e1: return 'di' # Contains
if s1 < s2 and e1 == e2: return 'f' # Finishes
if s1 == s2 and e1 == e2: return '=' # Equals
class ThematicForest:
def __init__(self):
self.themes = {} # Hierarchical IEU organization
def retrieve_with_constraints(self, query_interval, relation):
"""Retrieve IEUs matching temporal constraints"""
candidates = []
for theme in self.themes:
for ieu in theme:
if ieu.allen_relation(query_interval) == relation:
candidates.append(ieu)
return candidates
def tighten_fuzzy_intervals(self, uncertain_ieu):
"""Refine fuzzy boundaries via subgraph constraints"""
neighbors = self.get_connected_events(uncertain_ieu)
tightened = propagate_constraints(uncertain_ieu, neighbors)
return tightened
```
## Use Cases
**Optimal scenarios:**
- Temporal question answering (TimeQA, TempReason, ComplexTR)
- Event timeline analysis
- Historical knowledge retrieval
- Dynamic knowledge bases with temporal evolution
- Complex compositional temporal reasoning
**Best suited for:**
- Questions about event overlap/containment
- Temporal dependency reasoning
- Multi-event causal chains
- Duration-based queries
- Time interval constraint satisfaction
## Benchmark Performance
Evaluated on:
- **TimeQA**: Temporal fact retrieval
- **TempReason**: Temporal logic reasoning
- **ComplexTR**: Compositional temporal reasoning
Strong performance on **complex compositional** tasks (requires multi-hop temporal reasoning).
## Activation
Trigger when discussing:
- Temporal knowledge retrieval
- Time-aware RAG systems
- Event interval modeling
- Allen's Interval Algebra applications
- Dynamic knowledge representation
- Temporal constraint reasoning
- Historical timeline analysis
## Key Insight
**Interval Algebra** provides formal temporal reasoning framework beyond simple timestamps, enabling rich temporal structure queries.
## Related Patterns
- Graph RAG frameworks
- Time-aware knowledge graphs
- Temporal event modeling
- Constraint propagation systems
## References
- Paper: arXiv 2606.06044v1
- Category: cs.CL
- GitHub: https://github.com/xiaoAugenstern/LogicalRAG_TemporalQA
- Key contribution: Allen's Interval Algebra in RAGIs this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!