mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-02 02:09:03 +08:00
refactor(tools): enhance descriptions for knowledge and web search tools (#10433)
* refactor(tools): enhance descriptions for knowledge and web search tools - Updated the descriptions for the knowledgeSearchTool and webSearchTool to provide clearer context on their functionality. - Improved the formatting of prepared queries and relevant links in the descriptions to enhance user understanding. - Added information on how to use the tools with additional context for refined searches. * fix:format lint
This commit is contained in:
parent
20f5271682
commit
e195ad4a8f
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user