Commit graph

11 commits

Author SHA1 Message Date
yangdx
429cd6a66f Fix top_n behavior with chunking to limit documents not chunks
- Disable API-level top_n when chunking
- Apply top_n to aggregated documents
- Add comprehensive test coverage

(cherry picked from commit 9009abed3e)
2025-12-04 19:11:22 +08:00
copilot-swe-agent[bot]
85f21aecd5 Fix chunking infinite loop when overlap_tokens >= max_tokens
Co-authored-by: netbrah <162479981+netbrah@users.noreply.github.com>
(cherry picked from commit 1d6ea0c5f7)
2025-12-04 19:11:22 +08:00
netbrah
b65ef37569 Add Cohere reranker config, chunking, and tests
(cherry picked from commit a05bbf105e)
2025-12-04 19:11:22 +08:00
yangdx
d56b4c856e Fix trailing whitespace and update test mocking for rerank module
• Remove trailing whitespace
• Fix TiktokenTokenizer import patch
• Add async context manager mocks
• Update aiohttp.ClientSession patch
• Improve test reliability

(cherry picked from commit 561ba4e4b5)
2025-12-04 19:11:14 +08:00
copilot-swe-agent[bot]
b28a701532 Improve edge case handling for max_tokens=1
Co-authored-by: netbrah <162479981+netbrah@users.noreply.github.com>
(cherry picked from commit 8835fc244a)
2025-12-04 19:09:07 +08:00
yangdx
bf43e1b8c1 fix: Resolve default rerank config problem when env var missing
- Read config from selected_rerank_func when env var missing
- Make api_key optional for rerank function
- Add response format validation with proper error handling
- Update Cohere rerank default to official API endpoint
2025-08-23 01:07:59 +08:00
yangdx
580cb7906c feat: Add multiple rerank provider support to LightRAG Server by adding new env vars and cli params
- Add --enable-rerank CLI argument and ENABLE_RERANK env var
- Simplify rerank configuration logic to only check enable flag and binding
- Update health endpoint to show enable_rerank and rerank_configured status
- Improve logging messages for rerank enable/disable states
- Maintain backward compatibility with default value True
2025-08-22 19:29:45 +08:00
yangdx
cb3bf3291c Fix: rename rerank parameter from top_k to top_n
The change aligns with the API parameter naming used by Jina and Cohere rerank services, ensuring consistency and clarity.
2025-07-20 00:26:27 +08:00
zrguo
9a9f0f2463 Update rerank_example & readme 2025-07-15 12:17:27 +08:00
zrguo
f5c80d7cde Simplify Configuration 2025-07-08 11:16:34 +08:00
zrguo
75dd4f3498 add rerank model 2025-07-07 22:44:59 +08:00