recommendation guardrails
A post-model safety layer that rounds targets to real gym increments, clamps movement around recent anchor sets, widens uncertainty when confidence is low, and keeps sparse-history outputs conservative.
Why guardrails exist
The predictor does not send its raw output straight into the logger. logit adds a second layer whose job is not to be clever, but to keep recommendations within a believable working range for the next session.
That distinction matters. The predictor estimates where the anchor set should land. The guardrails decide how aggressively that estimate is allowed to move once it is translated into a real plate-loaded recommendation for today.
1. Gym-increment rounding
Every weighted recommendation is snapped to the increment the user can actually load in the gym. In logit that increment is five pounds in pound mode and 2.5 kilograms in kilogram mode.
Internally, stored loads remain pound-based. The product converts to the active display unit, rounds there, and then converts back to stored pounds so the displayed target and persisted value stay aligned.
2. Anchor clamp around recent reality
After rounding, the anchor recommendation is still not free to drift arbitrarily. Upward movement is limited to one increment above the most recent anchor. Downward movement gets a little more room because under-shooting is safer than over-shooting, especially after a layoff.
3. Later-set shape constraints
Later visible sets are rebuilt from the anchor prediction using historical median backoff ratios and rep deltas. If a stable historical profile is missing, logit uses a conservative fallback structure instead of pretending the later sets are known.
| Later-set fallback | Weight ratio | Rep delta |
|---|---|---|
| Set 2 | 0.97 | 0 |
| Set 3 | 0.94 | -1 |
| Set 4 | 0.92 | -2 |
| Set 5+ | Steps down to a floor of 0.88 | Subtracts one more rep per set |
4. Confidence-linked uncertainty bands
The surfaced recommendation is not just a single number. logit also shows a rep range whose width depends on the confidence label. Low confidence gets a wider band; medium and high confidence get a tighter one.
5. Conservative ceilings for sparse and bodyweight history
Some limits sit above the numeric score itself. A prediction based on only one matching session is always labeled low confidence, even if the raw score would have landed higher. Bodyweight-only predictions also cannot rise above medium confidence.
These rules are deliberate product choices. Sparse history can still be useful, but the interface should not dress a thin sample in high-certainty language.