v1.4.0

HKUDS/LightRAGv1.4.0Jul 15, 2025by danielaskdd

AI Summary

Major release featuring chunk reranking support, document deletion functionality, Memgraph integration, and parallel processing improvements.

Key Highlights

  • Added chunk reranking support to improve query performance
  • Implemented document deletion functionality in the WebUI
  • Implemented data isolation for all storage types via WORKSPACE environment variable
  • Enabled parallel processing in the merge stage of document processing
  • Added Memgraph as a supported graph database backend

Breaking Changes

  • QueryParam parameters have changed - integration code needs to be updated
  • MAX_TOKEN_SUMMARY parameter has been removed to prevent LLM output truncation
  • After upgrading, documents and cache should be cleared and re-indexed for document deletion to work correctly

New Features

  • Chunk reranking support
  • Document deletion in WebUI
  • Data isolation via WORKSPACE
  • Parallel processing in merge stage
  • Memgraph support
  • Ollama compatible API update
  • COT/reasoning model support
  • Cloudflare Workers AI support
  • Flattened LLM cache structure

Full Release Notes

## Importance Notes

* After upgrading, **please clear documents and cache, then re-index your documents for document deletion feature functions correctly**. Remember to select the "clear cache simultaneously" option when clearing documents. If the document deletion functionality is not immediately required, there is no need to re-index documents.
* This upgrade includes changes to QueryParam parameters. If you previously integrated LightRAG using QueryParam, please update your parameter passing according to the latest API. Refer to the /query endpoint parameters on the web UI's API page.
* **The integration of Reranker in this version significantly enhances the performance of mixed queries**. We recommend using mixed query mode as the default when Reranker is enabled.

## Added

* **Add chunk reranking support to improve query performance** by @LarFii in https://github.com/HKUDS/LightRAG/pull/1753 https://github.com/HKUDS/LightRAG/pull/1782
* **Implement document deletion functionality in the WebUI** by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1698 https://github.com/HKUDS/LightRAG/pull/1697 https://github.com/HKUDS/LightRAG/pull/1732
* **Implement data isolation for all storage types via WORKSPACE environment variable** by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1743
* **Enable parallel processing in the merge stage of document processing to leverage LLM concurrent capabilities** by @maharjun in https://github.com/HKUDS/LightRAG/pull/1549 https://github.com/HKUDS/LightRAG/pull/1772 https://github.com/HKUDS/LightRAG/pull/1771 https://github.com/HKUDS/LightRAG/pull/1770
* Update ollama compatible api by @SLKun in https://github.com/HKUDS/LightRAG/pull/1724
* Flatten LLM cache structure for improved recall efficiency by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1729
* Webui sync MAX_GRAPH_NODES setting from backend by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1747
* Reduce default embedding batch size from 32 to 10 by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1750
* Support COT/reasoning model by removing <think> tag for entities and keywords extraction by @SLKun in https://github.com/HKUDS/LightRAG/pull/1752
* Remove deprecated MAX_TOKEN_SUMMARY parameter to prevent LLM output truncation by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1783
* Refine summary logic and add dedicated Ollama num_ctx config by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1778
* Add Memgraph as a Supported Graph Database Backend by @DavIvek in https://github.com/HKUDS/LightRAG/pull/1703 https://github.com/HKUDS/LightRAG/pull/1766

## Fixed

* Remove graspologic pip installation that no longer seems to be used by @pablo-statsig in https://github.com/HKUDS/LightRAG/pull/1662
* Clean up azure env vars by @a-bruhn in https://github.com/HKUDS/LightRAG/pull/1654
* Add missing methods for MongoGraphStorage by @kenspirit in https://github.com/HKUDS/LightRAG/pull/1683
* Fix: Resolving issue with PostgreSQL document chunk KV storage depending on vector storage by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1714
* Fix nodes & edges are missing when retrieving knowledge subgraph by @kenspirit in https://github.com/HKUDS/LightRAG/pull/1704
* Fix GRAPH_FIELD_SEP import typo by @MoDDyChat in https://github.com/HKUDS/LightRAG/pull/1715
* Fix LLM cache handling for MongoKVStorage to address document deletion scenarios by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1718
* Fix LLM cache handling for PGKVStorage to address document deletion scenarios by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1717
* Fix LLM cache handling for Redis(Reverted) by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1719
* Refac: Add KG rebuild logging with pipeline status by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1720
* Feat: Check pending equest_pending after document deletion by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1735
* Refactoring implementation of Milvus vector storage  by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1736
* fix: prevent empty entity names after normalization in extraction by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1737
* Fix: Resolve the issue of blank content in PDF extractions @okxuewei in https://github.com/HKUDS/LightRAG/pull/1738
* Fix incorrect file path (404 Not Found) by @frankxjkuang in https://github.com/HKUDS/LightRAG/pull/1749
* Fix: Ensured token tracking information is present for stream responses from OpenAI by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1757
* Fix #1746: [openai.py logic for streaming complete] by @molion097 in https://github.com/HKUDS/LightRAG/pull/1751
* Fix: Handle NoneType error when processing documents without a file path by @antonvice in https://github.com/HKUDS/LightRAG/pull/1759
* fix(build): pyproject.toml setup by @schmidt-marvin in https://github.com/HKUDS/LightRAG/pull/1768
* Feat: Added reranker config and lock status to status card of WebUI by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1773
* Hotfix: prevent premature lock cleanup in multiprocess mode by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1774
* Hotfix: Resolves connection pool bugs for Redis by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1775
* Increase max length limits for Milvus storage fields by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1776
* Increase field lengths for entity and file paths for PostgreSQL by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1777
* Fix: Resolve timezone handling problem in PostgreSQL storage by @danielaskdd in https://github.com/HKUDS/LightRAG/pull/1779
* Add Cloudflare Workers AI support for serverless LLM/embedding by @al1kss in https://github.com/HKUDS/LightRAG/pull/1765

## New Contributors

* @kenspirit made their first contribution in https://github.com/HKUDS/LightRAG/pull/1683
* @pablo-statsig made their first contribution in https://github.com/HKUDS/LightRAG/pull/1662
* @a-bruhn made their first contribution in https://github.com/HKUDS/LightRAG/pull/1654
* @MoDDyChat made their first contribution in https://github.com/HKUDS/LightRAG/pull/1715
* @SLKun made their first contribution in https://github.com/HKUDS/LightRAG/pull/1724
* @okxuewei made their first contribution in https://github.com/HKUDS/LightRAG/pull/1738
* @frankxjkuang made their first contribution in https://github.com/HKUDS/LightRAG/pull/1749
* @molion097 made their first contribution in https://github.com/HKUDS/LightRAG/pull/1751
* @DavIvek made their first contribution in https://github.com/HKUDS/LightRAG/pull/1703
* @antonvice made their first contribution in https://github.com/HKUDS/LightRAG/pull/1759
* @schmidt-marvin made their first contribution in https://github.com/HKUDS/LightRAG/pull/1768
* @al1kss made their first contribution in https://github.com/HKUDS/LightRAG/pull/1765

**Full Changelog**: https://github.com/HKUDS/LightRAG/compare/v1.3.9...v1.4.0