[PR #214] Draft: Alternative Normalization Scheme for Reranking Update rerank.py #228

Open
opened 2026-02-15 21:16:19 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/214
Author: @AuditAIH
Created: 9/29/2025
Status: 🔄 Open

Base: mainHead: patch-1


📝 Commits (1)

  • caf87c6 Draft: 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

  • I have checked whether this change affects the backward compatibility of the plugin declared in README.md
  • I have checked whether this change affects the forward compatibility of the plugin declared in README.md
  • If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the README.md
  • I have described the compatibility impact and the corresponding version number in the PR description
  • I have checked whether the plugin version is updated in the README.md

Available Checks

  • Code has passed local tests
  • Relevant documentation has been updated (if necessary)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-sdks/pull/214 **Author:** [@AuditAIH](https://github.com/AuditAIH) **Created:** 9/29/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`caf87c6`](https://github.com/langgenius/dify-plugin-sdks/commit/caf87c64179f1cf46a79b3662efe94cfc55029e3) Draft: Alternative Normalization Scheme for Reranking Update rerank.py ### 📊 Changes **1 file changed** (+7 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `python/dify_plugin/interfaces/model/openai_compatible/rerank.py` (+7 -6) </details> ### 📄 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 - [ ] I have checked whether this change affects the **backward compatibility** of the plugin declared in `README.md` - [ ] I have checked whether this change affects the **forward compatibility** of the plugin declared in `README.md` - [ ] If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the `README.md` - [ ] I have described the compatibility impact and the corresponding version number in the PR description - [ ] I have checked whether the plugin version is updated in the `README.md` ## Available Checks - [ ] Code has passed local tests - [ ] Relevant documentation has been updated (if necessary) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 21:16:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#228