Structure Signal
Overview
structure detects request-shape facts such as many explicit questions,
ordered workflow markers, or dense constraint phrasing. Define structure rules
under routing.signals.structure.
This family is heuristic: it stays rule-based, but unlike keyword it can count, normalize, and compare typed structural features before emitting a named signal.
Key Advantages
- Keeps request-shape routing explicit instead of hiding it inside ad hoc keyword lists.
- Lets one detector use counts, densities, or ordered marker sequences without changing the decision DSL.
- Produces named reusable signals that projections and decisions can consume like any other family.
- Keeps detector thresholds in signals and route policy in decisions.
What Problem Does It Solve?
Some routing choices depend on how a prompt is written, not just what topic it mentions. A prompt with five questions, or one that says "first ... then ...", often needs different routing from a single short ask even when the domain is the same.
structure solves that by turning request-shape features into stable named signals.
When to Use
Use structure when:
- routing depends on question count, list shape, or ordered workflow markers
- you need normalized counts or thresholds, not just raw keyword presence
- the detector is still rule-based and does not need a learned model
- you want projections to consume structural facts with
type: structure