From 91e53181311a54d33b21ffdf0a566f6eac8bc23c Mon Sep 17 00:00:00 2001 From: Nadeesha Cabral Date: Tue, 17 Dec 2024 17:59:26 +1100 Subject: [PATCH] fix: Adjust kmeans threshold for tool search --- control-plane/src/modules/workflows/agent/run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control-plane/src/modules/workflows/agent/run.ts b/control-plane/src/modules/workflows/agent/run.ts index f2ee89bf..41cc3a30 100644 --- a/control-plane/src/modules/workflows/agent/run.ts +++ b/control-plane/src/modules/workflows/agent/run.ts @@ -278,7 +278,7 @@ async function findRelatedFunctionTools(workflow: Run, search: string) { let relatedTools = relatedToolsSearchResults; - if (useKmeans && relatedToolsSearchResults?.length > 1) { + if (useKmeans && relatedToolsSearchResults?.length > 30) { logger.info("Using kmeans clustering for related tool search"); relatedTools = mostRelevantKMeansCluster(relatedToolsSearchResults); }