github HKUDS/LightRAG v1.4.9.4

23 hours ago

Important Notes: Eliminate Bottlenecks in Processing Large-scale Datasets

In production deployments, entity and relation metadata can grow unbounded as documents are continuously ingested. The source_id (chunk IDs) and file_path fields in entities and relations can accumulate thousands of entries, leading to:

  • Performance degradation in vector database operations
  • Increased storage costs
  • Memory pressure during query operations
  • Slower merge operations when processing new documents

LightRAG implements a configurable metadata size control system with two key features:

  • Source ID limiting: Controls the maximum number of chunk IDs stored per entity/relation
  • File path limiting: Controls the maximum number of file paths displayed in metadata (display-only, doesn't affect query performance)

Both features support two strategies:

  • FIFO (First In First Out): Removes oldest entries when limit is reached. Best for evolving knowledge bases, keeps most recent information.
  • KEEP: Keeps oldest entries, skips new ones when limit is reached. Best for stable knowledge bases, faster (fewer merge operations)

New environment variables with default values:

# Source ID limits (affects query performance)
MAX_SOURCE_IDS_PER_ENTITY=300
MAX_SOURCE_IDS_PER_RELATION=300
SOURCE_IDS_LIMIT_METHOD=FIFO

# File path limits (display only)
MAX_FILE_PATHS=100

What's New

  • Feat: Add offline Docker build support with embedded models and cache by @danielaskdd in #2222
  • Refact: Limit Vector Database Metadata Size to Support Large Scale Dataset by @danielaskdd in #2240
  • Feat: Add Optional LLM Cache Deletion for Document Deletion by @danielaskdd in #2244
  • Refact: Add Entity Identifier Length Truncation to Prevent Storage Failures by @danielaskdd in #2245
  • Refact: Add Multimodal Processing Status Support to DocProcessingStatus for RayAnything Compatibility by @danielaskdd in #2248

What's Changed

New Contributors

Full Changelog: v1.4.9.3...v1.4.9.4

Don't miss a new LightRAG release

NewReleases is sending notifications on new releases.