Critical fixes:
- Fix SUMMARY_LENGTH_RECOMMENDED_ typo (trailing underscore)
- Change LLM_MODEL from gpt-5-mini to gpt-4o-mini (GPT-5 doesn't exist)
- Update all GPT-5 references to GPT-4o in comments
Best practice improvements:
- Reduce NEO4J_MAX_CONNECTION_POOL_SIZE from 75 to 50 (better for 6-core system)
- Add logging rotation settings (LOG_MAX_BYTES, LOG_BACKUP_COUNT)
- Add Advanced Entity/Relation Management settings documentation
The Advanced Entity/Relation Management settings help users control metadata
storage for entities/relations in the knowledge graph, which is especially
useful when processing large books where entities appear in many chunks.
This template is optimized for:
- Dell T140 (6-core Xeon E-2226G, 32GB RAM)
- Docker deployment on Unraid
- GPT-5-mini LLM
- Voyage-3-large embeddings (2048 dims)
- Jina reranker
- Neo4j graph storage + Postgres (pgvector) for vector/KV/doc storage
- Books, articles, and podcast transcripts use case
Performance settings tuned for ~40-50% CPU utilization during heavy processing.
* Capture max_token_size before decorator
* Apply wrapper after capturing attribute
* Prevent decorator from stripping dataclass
* Ensure token limit is properly set
- Add EMBEDDING_TOKEN_LIMIT env var
- Set max_token_size on embedding func
- Add token limit property to LightRAG
- Validate summary length vs limit
- Log warning when limit exceeded
- Add Awaitable and Union type imports
- Update chunking_func type annotation
- Handle coroutine results with await
- Add return type validation
- Update docstring for async support
• Replace truthy checks with `is not None`
• Handle empty dict edge case properly
• Prevent data reload failures
• Add comprehensive test coverage
• Fix JsonKVStorage and DocStatusStorage
• Reload cleaned data after sanitization
• Update shared memory with clean data
• Add specific surrogate char tests
• Test migration sanitization flow
• Prevent dirty data in memory
- Precompile regex pattern at module level
- Zero-copy path for clean strings
- Use C-level regex for performance
- Remove deprecated _sanitize_json_data
- Fast detection for common case
- Fast path for clean data (no sanitization)
- Slow path sanitizes during encoding
- Reload shared memory after sanitization
- Custom encoder avoids deep copies
- Comprehensive test coverage
- Bump API version to 0254
- Remove response format UI controls
- Hard-code response_type in query params
- Add migration for version 19
- Clean up settings store structure
• Add _sanitize_json_data helper function
• Recursively clean strings in data
• Sanitize before JSON serialization
• Prevent encoding-related crashes
• Use existing sanitize_text_for_encoding