GMT Router
Overview
gmtrouter is a personalized selection algorithm that uses a heterogeneous graph neural network (GNN) to learn user preferences from multi-turn interactions.
It aligns to config/fragments/algorithm/selection/gmtrouter.yaml.
Paper: GMTRouter: Personalized LLM Router over Multi-turn User Interactions
Key Advantages
- Supports per-user or per-tenant personalization based on interaction history.
- Models user-LLM interactions as a heterogeneous graph with 5 node types.
- Uses HGT (Heterogeneous Graph Transformer) message passing for preference learning.
- Captures rich relational dependencies between users and LLMs.
- Learns from few-shot interaction data via inductive training.
Algorithm Principle
GMTRouter models interactions as a heterogeneous graph with 5 node types:
| Node Type | Description | Embedding |
|---|---|---|
| User | Individual users | Zero-initialized, learned via message passing |
| LLM | Model capabilities | PLM-encoded from model descriptions |
| Query | User queries | PLM-encoded from query text |
| Response | Model responses | PLM-encoded from response text |
| Turn | Virtual aggregation nodes | Per-round interaction summary |
The graph uses HGT (Heterogeneous Graph Transformer) layers for message passing: