Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: rank feature score should be greater than 0. (#8416)

Kevin Hu83e23f1e8a80
diff --git a/rag/prompts.py b/rag/prompts.py
index 389d6a66d8..66c8a4ef49 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