From da608206aff36cfcf5dbb09f9a0a553410fd248b Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Fri, 7 Feb 2025 16:02:14 +0800 Subject: [PATCH] feat: improve dedup with jina embeddings --- src/agent.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/agent.ts b/src/agent.ts index aef9061..e9ba197 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -32,7 +32,7 @@ function getSchema(allowReflect: boolean, allowRead: boolean, allowAnswer: boole if (allowSearch) { actions.push("search"); properties.searchQuery = z.string().max(30) - .describe("Only required when choosing 'search' action, must be a short, keyword-based query that BM25, tf-idf based search engines can understand.").optional(); + .describe("Only required when choosing 'search' action, must be a short, keyword-based query that BM25, tf-idf based search engines can understand. Existing queries must be avoided").optional(); } if (allowAnswer) { @@ -194,15 +194,15 @@ ${urlList} actionSections.push(` -- Search external, realtime world-knoweledge using a search engine -- Focus on solving one specific aspect of the question -- Only use keywords in th search query, not full sentences ${allKeywords?.length ? ` -- Avoid the following searched queries as they do not give any useful information, you need to think out of the box and propose queries from a completely different angle: +- Avoid the searched queries below as they do not give any useful information, you need to think out of the box and propose queries from a completely different angle: ${allKeywords.join('\n')} `.trim() : ''} +- Propose some unique new queries that might help you find the answer to the question +- Focus on solving one specific aspect of the original question +- Only use keywords, not full sentences `); }