Deterministic derived values
Language models should interpret evidence, not perform authoritative arithmetic. Derived values provide a serializable calculation layer modeled on the shared-state expression DSL.eval, or lambda. This is invalid:
WorkflowExpression
objects.
Expression serialization
A mean expression resembles:Supported expression operations
The current evaluator supports:float().
all_equal() compares canonical serialized values, so it also works for lists
and mappings such as complete rankings.
choose(condition, then, otherwise) evaluates only the selected branch. This
short-circuit behavior permits settlement expressions to reference answers on
optional branches: outputs from correctly skipped branches are never requested.
Economic settlement primitives
Workflow expressions can consume a single answer or identity-preserving submissions. This supports authoritative arithmetic without asking a model to calculate payoffs:action_codes retains the
legacy first-character convention for serialized workflows created before this
option was introduced.
closest_to(question, target, ties="all") performs identity-aware ranking.
DerivedFieldRef.for_participant() projects an identity-keyed mapping into a
private recipient prompt. match(role("player"), size=2) deterministically
partitions a roster and round-trips as data.
Collections also expose serializable reductions:
nth_largest() and nth_smallest() use one-based ranks. During fan-out, an
order statistic with too few responses is treated as not yet available, allowing
remaining participants to answer before dependent work is rendered.
Use a symbolic per-submission binding to apply one expression to every response
while retaining participant identity:
map_submissions and submission_value
operators; it does not contain a Python function. Evaluation returns a mapping
from participant ID to result, which can be privately projected with
payoffs.field("by_participant").for_participant(). A free own.value outside
its map is rejected during authoring.
Mapped expressions support the same arithmetic and comparisons as other
workflow expressions, including symbolic absolute value:
join_submissions, joined_value, and map_joined_submissions.
Static tables can select values or expressions without raw Python:
default= is supplied.
Named experimental constants belong in workflow metadata rather than being
repeated throughout settlement expressions:
