Release v0.1.0.dev2
Pre-release
Pre-release
There are many breaking changes as we move towards v0.1.0 and plenty more features and optimizations to be excited for!
RouteLayer
(s) are now abstracted intosemantic_router.routers.base.BaseRouter
, meaningRouteLayer
is nowSemanticRouter
and to import we dofrom semantic_router.routers import SemanticRouter
. ForHybridRouteLayer
we now usefrom semantic_router.routers import HybridRouter
.- "Routers" have been refactored extensively,
HybridRouter
is now closer to parity withRouteLayer
(ie allowing syncing, better route management, etc) and integrates with the various encoders and indexes with more stability. There's still some more to come here though. - Sparse encoders have been refactored extensively,
TfidfEncoder
andBM25Encoder
now mostly share the same methods, and most importantly align in inputs/outputs and the main methods we'd be using. Inheritance of these classes has been organized better also. Yet there's still more to do. - Sparse embedding methods and transformations have been optimized, this also introduces a
SparseEmbedding
object which is just an organized numpy array with some useful methods attached. This is the first step towards more efficient use of numpy across the library. Again, there's still plenty more to do. - The
HybridRouter
was initially both an index and a router, which obviously caused issues when trying to standardize across the indexes and encoders. So this has been broken down to create theLocalHybridIndex
. The methods and transformations from the old router have also been optimized. - We have added
AurelioSparseEncoder
to the library, which integrates with our Platform BM25 service - Better use of inheritance for all indexes
- Better alignment of the
PostgresIndex
with our standard indexes, also resolved difficult installation dependency of the library.- Same for
QdrantIndex
, but only very minor tweaks were required here
- Same for
- New hybrid router example
- various other things, PR changes are here
What's Changed
- feat: abstract layers by @jamescalam in #465
Full Changelog: v0.1.0.dev1...v0.1.0.dev2