feat: Update agent type presets and prompt templates for improved knowledge base handling
- Changed `kb_selection_mode` in agent type presets from "selected" to "all" to allow agents to access all knowledge bases by default.
- Revised prompt templates to clarify the handling of bound knowledge bases, replacing the `{{knowledge_bases}}` placeholder with a reference to the `<bound_knowledge_bases>` block in the user message's `<runtime_context>`.
- Enhanced internal logic to ensure that only searchable knowledge bases are considered during retrieval, improving the efficiency of knowledge searches.
- Added new functions for better formatting and handling of knowledge base metadata in the runtime context.
- Updated documentation and comments for clarity on the changes made to knowledge base interactions.
This commit is contained in:
@@ -1780,8 +1780,9 @@ const defaultFormData = {
|
||||
// Skills 设置
|
||||
skills_selection_mode: 'none' as 'all' | 'selected' | 'none',
|
||||
selected_skills: [] as string[],
|
||||
// 知识库设置
|
||||
kb_selection_mode: 'none' as 'all' | 'selected' | 'none',
|
||||
// 知识库设置:新建智能体默认选择 "全部知识库",
|
||||
// 让用户无需先去勾选 KB 即可上手;如有需要可改为 "selected" / "none"。
|
||||
kb_selection_mode: 'all' as 'all' | 'selected' | 'none',
|
||||
knowledge_bases: [] as string[],
|
||||
retrieve_kb_only_when_mentioned: false,
|
||||
// 智能推理下的类型预设:新建 agent 时默认给 RAG 问答(最常用场景)。
|
||||
@@ -2159,7 +2160,8 @@ watch(() => props.visible, async (val) => {
|
||||
}
|
||||
}
|
||||
formData.value = newFormData;
|
||||
kbSelectionMode.value = 'none';
|
||||
// 新建智能体:知识库默认 "全部",MCP / Skills 仍默认 "不使用"。
|
||||
kbSelectionMode.value = 'all';
|
||||
mcpSelectionMode.value = 'none';
|
||||
skillsSelectionMode.value = 'none';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user