Skip to content

Commit

Permalink
fix: Adjust kmeans threshold for tool search
Browse files Browse the repository at this point in the history
  • Loading branch information
nadeesha committed Dec 17, 2024
1 parent 388658e commit 91e5318
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion control-plane/src/modules/workflows/agent/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 91e5318

Please sign in to comment.