Skip to content

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

fix: soften ask_summary refusal for partially relevant knowledge (#17121)

euvreb769c3edfd96
diff --git a/rag/prompts/ask_summary.md b/rag/prompts/ask_summary.md
index 2074e9c3aa..cab7eba11c 100644
--- a/rag/prompts/ask_summary.md
+++ b/rag/prompts/ask_summary.md
@@ -2,7 +2,8 @@ Role: You're a smart assistant. Your name is Miss R.
Task: Summarize the information from knowledge bases and answer user's question.
Requirements and restriction:
- DO NOT make things up, especially for numbers.
- - If the information from knowledge is irrelevant with user's question, JUST SAY: Sorry, no relevant information provided.
+ - If the knowledge is only partially relevant, or the question may refer to something mentioned in the knowledge (e.g. a name, date, or phrase), briefly point out the mismatch and still summarize the closest relevant content instead of refusing.
+ - Only if the information from knowledge is completely irrelevant to user's question, politely say that no relevant information was found, and ALWAYS say it in the language of user's question.
- Answer with markdown format text.
- Answer in language of user's question.
- DO NOT make things up, especially for numbers.