MEMONDEMAND: A Memory Management System for Large-Scale Enterprise Data
Organizations: Causal Dynamics Lab, USA · Emory University, USA
Abstract
Enterprise repositories are large, heteroge- neous, and continuously updated, making re- trieval difficult when efficient access, source- faithful evidence, and cross-query adaptation must be supported together. Enterprise mem- ory extends retrieval beyond the model con- text, but existing systems do not jointly address collection-specific hierarchy construction, low- cost routing, detailed evidence loading, and workload-aware memory updates at this scale. We introduce MEMONDEMAND, short for On- Demand Memory, a memory management sys- tem with three coordinated mechanisms: a dy- namic multi-level hierarchy that determines the abstraction structure and depth for each col- lection, dual memory at every hierarchy level that separates distilled routing from detailed evidence, and on-demand memory promotion that updates node priority under a bounded active-state budget. On EnterpriseRAG-Bench, MEMONDEMAND outperforms the strongest published LB#1 result at every evaluated scale from 10M tokens through the complete 618M- token collection, with gains of 12.23% at 10M and 4.66% at 618M. Results on FinanceBench, HotpotQA, and FRAMES further show strong performance across financial, multi-hop, and fact-retrieval settings. Together, these results establish MEMONDEMAND as an accurate, ef- ficient, and scalable memory solution for very large enterprise repositories across data scales, domains, and evidence requirements. Our code is available at https://github.com/ xfab-xinyuansong/MemOnDemand.git.
Figures & tables
| Method | Hierarchical organization | Dynamic hierarchy | Dual memory | Selective loading | Persistent priority | Separate |
| RAPTOR ( Sarthi et al., 2024 ) | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ |
| HiRAG ( Huang et al., 2025 ) | ✓ | ✓ | ✗ | ✓ | ✗ | ✗ |
| H-MEM ( Sun et al., 2026a ) | ✓ | ✗ | ✗ | ✓ | ✓ | ✗ |
| HippoRAG 2 ( Gutiérrez et al., 2025 ) | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ |
| MemoRAG ( Qian et al., 2025 ) | ✗ | ✗ | ✓ | ✓ | ✗ | ✗ |
| REFRAG ( Lin et al., 2025 ) | ✗ | ✗ | ✓ | ✓ | ✗ | ✗ |
| Tier | Combined | Combined | Correct | Complete | DocRcl | Evid. F1 | InvDoc | Promo | Demote |
|---|---|---|---|---|---|---|---|---|---|
| (%) | (%) | (%) | (%) | (%) | |||||
| LB#1 | 68.22 | – | 81.60 | 72.86 | 79.02 | – | 0.4700 | – | – |
| 10M | 82.75 | +14.53 | 91.40 | 85.83 | 92.71 | 0.928 | 0.1200 | 790 | 762 |
| 20M | 81.66 | +13.44 | 90.80 | 84.08 | 90.04 | 0.900 | 0.1700 | 811 | 784 |
| 60M | 73.09 | +4.87 | 80.45 | 76.97 | 80.30 | 0.780 | 0.4300 | 864 | 839 |
| 100M | 76.52 | +8.30 | 85.80 | 79.43 | 83.51 | 0.833 | 0.3200 | 861 | 839 |
| Scale | Memory provided for answering | Answer-input tokens/query | Change (%) | Combined (%) |
|---|---|---|---|---|
| 10M | Detailed only | 46,994 | – | 82.68 |
| 10M | Both representations | 49,174 | +4.6% | 70.60 |
| 10M | Distilled only | 2,963 | -93.7% | 51.08 |
| 10M | Selective detailed memory ( MemOnDemand ) | 16,944 | -63.9% | 82.75 |
| 20M | Detailed only | 45,784 | – | 77.91 |
| 20M | Both representations | 51,078 | +11.6% | 68.22 |
| Scale | Strategy | Answer-input tokens/query | Combined (%) | Correct (%) | DocRcl (%) |
|---|---|---|---|---|---|
| 10M | Flat dense RAG | 6,001 | 74.48 | 74.6 | 52.91 |
| BM25 RAG, no promotion | 5,726 | 29.68 | 34.4 | 24.43 | |
| Hierarchical, detailed only | 46,994 | 46.80 | 52.2 | 70.03 | |
| Direct long-context packing | 93,318 | 44.44 | 49.4 | 78.05 | |
| MemOnDemand | 16,944 | 82.75 | 91.40 | 92.71 | |
| 20M | Flat dense RAG | 6,018 | 71.68 | 71.8 | 48.09 |
| Method | DocRcl (%) | Correct (%) | Combined (%) | vs. Full (%) |
| System variants | ||||
| Full system | 92.71 | 91.40 | 82.75 | – |
| One-step navigation | 59.41 | 79.4 | 64.52 | |
| No promotion | 59.60 | 82.7 | 64.20 | |
| 25-candidate pool | 57.44 | 78.4 | 62.64 | |
| Retrieval baselines | ||||
| Benchmark | Questions | DocRcl (%) | Evid. F1 | Correct (%) | InvDoc |
|---|---|---|---|---|---|
| FinanceBench | 150 | 80.00 | 0.729 | 66.0 | 0.289 |
| HotpotQA | 500 | 49.90 | 0.549 | 78.4 | 0.320 |
| FRAMES | 500 | 88.76 | 0.617 | 55.0 | 0.439 |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| Promotion strategy | Wall time |
|---|---|
| On-demand promotion | 1.46 s |
| Eager promotion of all parent nodes | 593.5 s |
| Wall-time ratio |
| Online quantity | Value |
|---|---|
| Mean navigation steps per query | 2.9 |
| 95th-percentile navigation steps | 3 |
| Questions activating promotion | 470 / 500 (94.0%) |
| Operation | API identifier |
|---|---|
| L0 distillation and key facts | gpt-5.4-mini |
| Higher-level decision and abstraction | gpt-5.4 |
| Navigation and source selection | gpt-5.4 |
| Answer generation | gpt-5.4 |
| EnterpriseRAG evaluation | gpt-5.4 |
| Semantic indexing | text-embedding-3-small |
| Tier | L0 nodes | L1 nodes | L2 nodes |
|---|---|---|---|
| 10M | 8,927 | 94 | 9 |
| 20M | 17,051 | 287 | 9 |
| 60M | 49,978 | 223 | 14 |
| 100M | 82,779 | 287 | 16 |
| 150M | 124,330 | 352 | 18 |
| 250M | 207,179 | 455 | 21 |
| Floor | 10M | 150M | FULL (618M) |
|---|---|---|---|
| 0.1 | 77.86 | 72.89 | 68.69 |
| 0.2 | 75.35 | 70.99 | 67.89 |
| 0.3 | 79.58 | 76.15 | 66.04 |
| 0.4 | 80.35 | 74.22 | 70.24 |
| 0.5 | 74.95 | 75.16 | 67.96 |
| 0.6 | 78.71 | 73.48 | 67.10 |
| Scale | DocRcl (%) | Correct (%) |
|---|---|---|
| 10M | 68.25 | 81.2 |
| 20M | 65.19 | 80.2 |
| 60M | 55.02 | 74.2 |
| 100M | 59.04 | 74.4 |
| 150M | 55.30 | 77.2 |
| Runtime component | Mean | Median | p95 |
|---|---|---|---|
| Retrieval-control input | 3,758 | 3,969 | 4,270 |
| Retrieval-control output | 155 | 155 | 186 |
| Answer input | 13,629 | 13,284 | 19,413 |
| Answer output | 142 | 124 | 291 |
| Total online tokens | 17,683 | 17,425 | 23,534 |
Retrieval-Augmented Generation
Retrieval-augmented generation connects language models to external knowledge so answers can use current, domain-specific evidence.
See all 792 papers