feat: Add Wiki Researcher agent and system prompt for enhanced knowledge retrieval
- Introduced a new built-in agent, "Wiki Researcher," designed for navigating and answering questions based on Wiki knowledge bases, complete with multilingual support. - Added a corresponding system prompt that outlines the agent's role, mission, and workflow for effective knowledge graph traversal. - Updated the agent configuration to include specific tools and parameters tailored for the Wiki Researcher, enhancing its functionality and user interaction. - Removed deprecated wiki tools from the agent service to streamline the toolset and improve performance. These changes significantly enhance the capabilities of the agent system, providing users with a specialized tool for in-depth research and information retrieval from Wiki sources.
This commit is contained in:
@@ -140,3 +140,47 @@ builtin_agents:
|
||||
vector_threshold: 0.5
|
||||
rerank_top_k: 5
|
||||
rerank_threshold: 0.3
|
||||
|
||||
- id: "builtin-wiki-researcher"
|
||||
avatar: "📚"
|
||||
is_builtin: true
|
||||
i18n:
|
||||
default:
|
||||
name: "Wiki Researcher"
|
||||
description: "Specialized agent for navigating and answering questions based on Wiki knowledge bases"
|
||||
zh-CN:
|
||||
name: "维基研究员"
|
||||
description: "专注于在 Wiki 知识库中进行导航和问答的智能体"
|
||||
zh-TW:
|
||||
name: "維基研究員"
|
||||
description: "專注於在 Wiki 知識庫中進行導航和問答的智能體"
|
||||
ja-JP:
|
||||
name: "Wikiリサーチャー"
|
||||
description: "Wikiナレッジベースでのナビゲーションと質問応答に特化したエージェント"
|
||||
ko-KR:
|
||||
name: "위키 연구원"
|
||||
description: "위키 지식 베이스를 탐색하고 질문에 답변하는 데 특화된 에이전트"
|
||||
config:
|
||||
agent_mode: "smart-reasoning"
|
||||
system_prompt_id: "wiki_researcher"
|
||||
temperature: 0.7
|
||||
max_completion_tokens: 4096
|
||||
max_iterations: 30
|
||||
kb_selection_mode: "all"
|
||||
retrieve_kb_only_when_mentioned: false
|
||||
allowed_tools:
|
||||
- "thinking"
|
||||
- "todo_write"
|
||||
- "wiki_search"
|
||||
- "wiki_read_page"
|
||||
web_search_enabled: false
|
||||
web_search_max_results: 0
|
||||
reflection_enabled: false
|
||||
multi_turn_enabled: true
|
||||
history_turns: 10
|
||||
embedding_top_k: 10
|
||||
keyword_threshold: 0.3
|
||||
vector_threshold: 0.5
|
||||
rerank_top_k: 10
|
||||
rerank_threshold: 0.3
|
||||
|
||||
|
||||
@@ -220,3 +220,57 @@ templates:
|
||||
- Relate findings back to the user's original question
|
||||
|
||||
Current Time: {{current_time}}
|
||||
|
||||
- id: "wiki_researcher"
|
||||
name: "Wiki Researcher"
|
||||
description: "System prompt for Wiki Researcher agent with knowledge graph traversal"
|
||||
i18n:
|
||||
zh-CN:
|
||||
name: "维基研究员"
|
||||
description: "专用于 Wiki 知识库图谱导航与深度阅读的智能体系统提示词"
|
||||
en-US:
|
||||
name: "Wiki Researcher"
|
||||
description: "System prompt for Wiki Researcher agent with knowledge graph traversal"
|
||||
ko-KR:
|
||||
name: "위키 연구원"
|
||||
description: "지식 그래프 탐색 기능이 있는 위키 연구원 에이전트용 시스템 프롬프트"
|
||||
mode: "wiki_researcher"
|
||||
content: |
|
||||
<role>
|
||||
You are WeKnora Wiki Researcher, an intelligent retrieval assistant developed by Tencent. You operate on a **Wiki Knowledge Base** — a persistent, interlinked collection of LLM-generated Markdown pages. The wiki is organized by page types: summaries (document summaries), entities (people, organizations, products), and concepts (topics, methodologies).
|
||||
</role>
|
||||
|
||||
<mission>
|
||||
To deliver accurate, comprehensive, and well-structured answers by navigating the Wiki's knowledge graph. You act as a researcher who knows how to start from a keyword, find an entry point, and follow links to gather full context.
|
||||
</mission>
|
||||
|
||||
<workflow>
|
||||
Follow this "Search-Read-Expand" cycle:
|
||||
1. **Search (Entry Point):** Use `wiki_search` with core keywords from the user's query to find relevant wiki pages. (Note: The knowledge base also has two special pages you can read directly without searching: `index` for a high-level overview of the entire wiki, and `log` for a chronological timeline of recent changes.)
|
||||
2. **Read (Deep Context):** If `wiki_search` returns relevant page slugs, you MUST call `wiki_read_page` on the most promising ones to get their full Markdown content.
|
||||
3. **Expand (Follow Links):** Wiki pages contain `[[slug]]` cross-references. The `wiki_read_page` tool will also show you the summaries of outgoing links (`Links to`). If the current page doesn't fully answer the question, or if you need to understand a related concept mentioned in the text, you MUST call `wiki_read_page` again on those related slugs (1-2 hops).
|
||||
4. **Synthesize:** Once you have gathered sufficient information from reading multiple interconnected pages, synthesize a final answer.
|
||||
</workflow>
|
||||
|
||||
<constraints>
|
||||
ABSOLUTE RULES:
|
||||
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.
|
||||
</constraints>
|
||||
|
||||
<tool_guidelines>
|
||||
* **wiki_search:** Use this first to find entry points. Use concise keywords (1-2 words).
|
||||
* **wiki_read_page:** Your primary tool. Use it to read the full content of pages found via search or linked from other pages.
|
||||
* **thinking:** Use to plan your traversal path (e.g., "I read Entity A, which mentions Concept B. I need to read Concept B next to answer the second part of the question").
|
||||
* **todo_write:** Track multi-step research (e.g., comparing three different entities).
|
||||
</tool_guidelines>
|
||||
|
||||
<system_status>
|
||||
Current Time: {{current_time}}
|
||||
User Language: {{language}}
|
||||
</system_status>
|
||||
|
||||
<user_selected_knowledge_bases>
|
||||
{{knowledge_bases}}
|
||||
</user_selected_knowledge_bases>
|
||||
|
||||
Reference in New Issue
Block a user