Releases: HKUDS/LightRAG
Release list
v1.4.8rc4
Import Notes
Refactoring Prompt Template and enhancing robust mal-format handling for Knowledge Graph (KG) extraction using Small Parameter Language Models (LLMs). This will invalidate all cached LLM outputs.
What's Changed
- Fix: Eliminate Lambda Closure Bug in Embedding Function Creation by @avchauzov in #2028
- refac: Eliminate Conditional Imports and Simplify Initialization by @danielaskdd in #2029
- Fix: Preserve Leading Spaces in Graph Label Selection by @danielaskdd in #2030
- Fix ENTITY_TYPES Environment Variable Handling by @danielaskdd in #2034
- refac: Enhanced Entity Relation Extraction Text Sanitization and Normalization by @danielaskdd in #2031
- refact: Enhance KG Extraction with Improved Prompts and Parser Robustness by @danielaskdd in #2032
- Fix LLM output instability for <|> tuple delimiter by @danielaskdd in #2035
- Enhance KG Extraction for LLM with Small Parameters by @danielaskdd in #2051
- Add VDB error handling with retries for data consistency by @danielaskdd in #2055
- Fix incorrect variable name in NetworkXStorage file path by @danielaskdd in #2060
New Contributors
- @avchauzov made their first contribution in #2028
Full Changelog: v1.4.7...v1.4.8rc2
v1.4.7
Important Notes
- Doc-id based chunk filtering feature is remove from PostgreSQL vector storage.
- Prompt template has been updated, invalidating all LLM caches
- The default value of the FORCE_LLM_SUMMARY_ON_MERGE environment variable has been changed from 4 to 8. This adjustment significantly reduces the number of LLM calls during the documentation indexing phase, thereby shortening the overall document processing time.
- Added support for multiple Rerank Providers (Cohere AI, Jina AI, Aliyun Dashscope). If Rerank was previously enabled, and new env var must be set to enable rerank again:
RERANK_BINDING=cohere
- Introduced a new environment variable, LLM_TIMEOUT, to specifically control the Large Language Model (LLM) timeout. The existing TIMEOUT variable now exclusively manages the Gunicorn worker timeout. The default LLM timeout is set to 180 seconds. If you previously relied on the TIMEOUT variable for LLM timeout configuration, please update your settings to use LLM_TIMEOUT instead:
LLM_TIMEOUT=180
- Add comprehensive environment variable settings for OpenAI and Ollama Large Language Model (LLM) Bindings.
The generic TEMPERATURE environment variable for LLM temperature control has been deprecated. Instead, LLM temperature is now configured using binding-specific environment variables:
# Temperature setting for OpenAI binding
OPENAI_LLM_TEMPERATURE=0.8
# Temperature setting for Ollama binding
OLLAMA_LLM_TEMPERATURE=1.0
To mitigate endless output loops and prevent greedy decoding for Qwen3, set the temperature parameter to a value between 0.8 and 1.0. To disable the model's "Thinking" mode, please refer to the following configuration:
### Qwen3 Specific Parameters depoly by vLLM
# OPENAI_LLM_EXTRA_BODY='{"chat_template_kwargs": {"enable_thinking": false}}'
### OpenRouter Specific Parameters
# OPENAI_LLM_EXTRA_BODY='{"reasoning": {"enabled": false}}'
For a full list of support options, use the following command:
lightrag-server --llm-binding openai --help
lightrag-server --llm-binding ollama --help
lightrag-server --embedding-binding ollama --help
- A Full list of new env vars added or new default values:
# Timeout for LLM requests (seconds)
LLM_TIMEOUT=180
# Timeout for embedding requests (seconds)
EMBEDDING_TIMEOUT=30
### Number of summary segments or tokens to trigger LLM summary on entity/relation merge (at least 3 is recommended)
FORCE_LLM_SUMMARY_ON_MERGE=8
### Max description token size to trigger LLM summary
SUMMARY_MAX_TOKENS = 1200
### Recommended LLM summary output length in tokens
SUMMARY_LENGTH_RECOMMENDED=600
### Maximum context size sent to LLM for description summary
SUMMARY_CONTEXT_SIZE=12000
### RERANK_BINDING type: null, cohere, jina, aliyun
RERANK_BINDING=null
### Enable rerank by default in query params when RERANK_BINDING is not null
# RERANK_BY_DEFAULT=True
### chunk selection strategies
### VECTOR: Pick KG chunks by vector similarity, delivered chunks to the LLM aligning more closely with naive retrieval
### WEIGHT: Pick KG chunks by entity and chunk weight, delivered more solely KG related chunks to the LLM
### If reranking is enabled, the impact of chunk selection strategies will be diminished.
KG_CHUNK_PICK_METHOD=VECTOR
### Entity types that the LLM will attempt to recognize
ENTITY_TYPES=["person", "organization", "location", "event", "concept"]
What's News
- feat: Add OpenAI LLM Options Support by @danielaskdd in #1910
- feat: add tiktoken cache directory support for offline deployment by @danielaskdd in #1914
- Refact:Enhanced Neo4j Connection Lifecycle Management by @danielaskdd in #1924
- Add Vector Index Support for PostgreSQL KG by @Matt23-star in #1922
- Add AWS Bedrock LLm Binding Support #1733 by @sjjpo2002 in #1948
- Feat: Reprocessing of failed documents without the original file being present by @danielaskdd in #1954
- Feat: add KG related chunks selection by vector similarity by @danielaskdd in #1959
- Feat: Optimize error handling for document processing pipeline by @danielaskdd in #1965
- Add Chinese pinyin sorting support across document operations by @danielaskdd in #1967
- Refactor: Remove file_path and created_at from entity and relation query context send to LLM by @danielaskdd in #1976
- Refactor Postgres Batch Queries for Scalability, Safety, and Vector Search Optimization by @Matt23-star in #1964
- feat: Support turning off thinking on OpenRouter/vLLM by @danielaskdd in #1987
- feat: Add Multiple Rerank Provider Support by @danielaskdd in #1993
- feat: Add clear error messages for uninitialized storage by @albertgilopez in #1978
- feat: Add diagnostic tool to check initialization status by @albertgilopez in #1979
- feat: Improve Empty Keyword Handling logic by @danielaskdd in #1996
- refac: Refactor LLM Summary Generation Algorithm by @danielaskdd in #2006
- Added entity_types as a user defined variable (via .env) by @thiborose in #1998
- refac: Enhanced Timeout Handling for LLM Priority Queue by @danielaskdd in #2024
- refac: Remove deprecated doc-id based filtering from vector storage queries by @danielaskdd in #2025
What''s Fixed
- Fix ollama stop option handling and enhance temperature configuration by @danielaskdd in #1909
- Feat: Change embedding formats from float to base64 for efficiency by @danielaskdd in #1913
- Refact: Optimized LLM Cache Hash Key Generation by Including All Query Parameters by @danielaskdd in #1915
- Fix: Unify document chunks context format in only_need_context query by @danielaskdd in #1923
- Fix: Update OpenAI embedding handling for both list and base64 embeddings by @danielaskdd in #1928
- Fix: Initialize first_stage_tasks and entity_relation_task to prevent empty-task cancel errors by @danielaskdd in #1931
- Fix: Resolve workspace isolation issues across multiple storage implementations by @danielaskdd in #1941
- Fix: remove query params from cache key generation for keyword extraction by @danielaskdd in #1949
- Refac: uniformly protected with the get_data_init_lock for all storage initializations by @danielaskdd in #1951
- Fixes crash when processing files with UTF-8 encoding error by @danielaskdd in #1952
- Fix Document Selection Issues After Pagination Implementation by @danielaskdd in #1966
- Change the status from PROCESSING/FAILED to PENDING at the beginning of document processing pipeline by @danielaskdd in #1971
- Refac: Increase file_path field length to 32768 and add schema migration for Milvus DB by @danielaskdd in #1975
- Optimize keyword extraction prompt, and remove conversation history from keyword extraction by @danielaskdd in #1977
- Fix(UI): Implement XLSX format upload support for web UI by @danielaskdd in #1982
- Fix: resolved UTF-8 encoding error during document processing by @danielaskdd in #1983
- Fix: Preserve Document List Pagination During Pipeline Status Changes by @danielaskdd in #1992
- Update README-zh.md by @OnesoftQwQ in #1989
- Fi: Added import of OpenAILLMOptions when using azure_openai by @thiborose in #1999
- fix(webui): resolve document status grouping issue in DocumentManager by @danielaskdd in #2013
- fix mismatch of 'error' and 'error_msg' in MongoDB by @LinkinPony in #2009
- Fix UTF-8 Encoding Issues Causing Document Processing Failures by @danielaskdd in #2017
- docs(config): fix typo in .env comments by @SandmeyerX in #2021
- fix: adjust the EMBEDDING_BINDING_HOST for openai in the env.example by @pedrofs in #2026
New Contributors
- @Matt23-star made their first contribution in #1922
- @sjjpo2002 made their first contribution in #1948
- @OnesoftQwQ made their first contribution in #1989
- @albertgilopez made their first contribution in #1978
- @thiborose made their first contribution in #1999
- @LinkinPony made their first contribution in #2009
- @SandmeyerX made their first contribution in #202...
v1.4.6
What's New
- feat(performance): Optimize Document Deletion Performance with Entity/Relation Indexing by @danielaskdd in #1904
- refactor: improve JSON parsing reliability with json-repair library by @danielaskdd in #1897
What's Fixed
- Fix: resolved workspace isolation problem for json KV storage by @danielaskdd in #1899
- Fix: move OllamaServerInfos class to base module by @danielaskdd in #1893
- Add graceful shutdown handling for LightRAG server by @danielaskdd in #1895
Full Changelog: v1.4.5...v1.4.6
v1.4.5
What's New
- Feat(webui): add document list pagination for webui by @danielaskdd in #1886
- Feat: add Document Processing Track ID Support for Frontend by @danielaskdd in #1882
- Better prompt for entity description extraction to avoid hallucinations by @AkosLukacs in #1845
- Refine entity continuation prompt to avoid duplicates and reducing document processing time by @danielaskdd in #1868
- feat: Add rerank score filtering with configurable threshold by @danielaskdd in #1871
- Feat(webui): add query param reset buttons to webui by @danielaskdd in #1889
- Feat(webui): enhance status card with new settings from health endpoint by @danielaskdd in #1873
What's Fixed
- fix(webui): Correct edge renderer for sigma.js v3 by @danielaskdd in #1863
- Fix: file_path exceeds max length by @okxuewei in #1862
- refactor: unify file_path handling across merge and rebuild functions by @danielaskdd in #1869
- Fix: Improve keyword extraction prompt for robust JSON output. by @danielaskdd in #1872
- allow options to be passed to ollama client when using ollama binding [improved] by @michele-comitini in #1874
- refactor: Remove deprecated
max_token_sizefrom embedding configura… by @danielaskdd in #1875 - Fix: corrected unterminated f-string in config.py by @Ja1aia in #1876
- feat: add processing time tracking to document status with metadata field by @danielaskdd in #1883
- fix timeout issue by @Ja1aia in #1878
- fix: Add safe handling for missing file_path in PostgreSQL by @danielaskdd in #1891
- Remove content in doc status to improve performance by @danielaskdd in #1881
New Contributors
- @michele-comitini made their first contribution in #1874
- @Ja1aia made their first contribution in #1876
Full Changelog: v1.4.4...v1.4.5
v1.4.4
New
- Refac: optimizing context builder to improve query performance by @danielaskdd in #1848
- Improve query for find_text_unit by @okxuewei in #1812
- feat: Integrate Jina embeddings API support by @danielaskdd in #1851
- feat: Add SSL support for PostgreSQL database connections by @danielaskdd in #1834
- Fix: rename rerank parameter from top_k to top_n by @danielaskdd in #1815
Fixed
- fix(postgres): handle ssl_mode="allow" in _create_ssl_context by @danielaskdd in #1852
- Fix "A Simple Program" example in README.md by @AkosLukacs in #1844
- Feat: add PostgreSQL extensions for vector and AGE by @danielaskdd in #1833
New Contributors
- @AkosLukacs made their first contribution in #1844
Full Changelog: v1.4.3...v1.4.4
v1.4.3
New
- Feat: change default query mode from hybrid to mix by @danielaskdd in #1797
- Add Azure deployment by @Chida82 in #1801
- Remove separate requirements.txt and update Dockerfile to use pip install by @danielaskdd in #1799
Fixed
- Fix: resolved PostgreSQL AGE agtype parsing error and simplify error logging by @danielaskdd in #1802
- Fix: implemented entity-keyed locks for edge merging operations to ensure robust race condition protection by @danielaskdd in #1811
- Fix: add retry mechanism for Memgraph transient errors by @danielaskdd in #1810
- Fix file path handling in graph operations by @danielaskdd in #1796
- Enhance Redis connection handling with retries and timeouts by @danielaskdd in #1809
New Contributors
Full Changelog: v1.4.2...v1.4.3
v1.4.2
Hotfix: Resolve entity_type and weight problem for Milvus DB
- Fix Milvus DataNotMatchException by @okxuewei in #1792
- fix: change default edge weight from 0.0 to 1.0 in entity extraction and graph storage by @danielaskdd in #1794
Full Changelog: v1.4.1...v1.4.2
v1.4.1
Hotfix: Resolved PostgreSQL data migration problem for v1.4.0
- Optimize PostgreSQL database migrations speed for LLM cache
- Fix LLM cache key translation error for PostgreSQL
- Fix PostgreSQL AGE graph storage workspace error after migration
- Fix timezone problem for document list.
Other fixed
- Remove max token summary display from splash screen
- Update i18n translation for new query parameters
- Limit file deletion to current directory only after document cleaning
Full Changelog: v1.4.0...v1.4.1
v1.4.0
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 #1753 #1782
- Implement document deletion functionality in the WebUI by @danielaskdd in #1698 #1697 #1732
- Implement data isolation for all storage types via WORKSPACE environment variable by @danielaskdd in #1743
- Enable parallel processing in the merge stage of document processing to leverage LLM concurrent capabilities by @maharjun in #1549 #1772 #1771 #1770
- Update ollama compatible api by @SLKun in #1724
- Flatten LLM cache structure for improved recall efficiency by @danielaskdd in #1729
- Webui sync MAX_GRAPH_NODES setting from backend by @danielaskdd in #1747
- Reduce default embedding batch size from 32 to 10 by @danielaskdd in #1750
- Support COT/reasoning model by removing tag for entities and keywords extraction by @SLKun in #1752
- Remove deprecated MAX_TOKEN_SUMMARY parameter to prevent LLM output truncation by @danielaskdd in #1783
- Refine summary logic and add dedicated Ollama num_ctx config by @danielaskdd in #1778
- Add Memgraph as a Supported Graph Database Backend by @DavIvek in #1703 #1766
Fixed
- Remove graspologic pip installation that no longer seems to be used by @pablo-statsig in #1662
- Clean up azure env vars by @a-bruhn in #1654
- Add missing methods for MongoGraphStorage by @kenspirit in #1683
- Fix: Resolving issue with PostgreSQL document chunk KV storage depending on vector storage by @danielaskdd in #1714
- Fix nodes & edges are missing when retrieving knowledge subgraph by @kenspirit in #1704
- Fix GRAPH_FIELD_SEP import typo by @MoDDyChat in #1715
- Fix LLM cache handling for MongoKVStorage to address document deletion scenarios by @danielaskdd in #1718
- Fix LLM cache handling for PGKVStorage to address document deletion scenarios by @danielaskdd in #1717
- Fix LLM cache handling for Redis(Reverted) by @danielaskdd in #1719
- Refac: Add KG rebuild logging with pipeline status by @danielaskdd in #1720
- Feat: Check pending equest_pending after document deletion by @danielaskdd in #1735
- Refactoring implementation of Milvus vector storage by @danielaskdd in #1736
- fix: prevent empty entity names after normalization in extraction by @danielaskdd in #1737
- Fix: Resolve the issue of blank content in PDF extractions @okxuewei in #1738
- Fix incorrect file path (404 Not Found) by @frankxjkuang in #1749
- Fix: Ensured token tracking information is present for stream responses from OpenAI by @danielaskdd in #1757
- Fix #1746: [openai.py logic for streaming complete] by @molion097 in #1751
- Fix: Handle NoneType error when processing documents without a file path by @antonvice in #1759
- fix(build): pyproject.toml setup by @schmidt-marvin in #1768
- Feat: Added reranker config and lock status to status card of WebUI by @danielaskdd in #1773
- Hotfix: prevent premature lock cleanup in multiprocess mode by @danielaskdd in #1774
- Hotfix: Resolves connection pool bugs for Redis by @danielaskdd in #1775
- Increase max length limits for Milvus storage fields by @danielaskdd in #1776
- Increase field lengths for entity and file paths for PostgreSQL by @danielaskdd in #1777
- Fix: Resolve timezone handling problem in PostgreSQL storage by @danielaskdd in #1779
- Add Cloudflare Workers AI support for serverless LLM/embedding by @al1kss in #1765
New Contributors
- @kenspirit made their first contribution in #1683
- @pablo-statsig made their first contribution in #1662
- @a-bruhn made their first contribution in #1654
- @MoDDyChat made their first contribution in #1715
- @SLKun made their first contribution in #1724
- @okxuewei made their first contribution in #1738
- @frankxjkuang made their first contribution in #1749
- @molion097 made their first contribution in #1751
- @DavIvek made their first contribution in #1703
- @antonvice made their first contribution in #1759
- @schmidt-marvin made their first contribution in #1768
- @al1kss made their first contribution in #1765
Full Changelog: v1.3.9...v1.4.0
v1.3.9
What's Changed
- docs: Add clear initialization requirements and troubleshooting section by @neno-is-ooo in #1665
- Add doc for explaining LightRAG's multi-document concurrent processing mechanism by @earayu in #1619
- feat: Support
application/octet-streamrequests from LiteLLM clients for Ollama Emulation by @danielaskdd in #1673 - Feat: RAG-Anything Integration by @LarFii in #1688
- Feat: Add comprehensive document deletion feature with integrated knowledge graph reconstruction by @LarFii in #1693
Bugs fixed
- fix typo: "extrat" -> extract by @kwilt in #1667
- Fix: Increase Ollama timeout values to prevent ReadTimeout errors by @eddiemaru-101 in #1643
- Fix incorrect spacing by @Chaoyingz in #1671
New Contributors
- @neno-is-ooo made their first contribution in #1665
- @kwilt made their first contribution in #1667
- @eddiemaru-101 made their first contribution in #1643
- @Chaoyingz made their first contribution in #1671
Full Changelog: v1.3.8...v1.3.9