82 Commits

Author SHA1 Message Date
yangdx
8103b200db Set DEFAULT_HISTORY_TURNS to 0 2025-07-16 02:20:27 +08:00
yangdx
6e084bfae1 Increase default related chunk number from 5 to 10 2025-07-16 00:22:34 +08:00
yangdx
5f7cb437e8 Centralize query parameters into LightRAG class
This commit refactors query parameter management by consolidating settings like `top_k`, token limits, and thresholds into the `LightRAG` class, and consistently sourcing parameters from a single location.
2025-07-15 23:56:49 +08:00
yangdx
26865c2cd0 Update env.example 2025-07-15 17:08:23 +08:00
yangdx
47341d3a71 Merge branch 'main' into rerank 2025-07-15 16:12:33 +08:00
yangdx
e8e1f6ab56 feat: centralize environment variable defaults in constants.py 2025-07-15 16:11:50 +08:00
zrguo
91d0f65476 Update QueryParam 2025-07-15 14:21:58 +08:00
yangdx
ccc2a20071 feat: remove deprecated MAX_TOKEN_SUMMARY parameter to prevent LLM output truncation
- Remove MAX_TOKEN_SUMMARY parameter and related configurations
- Eliminate forced token-based truncation in entity/relationship descriptions
- Switch to fragment-count based summarization logic using FORCE_LLM_SUMMARY_ON_MERGE
- Update FORCE_LLM_SUMMARY_ON_MERGE default from 6 to 4 for better summarization
- Clean up documentation, environment examples, and API display code
- Preserve backward compatibility by graceful parameter removal

This change resolves issues where LLMs were forcibly truncating entity relationship
descriptions mid-sentence, leading to incomplete and potentially inaccurate knowledge
graph content. The new approach allows LLMs to generate complete descriptions while
still providing summarization when multiple fragments need to be merged.

Breaking Change: None - parameter removal is backward compatible
Fixes: Entity relationship description truncation issues
2025-07-15 12:26:33 +08:00
zrguo
7c882313bb remove chunk_rerank_top_k 2025-07-15 11:52:34 +08:00
zrguo
4e425b1b59 Revert "update from main"
This reverts commit 1d0376d6a926ef60d641af4406dacf5b8bbb430f.
2025-07-14 16:29:00 +08:00
zrguo
1d0376d6a9 update from main 2025-07-14 16:27:49 +08:00
zrguo
c9cbd2d3e0 Merge branch 'main' into rerank 2025-07-14 16:24:29 +08:00
zrguo
ef2115d437 Update token limit 2025-07-14 15:53:48 +08:00
yangdx
b03bb48e24 feat: Refine summary logic and add dedicated Ollama num_ctx config
- Refactor the trigger condition for LLM-based summarization of entities and relations. Instead of relying on character length, the summary is now triggered when the number of merged description fragments exceeds a configured threshold. This provides a more robust and logical condition for consolidation.
- Introduce the `OLLAMA_NUM_CTX` environment variable to explicitly configure the context window size (`num_ctx`) for Ollama models. This decouples the model's context length from the `MAX_TOKENS` parameter, which is now specifically used to limit input for summary generation, making the configuration clearer and more flexible.
- Updated `README` files, `env.example`, and default values to reflect these changes.
2025-07-14 01:55:04 +08:00
yangdx
03b40937f7 Reduce embedding concurrency limit from 16 to 8 2025-07-13 03:13:52 +08:00
yangdx
78033edabb Update env.example 2025-07-09 04:37:04 +08:00
yangdx
5d4484882a Merge branch 'main' into rerank 2025-07-09 03:59:04 +08:00
yangdx
14d51518dd Merge branch 'add-Memgraph-graph-db' into memgraph 2025-07-09 03:38:07 +08:00
yangdx
3a0249a6b9 Update env.example 2025-07-09 03:36:17 +08:00
DavIvek
4438897b6b add changes based on review 2025-07-08 16:28:06 +02:00
zrguo
d4651d59c1 Add rerank to server 2025-07-08 21:44:20 +08:00
zrguo
71cb3adb4f Merge branch 'main' into rerank 2025-07-08 15:10:23 +08:00
zrguo
04a57445da update chunks truncation method 2025-07-08 13:31:05 +08:00
zrguo
f5c80d7cde Simplify Configuration 2025-07-08 11:16:34 +08:00
yangdx
9b7b2a9b0f Reduce default embedding batch size from 32 to 10 2025-07-08 11:00:09 +08:00
yangdx
186c6411fb Update env.example 2025-07-08 10:45:32 +08:00
yangdx
3eaadb8a44 Update env.example 2025-07-08 03:06:19 +08:00
zrguo
75dd4f3498 add rerank model 2025-07-07 22:44:59 +08:00
yangdx
68921bc475 Update env.example 2025-07-07 17:49:33 +08:00
yangdx
752df9d674 Update env.example 2025-07-07 08:53:33 +08:00
yangdx
4632adb355 Add NEO4J_WORKSPACE env var override support
- Allow workspace override via NEO4J_WORKSPACE
- Update env.example with new config option
2025-07-07 04:16:44 +08:00
yangdx
033098c1bc Feat: Add WORKSPACE support to all storage types 2025-07-07 00:57:21 +08:00
yangdx
1fd74540c2 Update env example 2025-07-05 08:05:53 +08:00
yangdx
3a317c54c2 Update env.example 2025-07-05 08:04:59 +08:00
yangdx
ff1b1c61c7 Implemented storage types: PostgreSQL and MongoDB 2025-07-03 11:46:24 +08:00
zrguo
1ee9cab235 Add max_gleaning to env 2025-07-01 17:14:02 +08:00
zrguo
479865a271 Add max_gleaning to env 2025-07-01 17:13:33 +08:00
Alexander Bruhn
5e3970e18b
Resolve confusion between azure embedding and completion environment variables 2025-06-04 14:45:11 +02:00
yangdx
d66bb5eefe Update env sample file for Azure 2025-05-16 11:46:38 +08:00
yangdx
f0d5e4e65b Update env sample file 2025-05-14 21:51:49 +08:00
yangdx
8ca6325ff3 Fix linting 2025-05-14 13:33:33 +08:00
yangdx
a8029f1657 Fix linting 2025-05-14 13:25:05 +08:00
yangdx
d15d3d78e3 Update env sample file 2025-05-14 13:22:03 +08:00
yangdx
0fdbdfe971 Fix env.sample 2025-05-11 10:25:46 +08:00
yangdx
9d0f09a183 Update env sample file 2025-05-09 14:19:42 +08:00
yangdx
3007dff153 Add env FORCE_LLM_SUMMARY_ON_MERGE 2025-04-10 17:29:07 +08:00
yangdx
37007244c2 Add ENABLE_LLM_CACHE env support 2025-04-09 12:42:17 +08:00
yangdx
29d01e1c74 Add title support for webui 2025-04-04 22:51:07 +08:00
yangdx
d5da79892f Add webui title to api server 2025-04-04 21:43:52 +08:00
yangdx
27d478385d Change default token expire hour 2025-04-04 21:26:55 +08:00