Partitions
Overview
recipes[].projections.partitions coordinates competing domain signals and keeps one winner.
What Problem Does It Solve?
Without partitions, a request can match several nearby domains at once. That is often undesirable for routing:
- a request should usually have one main domain winner, not four partially matched domains
- repeated route rules become harder to reason about when every decision has to defend against overlapping matches
Partitions solve that by coordinating the detector results after signal extraction but before decision evaluation.
How Partitions Behave at Runtime
Partitions follow these rules:
- partitions only accept
domainmembers defaultis required and must also appear inmembers- a decision or projection that reads any member makes the runtime evaluate every member, so the winner does not depend on which members decisions read
- if several members matched, the runtime keeps one winner
- if no member matched, the runtime synthesizes the
defaultmember into the matched set - if no member matched and a member's signal failed, the runtime does not synthesize the
defaultand marks thedefaultmember failed too: decisions that read the failed member or thedefaultresolve through theiron_unknownpolicy
Supported semantics:
exclusive: keep the highest-confidence winner as-issoftmax_exclusive: keep the same winner, but renormalize contender confidences with softmax usingtemperature
Two practical consequences:
- decisions still reference the winning member as
type: domain - decisions do not reference the partition name itself
So partitions are not "named projection outputs" in the same sense as mappings. They are coordination over existing signal names.
Configuration
recipes:
- name: default
projections:
partitions:
- name: balance_domain_partition
semantics: softmax_exclusive
temperature: 0.10
members: [law, business, health, history, other]
default: other
DSL
PROJECTION partition balance_domain_partition {
semantics: "softmax_exclusive"
temperature: 0.10
members: ["law", "business", "health", "history", "other"]
default: "other"
}
Config Fields
| Field | Meaning |
|---|---|
name | partition identifier for config and DSL |
semantics | winner-selection mode: exclusive or softmax_exclusive |
temperature | only meaningful for softmax_exclusive; lower values make the winner more decisive |
members | existing domain signal names to coordinate |
default | fallback member synthesized when every member was evaluated and none matched |
When to Use
Use partitions when:
- one request should have one dominant domain before routing
- you want downstream decisions to stay simple and read the winning raw signal directly
When Not to Use
Do not use partitions when:
- multiple members should remain independently visible to decisions
- the group mixes unrelated concepts that should not compete with each other
- the competing lanes are intents rather than subject areas; one
systemonechoicequestion chooses one of them - you need a reusable named tier like
balance_reasoning; that belongs in a mapping, not a partition
Partitions ask no question of their own; they coordinate the results of their
member signals, which all run once a decision reads any of them. A configured default is a routing fallback, not evidence
that the default actually matched. See a complete example in
config/config.yaml.