mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-21 18:05:30 -04:00
[PR #214] Draft: Alternative Normalization Scheme for Reranking Update rerank.py #228
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/214
Author: @AuditAIH
Created: 9/29/2025
Status: 🔄 Open
Base:
main← Head:patch-1📝 Commits (1)
caf87c6Draft: Alternative Normalization Scheme for Reranking Update rerank.py📊 Changes
1 file changed (+7 additions, -6 deletions)
View changed files
📝
python/dify_plugin/interfaces/model/openai_compatible/rerank.py(+7 -6)📄 Description
Draft: Alternative Normalization Scheme for Reranking
This submission presents a draft of a normalization scheme more suitable for reranking tasks.
Notably, this implementation replaces the original Min-Max normalization (which maps scores to the 0~1.0 range) with sigmoid normalization. The sigmoid function (1 / (1 + e^(-x))) is applied to each score to achieve the 0-1 range mapping.
Important note: This change will have a significant impact on API numerical values that currently return results in the (0,1) range. Therefore, this draft is not recommended for merging at this stage.
Pull Request Checklist
Thank you for your contribution! Before submitting your PR, please make sure you have completed the following checks:
Compatibility Check
README.mdREADME.mdREADME.mdREADME.mdAvailable Checks
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.