Skip to content

Commit 3c530b2

Browse files
committed
Update README
1 parent 9b63a89 commit 3c530b2

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

README-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class QueryParam:
320320
max_relation_tokens: int = int(os.getenv("MAX_RELATION_TOKENS", "10000"))
321321
"""Maximum number of tokens allocated for relationship context in unified token control system."""
322322

323-
max_total_tokens: int = int(os.getenv("MAX_TOTAL_TOKENS", "32000"))
323+
max_total_tokens: int = int(os.getenv("MAX_TOTAL_TOKENS", "30000"))
324324
"""Maximum total tokens budget for the entire query context (entities + relations + chunks + system prompt)."""
325325

326326
hl_keywords: list[str] = field(default_factory=list)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class QueryParam:
327327
max_relation_tokens: int = int(os.getenv("MAX_RELATION_TOKENS", "10000"))
328328
"""Maximum number of tokens allocated for relationship context in unified token control system."""
329329

330-
max_total_tokens: int = int(os.getenv("MAX_TOTAL_TOKENS", "32000"))
330+
max_total_tokens: int = int(os.getenv("MAX_TOTAL_TOKENS", "30000"))
331331
"""Maximum total tokens budget for the entire query context (entities + relations + chunks + system prompt)."""
332332

333333
conversation_history: list[dict[str, str]] = field(default_factory=list)

env.example

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,19 @@ OLLAMA_EMULATING_MODEL_TAG=latest
4848
# LIGHTRAG_API_KEY=your-secure-api-key-here
4949
# WHITELIST_PATHS=/health,/api/*
5050

51-
########################
51+
######################################################################################
5252
### Query Configuration
53-
########################
53+
###
54+
### How to control the context lenght sent to LLM:
55+
### MAX_ENTITY_TOKENS + MAX_RELATION_TOKENS < MAX_TOTAL_TOKENS
56+
### Chunk_Tokens = MAX_TOTAL_TOKENS - Actual_Entity_Tokens - Actual_Reation_Tokens
57+
######################################################################################
5458
# LLM responde cache for query (Not valid for streaming response)
5559
ENABLE_LLM_CACHE=true
5660
# COSINE_THRESHOLD=0.2
5761
### Number of entities or relations retrieved from KG
5862
# TOP_K=40
59-
### Maxmium number or chunks plan to send to LLM
63+
### Maxmium number or chunks for naive vactor search
6064
# CHUNK_TOP_K=10
6165
### control the actual enties send to LLM
6266
# MAX_ENTITY_TOKENS=10000

0 commit comments

Comments
 (0)