diff --git a/README.md b/README.md index 1e5f86a..c2d6c92 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ StackOne AI provides a unified interface for accessing various SaaS tools throug - Glob pattern filtering with patterns like `"hris_*"` and exclusions `"!hris_delete_*"` - Provider and action filtering with `fetch_tools()` - Multi-account support -- Dynamic MCP-backed discovery via `fetch_tools()` so you can pull the latest tools at runtime (accounts, providers, or globbed actions) -- **Meta Tools** (Beta): Dynamic tool discovery and execution based on natural language queries using hybrid BM25 + TF-IDF search +- Dynamic discovery via `fetch_tools()` so you can pull the latest tools at runtime (accounts, providers, or globbed actions) +- **Meta Tools** (Beta): Dynamic tool discovery and execution based on natural language queries - Integration with popular AI frameworks: - OpenAI Functions - LangChain Tools @@ -25,7 +25,7 @@ StackOne AI provides a unified interface for accessing various SaaS tools throug ## Requirements - Python 3.9+ (core SDK functionality) -- Python 3.10+ (for MCP server and CrewAI examples) +- Python 3.10+ (for dynamic discovery and CrewAI examples) ## Installation @@ -41,7 +41,7 @@ uv add stackone-ai ### Optional Features ```bash -# Install with MCP server support (requires Python 3.10+) +# Install with dynamic discovery support (requires Python 3.10+) uv add 'stackone-ai[mcp]' # or pip install 'stackone-ai[mcp]' @@ -106,7 +106,7 @@ tools = toolset.get_tools(["hris_*", "!hris_delete_*"]) The `fetch_tools()` method provides advanced filtering by providers, actions, and account IDs: -> `fetch_tools()` uses the StackOne MCP server under the hood. Install the optional extra (`pip install 'stackone-ai[mcp]'`) on Python 3.10+ to enable dynamic discovery. +> Install the optional extra (`pip install 'stackone-ai[mcp]'`) on Python 3.10+ to enable dynamic discovery. ```python from stackone_ai import StackOneToolSet @@ -340,7 +340,7 @@ result = feedback_tool.call( ## Meta Tools (Beta) -Meta tools enable dynamic tool discovery and execution without hardcoding tool names. The search functionality uses **hybrid BM25 + TF-IDF search** for improved accuracy (10.8% improvement over BM25 alone). +Meta tools enable dynamic tool discovery and execution without hardcoding tool names. ### Basic Usage @@ -358,30 +358,6 @@ execute_tool = meta_tools.get_tool("meta_execute_tool") result = execute_tool.call(toolName="hris_list_employees", params={"limit": 10}) ``` -### Hybrid Search Configuration - -The hybrid search combines BM25 and TF-IDF algorithms. You can customize the weighting: - -```python -# Default: hybrid_alpha=0.2 (more weight to BM25, proven optimal in testing) -meta_tools = tools.meta_tools() - -# Custom alpha: 0.5 = equal weight to both algorithms -meta_tools = tools.meta_tools(hybrid_alpha=0.5) - -# More BM25: higher alpha (0.8 = 80% BM25, 20% TF-IDF) -meta_tools = tools.meta_tools(hybrid_alpha=0.8) - -# More TF-IDF: lower alpha (0.2 = 20% BM25, 80% TF-IDF) -meta_tools = tools.meta_tools(hybrid_alpha=0.2) -``` - -**How it works:** -- **BM25**: Excellent at keyword matching and term frequency -- **TF-IDF**: Better at understanding semantic relationships -- **Hybrid**: Combines strengths of both for superior accuracy -- **Default alpha=0.2**: Optimized through validation testing for best tool discovery - ## Examples For more examples, check out the [examples/](examples/) directory: