From 83e23f1e8a808fccbe6a3a9b73ed74e0da02df87 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Mon, 23 Jun 2025 14:10:13 +0800 Subject: [PATCH] Fix: rank feature score should be greater than 0. (#8416) ### What problem does this PR solve? #8414 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/prompts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rag/prompts.py b/rag/prompts.py index 389d6a66d..66c8a4ef4 100644 --- a/rag/prompts.py +++ b/rag/prompts.py @@ -427,7 +427,8 @@ Output: res = {} for k, v in obj.items(): try: - res[str(k)] = int(v) + if int(v) > 0: + res[str(k)] = int(v) except Exception: pass return res