✨ new implement : support Rerank models in model management and agent configurations#2700
Open
✨ new implement : support Rerank models in model management and agent configurations#2700
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Zhi-a
approved these changes
Mar 25, 2026
| kb_search_results.extend(kb_search) | ||
|
|
||
| # Apply reranking if enabled | ||
| if self.rerank and self.rerank_model and kb_search_results: |
Contributor
| @@ -93,6 +104,9 @@ def __init__( | |||
| self.top_k = top_k | |||
Contributor
There was a problem hiding this comment.
对于 没有开启 rerank的检索工具,topk就返回k个检索结果。
开启了reranker,那么检索结果 应是 k* 系数个检索结果,然后从总的检索结果,综合排序 选择最优。
这个系数 我去确认下。
Contributor
There was a problem hiding this comment.
可以先按照10倍,即开启rerank,先检索 10*topK个检索结果
Contributor
Author
There was a problem hiding this comment.
系数设定为10,可在nexent/sdk/nexent/core/utils/constants.py 中通过修改RERANK_OVERSEARCH_MULTIPLIER更改
| default="", | ||
| ), | ||
| observer: MessageObserver = Field( | ||
| description="Message observer", default=None, exclude=True), |
Contributor
Contributor
Author
1c39c1e to
1ce40ff
Compare
|
abb7061 to
ce77cc3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









Added Rerank model support to the Model Management page (supports batch adding).



New Rerank toggle available for search tools (datamate, knowledge_base, dify) in Agent Space.

Enabling Rerank allows for secondary processing of retrieved chunks, leading to higher-quality AI answers in knowledge-based scenarios.