From 84416d104d988931796512a3a00666e26586b5b1 Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 26 Aug 2025 03:57:35 +0800 Subject: [PATCH] Increase default LLM summary merge threshold from 4 to 8 for reducing summary trigger frequency --- env.example | 2 +- lightrag/constants.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/env.example b/env.example index a824a1f5..a64626ef 100644 --- a/env.example +++ b/env.example @@ -127,7 +127,7 @@ ENABLE_LLM_CACHE_FOR_EXTRACT=true # CHUNK_OVERLAP_SIZE=100 ### Number of summary semgments or tokens to trigger LLM summary on entity/relation merge (at least 3 is recommented) -# FORCE_LLM_SUMMARY_ON_MERGE=4 +# FORCE_LLM_SUMMARY_ON_MERGE=8 ### Number of tokens to trigger LLM summary on entity/relation merge # SUMMARY_MAX_TOKENS = 500 ### Maximum context size sent to LLM for description summary diff --git a/lightrag/constants.py b/lightrag/constants.py index c180e2dd..0e6d6dcd 100644 --- a/lightrag/constants.py +++ b/lightrag/constants.py @@ -14,7 +14,7 @@ DEFAULT_MAX_GRAPH_NODES = 1000 DEFAULT_SUMMARY_LANGUAGE = "English" # Default language for summaries DEFAULT_MAX_GLEANING = 1 -DEFAULT_FORCE_LLM_SUMMARY_ON_MERGE = 4 +DEFAULT_FORCE_LLM_SUMMARY_ON_MERGE = 8 DEFAULT_SUMMARY_MAX_TOKENS = 500 # Max token size for entity/relation summary DEFAULT_SUMMARY_CONTEXT_SIZE = 10000 # Default maximum token size