aurelio-labs/semantic-router
Superfast AI decision making and intelligent processing of multi-modal data.
Build with Backblaze B2
SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.
Loading star history...
Where it stands
Rank, growth pace and release cadence relative to everything GStars tracks.
Ranks #20 among AI repositories tracked this week, and #28 over the last 30 days; #162 of 2,531 repositories GStars tracks this week (top 6%).
5 releases in the last 90 days, the latest today, with 60 contributors on GitHub.
Gained 21% fewer stars in the last 90 days than in the 90 days before.
Use Cases & Benefits
- Provides a superfast semantic decision-making layer for routing requests in large language models and AI agents using vector space embeddings.
- Enables rapid, context-aware routing decisions without waiting for slow LLM generations, improving responsiveness and efficiency.
- Use for building chatbots that dynamically switch conversation topics based on semantic understanding of user input.
- Use for integrating multi-modal data processing to route images and text intelligently in AI workflows.
- Use for optimizing AI agent tool usage by routing requests to appropriate functions or APIs based on semantic similarity.
Should you depend on it?
License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.
License
MIT
Permissive: commercial use, modification and redistribution are allowed with attribution.
Community files
- README: present
- Contributing guide: present
Watch-outs
No watch-outs from GStars' checks.
General guidance from repository metadata, not legal advice. How we score
From the README
Semantic Router is a superfast decision-making layer for your LLMs and agents. Rather than waiting for slow LLM generations to make tool-use decisions, we use the magic of semantic vector space to make those decisions — routing our requests using semantic meaning.
To get started with semantic-router we install it like so:
❗️ If wanting to use a fully local version of semantic router you can use
HuggingFaceEncoderandLlamaCppLLM(pip install -qU "semantic-router[local]", see here). To use theHybridRouteLayeryou mustpip install -qU "semantic-router[hybrid]".We begin by defining a set of
Routeobjects. These are the decision paths that the semantic router can decide to use, let's try two simple routes for now — one for talk on politics and another for chitchat:We have our routes ready, now we initialize an embedding / encoder model. We currently support a
CohereEncoderandOpenAIEncoder— more encoders will be added soon. To initialize them we do:With our
routesandencoderdefined we now create aRouteLayer. The route layer handles our semantic decision making.We can now use our route layer to make super fast decisions based on user queries. Let's try with two queries that should trigger our route decisions:
We get both decisions correct! Now lets try sending an unrelated query:
In this case, no decision could be made as we had no matches — so our route layer returned
None!
Daily snapshots
Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots
Forks
381+25
Open issues
144+56
Compared with peers in AI
Fastest-growing repositories GStars tracks in this cohort for the week of Oct 18, by 7-day star growth
| Repository | Stars | +7d | Health | Last release |
|---|---|---|---|---|
| storytold/artcraft | 35.2K | +8.1K | 75 | 25 days ago |
| heygen-com/hyperframes | 69.2K | +5.7K | 45 | today |
| Comfy-Org/ComfyUI | 141.5K | +3.9K | 60 | 2 days ago |
| ifixai-ai/iFixAi | 30.7K | +3.3K | 75 | 5 days ago |
| harry0703/MoneyPrinterTurbo | 133.8K | +3.1K | 75 | today |
| aurelio-labs/semantic-router | 4.0K | +0 | 75 | today |
| Category median | 69.2K | +3.9K | 75 | — |
Discover Repositories
Search across tracked repositories by name or description