Views
No views yet
score = 0.5 · cosine(task_tfidf, desc_tfidf) + 0.5 · cosine(task_enc, desc_enc)sentence-transformers/all-MiniLM-L6-v2 (22M params,
English). Encoder is lazy-loaded on the first route() call. ~35 MB
of centroids on disk.pip install git+https://github.com/dalek-ai/agent-tool-router.gitpip install "agent-tool-router[encoder] @ git+https://github.com/dalek-ai/agent-tool-router.git"1from agent_tool_router import Router
2r = Router.from_pretrained("baseline-v1-desc-hybrid")
3r.route("cancel my order and refund the credit", k=3)
4# ['cancel_pending_order', 'cancel_order', 'refundOrder']history= and the top-200 retrieval candidates are
reranked with a learned prior:1r.route(
2 "I want to add a checked bag to my reservation",
3 k=3,
4 history=["update_reservation_flights"],
5)
6# ['update_reservation_baggages', 'update_reservation_passengers', 'cancel_reservation']| Setup | top-1 | top-3 | top-5 |
|---|---|---|---|
| Retrieval-only | 13.8% | 32.7% | 38.8% |
| Markov-1 rerank top-50 (α=0.4) | 34.6% | 48.0% | 50.5% |
| Markov-1 rerank top-200 (α=0.1) ⬅ default ≥ 0.3.0 | 39.0% | 54.9% | 57.7% |
history is omitted or empty. Override with
markov_alpha=0.0 (prior-only) or 1.0 (retrieval-only), and the bucket
width via markov_rerank_n (default 200).| source | n calls | tfidf | encoder | hybrid α=0.5 |
|---|---|---|---|---|
| Hermes function-calling-v1 | 4 376 | 74.3% | 60.7% | 74.9% |
| ToolACE | 17 169 | 52.4% | 54.8% | 62.8% |
| tau-bench | 8 880 | 3.2% | 6.1% | 9.9% |
| overall | 30 425 | 41.2% | 41.4% | 49.1% |
baseline-v1-desc-hybrid-multilingual.