diff --git a/src/renderer/src/aiCore/tools/KnowledgeSearchTool.ts b/src/renderer/src/aiCore/tools/KnowledgeSearchTool.ts index 7764fd81e7..314eb9ba01 100644 --- a/src/renderer/src/aiCore/tools/KnowledgeSearchTool.ts +++ b/src/renderer/src/aiCore/tools/KnowledgeSearchTool.ts @@ -18,12 +18,13 @@ export const knowledgeSearchTool = ( ) => { return tool({ name: 'builtin_knowledge_search', - description: `Search the knowledge base for relevant information using pre-analyzed search intent. + description: `Knowledge base search tool for retrieving information from user's private knowledge base. This searches your local collection of documents, web content, notes, and other materials you have stored. -Pre-extracted search queries: "${extractedKeywords.question.join(', ')}" -Rewritten query: "${extractedKeywords.rewrite}" +This tool has been configured with search parameters based on the conversation context: +- Prepared queries: ${extractedKeywords.question.map((q) => `"${q}"`).join(', ')} +- Query rewrite: "${extractedKeywords.rewrite}" -Call this tool to execute the search. You can optionally provide additional context to refine the search.`, +You can use this tool as-is, or provide additionalContext to refine the search focus within the knowledge base.`, inputSchema: z.object({ additionalContext: z diff --git a/src/renderer/src/aiCore/tools/WebSearchTool.ts b/src/renderer/src/aiCore/tools/WebSearchTool.ts index 2b0b7fb13b..2d6e318306 100644 --- a/src/renderer/src/aiCore/tools/WebSearchTool.ts +++ b/src/renderer/src/aiCore/tools/WebSearchTool.ts @@ -21,16 +21,17 @@ export const webSearchToolWithPreExtractedKeywords = ( return tool({ name: 'builtin_web_search', - description: `Search the web and return citable sources using pre-analyzed search intent. + description: `Web search tool for finding current information, news, and real-time data from the internet. -Pre-extracted search keywords: "${extractedKeywords.question.join(', ')}"${ - extractedKeywords.links +This tool has been configured with search parameters based on the conversation context: +- Prepared queries: ${extractedKeywords.question.map((q) => `"${q}"`).join(', ')}${ + extractedKeywords.links?.length ? ` -Relevant links: ${extractedKeywords.links.join(', ')}` +- Relevant URLs: ${extractedKeywords.links.join(', ')}` : '' } -Call this tool to execute the search. You can optionally provide additional context to refine the search.`, +You can use this tool as-is to search with the prepared queries, or provide additionalContext to refine or replace the search terms.`, inputSchema: z.object({ additionalContext: z