feat: Introduce wiki_read_source_doc tool for enhanced document retrieval

- Added a new tool, `wiki_read_source_doc`, allowing agents to access specific source documents for detailed information retrieval when wiki page content is insufficient.
- Updated the agent system prompt and tool definitions to incorporate the new tool, enhancing the agent's capabilities for in-depth knowledge extraction.
- Modified existing tools to support the new functionality, ensuring seamless integration within the agent's workflow.

These changes significantly improve the agent's ability to provide accurate and detailed responses by leveraging source documents alongside wiki content.
This commit is contained in:
wizardchen
2026-04-10 00:08:23 +08:00
parent 76c13c9bfe
commit 177f5e44b4
7 changed files with 365 additions and 5 deletions
+4 -2
View File
@@ -23,8 +23,9 @@ const (
ToolExecuteSkillScript = "execute_skill_script"
ToolReadSkill = "read_skill"
// Wiki-related tools (only available when wiki KBs are in scope)
ToolWikiReadPage = "wiki_read_page"
ToolWikiSearch = "wiki_search"
ToolWikiReadPage = "wiki_read_page"
ToolWikiSearch = "wiki_search"
ToolWikiReadSourceDoc = "wiki_read_source_doc"
)
// AvailableTool defines a simple tool metadata used by settings APIs.
@@ -53,6 +54,7 @@ func AvailableToolDefinitions() []AvailableTool {
{Name: ToolFinalAnswer, Label: "提交最终回答", Description: "提交最终回答给用户"},
{Name: ToolWikiReadPage, Label: "读取Wiki页面", Description: "读取指定的Wiki页面内容"},
{Name: ToolWikiSearch, Label: "搜索Wiki", Description: "在Wiki中搜索页面"},
{Name: ToolWikiReadSourceDoc, Label: "精读源文档", Description: "使用知识点深入阅读特定原始文档"},
}
}