RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
examples empty in categorize (#1422)
KevinHuShc889ef636378
diff --git a/graph/component/categorize.py b/graph/component/categorize.pyindex d18cab6fd2..c9ef19164e 100644--- a/graph/component/categorize.py+++ b/graph/component/categorize.py@@ -43,7 +43,7 @@ class CategorizeParam(GenerateParam):def get_prompt(self):cate_lines = []for c, desc in self.category_description.items():- for l in desc["examples"].split("\n"):+ for l in desc.get("examples", "").split("\n"):if not l: continuecate_lines.append("Question: {}\tCategory: {}".format(l, c))descriptions = []diff --git a/rag/nlp/term_weight.py b/rag/nlp/term_weight.pyindex 720087acca..34765feaf9 100644--- a/rag/nlp/term_weight.py+++ b/rag/nlp/term_weight.py@@ -107,7 +107,7 @@ class Dealer:if re.match(p, t):tk = "#"break- tk = re.sub(r"([\+\\-])", r"\\\1", tk)+ #tk = re.sub(r"([\+\\-])", r"\\\1", tk)if tk != "#" and tk:res.append(tk)return res