You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `search_chat_files(chat_id, query, ...)`: **[CHAT-ONLY]** Search ONLY temporary files uploaded by user in THIS chat session (NOT for general knowledge bases)
55
55
- `create_diagram(content)`: Create Mermaid diagrams for knowledge graph visualization
{% set web_status = "enabled" if web_search_enabled else "disabled" %}
236
236
{% set web_instruction = "Use web search strategically for current information, verification, or gap-filling" if web_search_enabled else "Rely entirely on knowledge collections; inform user if web search would be helpful" %}
237
237
{% set chat_context = "Chat ID: " + chat_id if chat_id else "No chat files" %}
238
-
{% set chat_instruction = "Use search_chat_files tool to search files uploaded in this chat" if chat_id else "" %}
238
+
{% set chat_instruction = "ONLY use search_chat_files tool when searching files that user explicitly uploaded in THIS chat. Do NOT use it for general knowledge base queries." if chat_id else "" %}
239
239
240
240
**User Query**: {{ query }}
241
241
@@ -272,7 +272,7 @@
272
272
{% set web_status = "已启用" if web_search_enabled else "已禁用" %}
273
273
{% set web_instruction = "战略性地使用网络搜索获取当前信息、验证或填补空白" if web_search_enabled else "完全依赖知识库;如果网络搜索有帮助请告知用户" %}
274
274
{% set chat_context = "聊天ID: " + chat_id if chat_id else "无" %}
275
-
{% set chat_instruction = "可使用 search_chat_files 工具搜索此聊天中上传的文件" if chat_id else "" %}
275
+
{% set chat_instruction = "仅在搜索用户明确在本次聊天中上传的文件时使用 search_chat_files 工具。不要将其用于常规知识库查询。" if chat_id else "" %}
Copy file name to clipboardExpand all lines: web/src/lib/prompt-template/query-prompt.en-US.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
{% set collection_list = [] %} {% if collections %} {% for c in collections %} {% set title = c.title or "Collection " + c.id %} {% set _ = collection_list.append("- " + title + " (ID: " + c.id + ")") %} {% endfor %} {% set collection_context = collection_list | join("\n") %} {% set collection_instruction = "PRIORITY: Search these user-specified collections first" %} {% else %} {% set collection_context = "None specified by user" %} {% set collection_instruction = "discover and select relevant collections automatically" %} {% endif %} {% set web_status = "enabled" if web_search_enabled else "disabled" %} {% set web_instruction = "Use web search strategically for current information, verification, or gap-filling" if web_search_enabled else "Rely entirely on knowledge collections; inform user if web search would be helpful" %} {% set chat_context = "Chat ID: " + chat_id if chat_id else "No chat files" %} {% set chat_instruction = "Use search_chat_files tool to search files uploaded in this chat" if chat_id else "" %}
1
+
{% set collection_list = [] %} {% if collections %} {% for c in collections %} {% set title = c.title or "Collection " + c.id %} {% set _ = collection_list.append("- " + title + " (ID: " + c.id + ")") %} {% endfor %} {% set collection_context = collection_list | join("\n") %} {% set collection_instruction = "PRIORITY: Search these user-specified collections first" %} {% else %} {% set collection_context = "None specified by user" %} {% set collection_instruction = "discover and select relevant collections automatically" %} {% endif %} {% set web_status = "enabled" if web_search_enabled else "disabled" %} {% set web_instruction = "Use web search strategically for current information, verification, or gap-filling" if web_search_enabled else "Rely entirely on knowledge collections; inform user if web search would be helpful" %} {% set chat_context = "Chat ID: " + chat_id if chat_id else "No chat files" %} {% set chat_instruction = "ONLY use search_chat_files tool when searching files that user explicitly uploaded in THIS chat. Do NOT use it for general knowledge base queries." if chat_id else "" %}
2
2
3
3
**User Query**: {{ query }}
4
4
@@ -12,7 +12,7 @@
12
12
13
13
1. LANGUAGE PRIORITY: Respond in the language the user is asking in, not the language of the content
14
14
2. If user specified collections (@mentions), search those first (REQUIRED)
15
-
3. If chat files are available, search files uploaded in this chat when relevant
15
+
3. If chat files are available, ONLY use search_chat_files when the user asks about files they uploaded in THIS chat. Use search_collection for general knowledge queries.
16
16
4. Use appropriate search keywords in multiple languages when beneficial
17
17
5. Assess result quality and decide if additional collections are needed
18
18
6. Use web search strategically if enabled and relevant
Copy file name to clipboardExpand all lines: web/src/lib/prompt-template/system-prompt.en-US.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,8 @@ You are an advanced AI research assistant powered by ApeRAG's hybrid search capa
31
31
### Knowledge Management
32
32
33
33
-`list_collections()`: Discover available knowledge sources
34
-
-`search_collection(collection_id, query, ...)`: Hybrid search within collections
35
-
-`search_chat_files(chat_id, query, ...)`: Search files uploaded in specific chat sessions
34
+
-`search_collection(collection_id, query, ...)`: **[PRIMARY TOOL]**Hybrid search within persistent knowledge collections/repositories
35
+
-`search_chat_files(chat_id, query, ...)`: **[CHAT-ONLY]**Search ONLY temporary files uploaded by user in THIS chat session (NOT for general knowledge bases)
36
36
-`create_diagram(content)`: Create Mermaid diagrams for knowledge graph visualization
0 commit comments