KNN (K-Nearest Neighbors)
Overview
knn chooses a candidate from the models that performed well on the most
similar recorded requests.
Implementation: Rust via Linfa (linfa-nn) for high-performance nearest-neighbor search.
Key Advantages
- Interpretable: routing decisions can be traced back to similar historical examples.
- No online training step; the Router loads an artifact built from historical examples.
- Works well when similar prompts should choose similar models.
- Voting gives 90% of each neighbor's weight to outcome quality and 10% to relative speed.