Published
MF Router
Matrix Factorization based routing — predicts best LLM by decomposing the query-LLM interaction matrix.
Overview
The MF Router applies matrix factorization techniques to historical query-LLM performance data, uncovering latent factors that predict which model will perform best for a given query.
How It Works
By decomposing a sparse matrix of query-LLM performance scores into lower-dimensional latent factor matrices, the router can predict performance for unseen query-model pairs. This is similar to collaborative filtering approaches used in recommendation systems.
Strategy
Decomposes query-LLM interaction matrix to predict best model.
API Endpoint
autoroute:mfrouter
Use Cases
- When you have historical query-LLM performance data
- Cold-start scenarios where you need to generalize from limited data
- Building adaptive routing systems that improve over time
Best Practices
Cold Start
Incorporate query embedding features as side information to handle new queries with no historical data, similar to hybrid recommender systems.
Related Models
- Elo Router — For dynamic environments with changing performance
- Personalized Router — When user-specific preferences matter