Skip to content
System One

Composite scoring

Composite scoring is one of TypeSafe's documented patterns, described as "Combine several dimensions of analysis into a single score." You ask a separate question about each dimension, then your own code weights and combines the answers. The model never picks the weights, and the arithmetic stays deterministic.

TypeSafe’s build guidance separates the two halves. Ask many independent parallel questions about the same state, then “compose answers with deterministic rules or code-controlled weights”, keeping deterministic work in code. That split matters here, because arithmetic and counting are on jev-1.13’s published list of weak spots. You do not want the model doing the summing.

A lead-scoring example. Ask four Score questions against the same state, each with its own ordered levels: budget fit, urgency, decision-making authority, technical fit. Each returns a probability-weighted mean of the level numbers, the way the docs’ bug-severity example returns 1.30 from probabilities of 0.0, 0.70 and 0.30 over levels 0, 1 and 2. Your code multiplies each by a weight you chose and adds them up.

The weights are yours to tune and to audit. When a deal is misrouted you can point at which number moved, and you can change the weighting without touching the model at all. Confidence comes back per question, so a dimension that scored below your floor can be dropped or sent for review before the combination step.

See the composite lead scoring recipe and the score primitive.

Related terms