Skip to content

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

fix: optimize reranking module robustness and bug fixes (#14264)

07heco8dc5b1b42d14
diff --git a/rag/llm/rerank_model.py b/rag/llm/rerank_model.py
index bcf8347e6f..99801e00a7 100644
--- a/rag/llm/rerank_model.py
+++ b/rag/llm/rerank_model.py
@@ -435,6 +435,7 @@ class HuggingfaceRerank(Base):
for i in range(0, len(texts), batch_size):
try:
+ # Fix: Add request timeout
res = requests.post(
endpoint, headers={"Content-Type": "application/json"},
json={"query": query, "texts": texts[i:i+batch_size], "raw_scores": False, "truncate": True},