From 6e084bfae1009ff09a8da64a2524df5a69346d08 Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 16 Jul 2025 00:22:34 +0800 Subject: [PATCH] Increase default related chunk number from 5 to 10 --- env.example | 2 +- lightrag/constants.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/env.example b/env.example index 38ac249e..71bc5788 100644 --- a/env.example +++ b/env.example @@ -63,7 +63,7 @@ ENABLE_LLM_CACHE=true ### control the maximum tokens send to LLM (include entities, raltions and chunks) # MAX_TOTAL_TOKENS=32000 ### maxumium related chunks grab from single entity or relations -# RELATED_CHUNK_NUMBER=5 +# RELATED_CHUNK_NUMBER=10 ### Reranker configuration (Set ENABLE_RERANK to true in reranking model is configed) ENABLE_RERANK=False diff --git a/lightrag/constants.py b/lightrag/constants.py index fc25a855..62858364 100644 --- a/lightrag/constants.py +++ b/lightrag/constants.py @@ -21,7 +21,7 @@ DEFAULT_MAX_TOTAL_TOKENS = 32000 DEFAULT_HISTORY_TURNS = 3 DEFAULT_ENABLE_RERANK = True DEFAULT_COSINE_THRESHOLD = 0.2 -DEFAULT_RELATED_CHUNK_NUMBER = 5 +DEFAULT_RELATED_CHUNK_NUMBER = 10 # Separator for graph fields GRAPH_FIELD_SEP = ""