ruvector-router
Route embedding vectors to named intents with native RuVector HNSW search and an explicit cosine similarity threshold. Supply your own embeddings; the router makes no network requests.
Getting started
python -m pip install ruvector-router==0.2.0
from ruvector_router import SemanticRouter
router = SemanticRouter(2, threshold=0.8)
router.add('support', [1, 0])
router.add('sales', [0, 1])
assert router.route([1, 0])[0].name == 'support'
router.add('support', [-1, 0]) # Replace an existing route
assert router.route([1, 0]) == []
assert router.remove('support')
assert not router.remove('support')
Architecture and scope
Caller embeddings → finite nonzero vector validation → normalization → native HNSW nearest routes → cosine threshold → typed RouteMatch values.
One representative embedding per route. HNSW is approximate; thresholds are inclusive and do not guarantee intent classification quality. This is a Python semantic policy over the native core index, not a binding to the separate neural router or an embedding model. Mutation rebuilds the index before committing, ensuring replacements and deletions cannot leave stale routes, at a cost proportional to the number of routes. Designed for small intent catalogs rather than high frequency writes to large indexes. Ties among retrieved results sort by name.
Python 3.10 or later; runtime ruvector==0.1.3. Portfolio documentation.
Metadata
Release files for ruvector-router 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ruvector_router-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / ruvector_router-0.2.0-py3-none-any.whl
| Download URL | ruvector_router-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7066ec5b35e3cfb1f5dbb902b87bed18aa85ad10b76f085137e823b5ac0e4938
|
|
BLAKE2b-256 checksum How to use checksums |
bb2a0c16179ed3bfd0116b82fa8ae8f88e0393b25962907e47cae3739d9bc1c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for ruvector-router 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.