Aurelio Docs
Client Referencerouters

semantic_router.routers.compose

compose routers: fall through a chain, or merge several opinions into one.

Chain Objects

class Chain(BaseRouter)

try routers in order; the first whose best confidence clears its bar answers.

Matched utterances, when asked for, are those of the router that answered.

Merge Objects

class Merge(BaseRouter)

ask every router at once and take a weighted mean of their confidences per route.

Matched utterances, when asked for, are every router's that has them, in router order. Each keeps its own router's raw score.

On this page