File tree Expand file tree Collapse file tree 6 files changed +9
-14
lines changed
Expand file tree Collapse file tree 6 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ def utility_tools(
584584
585585 Utility tools enable dynamic tool discovery and execution based on natural language queries.
586586 By default, uses local hybrid BM25 + TF-IDF search. Optionally, can use cloud-based
587- semantic search for higher accuracy (84% Hit@5 vs 21% for local search) .
587+ semantic search for higher accuracy on natural language queries .
588588
589589 Args:
590590 hybrid_alpha: Weight for BM25 in hybrid search (0-1). Only used when
Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ class SemanticSearchClient:
3737 """Client for StackOne semantic search API.
3838
3939 This client provides access to the semantic search endpoint which uses
40- enhanced embeddings for 84% Hit@5 accuracy (compared to ~21% for local
41- BM25+TF-IDF search).
40+ enhanced embeddings for higher accuracy than local BM25+TF-IDF search.
4241
4342 Example:
4443 client = SemanticSearchClient(api_key="sk-xxx")
Original file line number Diff line number Diff line change @@ -296,9 +296,9 @@ def search_tools(
296296 ) -> Tools :
297297 """Search for and fetch tools using semantic search.
298298
299- This method uses the StackOne semantic search API (84% Hit@5 accuracy)
300- to find relevant tools based on natural language queries. It optimizes
301- results by filtering to only connectors available in linked accounts.
299+ This method uses the StackOne semantic search API to find relevant tools
300+ based on natural language queries. It optimizes results by filtering to
301+ only connectors available in linked accounts.
302302
303303 Args:
304304 query: Natural language description of needed functionality
Original file line number Diff line number Diff line change @@ -270,8 +270,8 @@ def execute(
270270def create_semantic_tool_search (semantic_client : SemanticSearchClient ) -> StackOneTool :
271271 """Create a semantic search variant of tool_search.
272272
273- Uses cloud semantic search API (84% Hit@5 accuracy) instead of
274- local BM25+TF-IDF (21% accuracy) .
273+ Uses cloud semantic search API instead of local BM25+TF-IDF for
274+ improved natural language tool discovery .
275275
276276 Args:
277277 semantic_client: Initialized SemanticSearchClient instance
@@ -287,7 +287,7 @@ def create_semantic_tool_search(semantic_client: SemanticSearchClient) -> StackO
287287 name = "tool_search"
288288 description = (
289289 "Searches for relevant tools based on a natural language query using "
290- "semantic vector search (84% accuracy) . Call this first to discover "
290+ "semantic vector search. Call this first to discover "
291291 "available tools before executing them."
292292 )
293293
Original file line number Diff line number Diff line change 11"""
22Benchmark comparing local BM25+TF-IDF vs semantic search.
33
4- Expected results:
5- - Local BM25+TF-IDF: ~21% Hit@5
6- - Semantic Search: ~84% Hit@5
7- - Improvement: 4x
4+ Compares Hit@5 and MRR between local BM25+TF-IDF and semantic search.
85
96Run with production API:
107 STACKONE_API_KEY=xxx python tests/benchmark_search.py
Original file line number Diff line number Diff line change @@ -508,7 +508,6 @@ def test_semantic_tool_search_has_correct_parameters(self) -> None:
508508
509509 assert tool .name == "tool_search"
510510 assert "semantic" in tool .description .lower ()
511- assert "84%" in tool .description
512511
513512 props = tool .parameters .properties
514513 assert "query" in props
You can’t perform that action at this time.
0 commit comments