diff --git a/config/prompt_templates/agent_system_prompt.yaml b/config/prompt_templates/agent_system_prompt.yaml index cfebcae5..794b004f 100644 --- a/config/prompt_templates/agent_system_prompt.yaml +++ b/config/prompt_templates/agent_system_prompt.yaml @@ -262,7 +262,7 @@ templates: 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. + 3. **Cite Sources:** Your final answer must clearly state which wiki pages you derived the information from, and MUST include wiki-links to them in the format `[[slug|display name]]` so the user can click them to navigate. 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. @@ -336,6 +336,7 @@ templates: - Use proper heading hierarchy (`##` for sections, `###` for subsections). - Include a "## Key Takeaways" section with bullet points at the end. - Preserve any valid image links `![alt](url)`. + - Use wiki-links `[[slug|display name]]` whenever mentioning entities/concepts that exist in the wiki. 9. **Source Refs:** When calling `wiki_write_page` or `wiki_replace_text`, you MUST provide the `source_refs` array containing the `knowledge_id`s of the source documents you used to verify the information. diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index 936d3f34..719c9b07 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -3413,6 +3413,7 @@ export default { notFound: 'Content not found', loadFailed: 'Failed to load', chunkId: 'Chunk ID', + noKbForWiki: 'Unable to identify associated knowledge base. Cannot open Wiki.', }, toolSummary: { getDocument: 'Get document: {title}', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index 9c56e3b8..1bdb17af 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -3411,6 +3411,7 @@ export default { notFound: "未找到内容", loadFailed: "加载失败", chunkId: "片段ID", + noKbForWiki: "无法识别关联的知识库,无法打开 Wiki", }, toolSummary: { getDocument: "获取文档:{title}", diff --git a/frontend/src/views/chat/components/AgentStreamDisplay.vue b/frontend/src/views/chat/components/AgentStreamDisplay.vue index d98f7cc9..d249d38f 100644 --- a/frontend/src/views/chat/components/AgentStreamDisplay.vue +++ b/frontend/src/views/chat/components/AgentStreamDisplay.vue @@ -339,7 +339,7 @@