diff --git a/src/renderer/src/config/prompts.ts b/src/renderer/src/config/prompts.ts
index 926a138f14..815eb7d113 100644
--- a/src/renderer/src/config/prompts.ts
+++ b/src/renderer/src/config/prompts.ts
@@ -306,7 +306,7 @@ export const SEARCH_SUMMARY_PROMPT_KNOWLEDGE_ONLY = `
**Use user's language to rephrase the question.**
Follow these guidelines:
1. If the question is a simple writing task, greeting (e.g., Hi, Hello, How are you), or does not require searching for information (unless the greeting contains a follow-up question), return 'not_needed' in the 'question' XML block. This indicates that no search is required.
- 2. For knowledge, You need rewrite user query into 'rewrite' XML block with one alternative version while preserving the original intent and meaning. Also include the original question in the 'question' block.
+ 2. For knowledge, You need rewrite user query into 'rewrite' XML block with one alternative version while preserving the original intent and meaning. Also include the rephrased or decomposed question(s) in the 'question' block.
3. Always return the rephrased question inside the 'question' XML block.
4. Always wrap the rephrased question in the appropriate XML blocks: use for queries that can be answered from a pre-existing knowledge base. Ensure that the rephrased question is always contained within a block inside the wrapper.
5. *use knowledge to rephrase the question*
diff --git a/src/renderer/src/services/KnowledgeService.ts b/src/renderer/src/services/KnowledgeService.ts
index e2f2e6fc15..e78cfa62e5 100644
--- a/src/renderer/src/services/KnowledgeService.ts
+++ b/src/renderer/src/services/KnowledgeService.ts
@@ -162,7 +162,7 @@ export const searchKnowledgeBase = async (
const searchResults: KnowledgeSearchResult[] = await window.api.knowledgeBase.search(
{
- search: rewrite || query,
+ search: query || rewrite || '',
base: baseParams
},
currentSpan?.spanContext()