Skip to main content
Version: Latest (main)

Projections

Overview​

Projections sit between signal extraction and decision matching. They resolve competition among signals, combine several signals into a score, and turn that score into named outputs a decision can reference.

The route pipeline is:

  1. recipes[].signals extracts facts.
  2. recipes[].projections coordinates or derives facts.
  3. recipes[].decisions matches policy and chooses candidate models.

Key Advantages​

  • Reuses one coordination or threshold policy across several decisions.
  • Keeps numeric aggregation out of boolean decision trees.
  • Preserves named, explainable outputs for replay and debugging.

What Problem Does It Solve?​

Individual signals are intentionally narrow. Real routing policy often needs one winner from a competing domain group or one reusable difficulty score from several weak indicators. Without projections, that logic is duplicated across decisions and numeric thresholds become hard to audit.

When to Use​

Use projections when:

  • only one member of a domain group should remain active
  • several signals should contribute to one continuous score
  • several decisions should share the same named threshold bands

Skip projections when one raw signal expresses the route condition clearly or when multiple matches should remain independently visible.

Projection Types​

TypeGoalDecision-visible?Guide
partitionsKeep one winner from competing domain signalsNo; decisions still reference the winning raw signalPartitions
scoresCombine signal values with weighted_sumNo; scores feed mappings or other scoresScores
mappingsConvert a score into named threshold outputsYes, through type: projectionMappings
traceExplain partition, score, and mapping results in Router ReplayOperational onlyProjection Traces

Current methods are:

  • partition semantics: exclusive and softmax_exclusive
  • score method: weighted_sum
  • mapping methods: threshold_bands (first matching output) and multi_emit (every matching output; requires at least two outputs)
  • optional mapping calibration: sigmoid_distance

Configuration​

recipes:
- name: default
signals:
domains:
- name: computing
labels: [computer science]
- name: business
context:
- name: long-context
min_tokens: 4K
max_tokens: 200K
projections:
partitions:
- name: subject-areas
semantics: exclusive
members: [computing, business]
default: computing
scores:
- name: request-difficulty
method: weighted_sum
inputs:
- type: domain
name: computing
value_source: confidence
weight: 0.5
- type: context
name: long-context
weight: 0.5
mappings:
- name: difficulty-band
source: request-difficulty
method: threshold_bands
outputs:
- name: difficulty-low
lt: 0.5
- name: difficulty-high
gte: 0.5
decisions:
- name: escalated-computing
description: Route difficult computing requests to the larger model.
priority: 150
rules:
operator: AND
conditions:
- type: projection
name: difficulty-high
modelRefs:
- model: large-model

Only mapping output names are referenced with type: projection. Decisions do not reference partition or score names directly.

The DSL exposes the same three concepts through PROJECTION partition, PROJECTION score, and PROJECTION mapping blocks. The Dashboard exposes them under Routing → Projections.

Dependencies and Limitations​

  • Projections make no additional model or storage calls; they consume signal results already computed for the request.
  • A partition default is a fallback, not evidence that its member matched.
  • Weighted sums do not automatically calibrate inputs from different signal families. Evaluate weights and mapping bands together on labeled traffic.
  • Cycles between derived scores are rejected during validation.
  • See the feedback recipe for an end-to-end example of scores and mappings, and config/config.yaml for a partition.