Knowledge Base Signal
Overview
kb binds routing signals to the output of a named knowledge base instance.
Define these bindings under routing.signals.kb.
Use it for an embedding-backed knowledge base that is loaded at Router startup and reused across several routes.
Key Advantages
- Reuses one exemplar set across several routes.
- Keeps labels, groups, and numeric metrics explicit instead of relying on magic runtime names.
- Supports both winner-style and threshold-style signal bindings.
- Lets projections consume continuous knowledge base metrics without turning signals into a scripting surface.
What Problem Does It Solve?
Some routing policies depend on a curated exemplar set rather than a single keyword or embedding candidate list. One knowledge base can classify requests into privacy, safety, emotion, or preference labels, while the routing config exposes only the labels or groups that decisions need.
kb keeps that split explicit:
global.model_catalog.kbs[]owns the reusable knowledge base packagerouting.signals.kb[]binds specific labels or groups into named routing signalsrouting.projectionscan consume knowledge base metrics such asbest_score,best_matched_score, or configured group margins
When to Use
Use kb when:
- requests must be classified against a curated exemplar set
- one startup-loaded knowledge base result should feed several routes
- you want stable route-level groups without duplicating exemplars
- you need explicit bindings instead of implicit signal names