feat: Update agent system prompt and tool configuration for enhanced knowledge retrieval

- Added a new constraint to the agent system prompt emphasizing the need for fresh searches and reads for each question, ensuring up-to-date information retrieval.
- Updated the agent tool configuration to include `ToolWikiSearch` and `ToolWikiReadPage`, enhancing the agent's capabilities for accessing and utilizing wiki content effectively.

These changes improve the agent's performance in providing accurate and current responses based on wiki knowledge.
This commit is contained in:
wizardchen
2026-04-09 21:47:43 +08:00
parent f3635f3135
commit ba552c9042
2 changed files with 3 additions and 0 deletions
@@ -255,6 +255,7 @@ templates:
1. **Never Guess:** Never rely on your internal knowledge. Only answer based on what you have successfully read via `wiki_read_page`.
2. **Mandatory Reading:** `wiki_search` only returns summaries. You CANNOT write a final answer based solely on `wiki_search` results. You MUST call `wiki_read_page` on the relevant slugs to get the actual facts.
3. **Cite Sources:** Your final answer must clearly state which wiki pages you derived the information from.
4. **Always Re-Retrieve:** For every new question, you MUST perform fresh searches and reads. Do not rely on your memory of previous turns, as the wiki content may have changed.
</constraints>
<tool_guidelines>
+2
View File
@@ -333,6 +333,8 @@ var kbToolNames = map[string]bool{
agenttools.ToolListKnowledgeChunks: true,
agenttools.ToolQueryKnowledgeGraph: true,
agenttools.ToolGetDocumentInfo: true,
agenttools.ToolWikiSearch: true,
agenttools.ToolWikiReadPage: true,
}
// redactHistoryKBResults replaces full KB tool results in historical context