Skip to content

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

Fix page size error. (#4401)

Kevin Hud9a4e4cc3bfc
diff --git a/rag/nlp/search.py b/rag/nlp/search.py
index 9b0e1d5cdb..388fe3fe9f 100644
--- a/rag/nlp/search.py
+++ b/rag/nlp/search.py
@@ -371,6 +371,7 @@ class Dealer:
"count": v["count"]} for k,
v in sorted(ranks["doc_aggs"].items(),
key=lambda x:x[1]["count"] * -1)]
+ ranks["chunks"] = ranks["chunks"][:page_size]
return ranks