Lightweight semantic tool selector for LLM tool binding
Project description
smart-tool-select
Lightweight tool selector for binding relevant tools to LLMs per request.
Install
pip install smart-tool-select
This package bundles the default embedding model and does not download at runtime.
Quick usage
from smart_tool_select import SmartToolSelector
filtered_tools = SmartToolSelector(
"planing trip to dubai and hotel",
tools,
mode="semantic",
top_k=3,
)
Modes and accuracy
mode="lite"(default): TF-IDF keyword matching. Fast and offline, but less semantic.mode="semantic": Embedding-based matching. Higher accuracy for intent-heavy queries.
If you care about accuracy, use mode="semantic". Use mode="lite" for maximum speed or offline environments.
Optional extras
pip install smart-tool-select[faiss]
pip install smart-tool-select[hnswlib]
pip install smart-tool-select[yaml]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smart_tool_select-0.1.0.tar.gz.
File metadata
- Download URL: smart_tool_select-0.1.0.tar.gz
- Upload date:
- Size: 83.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba97b98cb3dfb12d5412ba442a2538f36ef3e89b7630da9241b13d6986d25c78
|
|
| MD5 |
8dff207e6e6b854d8c139358319d2069
|
|
| BLAKE2b-256 |
c0bae0c9c52d102103fca8f712ecb587bc09b16c18011800e361f1ec975a783c
|
File details
Details for the file smart_tool_select-0.1.0-py3-none-any.whl.
File metadata
- Download URL: smart_tool_select-0.1.0-py3-none-any.whl
- Upload date:
- Size: 83.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02452248181e7ec6068a99ee8c71a43e4ef74bacb09828b83bc6ac917806920b
|
|
| MD5 |
7854d79d6ef1cb7cfa132a844b187097
|
|
| BLAKE2b-256 |
8c4527ed7ac4eb7bbd1cba116a85a20208c0cb16dbb88a4292f96cb66b59c75e
|