SLM-128 (LDI3-01): complete structured objectives — ambiguous/unobserved mass, locality tethers, role weighting#366
Conversation
…iteria (LDI3-01) Reconcile the LDI3-01 objective library on main (from #359) with the acceptance criteria it did not yet cover, taking the remaining features from the parallel SLM-128 implementation. All additions are backward compatible (new config fields default off, new params default None), so #359's existing behavior and its tests are unchanged. - Ambiguous/unobserved actions: `_prepare` now extracts them from the ObjectiveView, validates them inside the legal set, enforces disjoint good/bad/ambiguous/unobserved partitions, and reports their legal mass separately (the issue requires good/bad/ambiguous/unobserved mass be reported separately and never mislabeled). - Reference/locality tethers: add `non_target_tether` / `target_tether` / `target_grace` config plus `_locality_tether`, composed onto every objective in `structured_decision_loss` and metered independently of the barrier so the target anchor never double-counts. - Semantic role weighting: wire the previously-dead `default_role_weight` and add an optional `good_role_weights` so structural tokens can be down-weighted in the barrier anchor; report `mean_role_weight`. Adds 3 tests (partition-mass reporting + legal validation, tether composition + separate metering + reference requirement, role-weight down-weighting + honored default). Full tests/test_harnesses/preference green (186), ruff + repo_policy clean. No model update, no quality claim. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5Fy8PnMTV54p675y9T3B8
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughStructured preference objectives now preserve ambiguous and unobserved legal partitions in metrics, support per-action barrier role weights, and optionally compose target or non-target locality tether losses against reference logits. ChangesStructured objective extensions
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Completes the LDI3-01 structured-objective library already on
main(from #359) with the acceptance criteria it did not yet cover, reconciling in the remaining features from the parallel SLM-128 work (my closed #355). All additions are backward compatible — new config fields default off, new params defaultNone— so #359's behavior and its tests are unchanged (14 existing + 3 new = 17 green; fulltests/test_harnesses/preference= 186 green).This is the "merge the best results / resolve conflicts" reconciliation: rather than a competing duplicate, it takes the best of both implementations into the one on
main.What #359 was missing (now added)
_prepareextracts them from theObjectiveView, validates them inside the legal set, enforces disjoint good/bad/ambiguous/unobserved partitions, and reports their legal mass separately (the issue requires the four masses reported separately and never mislabeled). LDI3-01: structured local-preference objectives (SLM-128) #359 previously ignored these partitions.non_target_tether/target_tether/target_graceconfig +_locality_tether, composed onto every objective instructured_decision_lossand metered independently of the barrier so the target anchor never double-counts (an explicit acceptance criterion LDI3-01: structured local-preference objectives (SLM-128) #359 lacked entirely).default_role_weightconfig field and adds an optionalgood_role_weightsso structural tokens can be down-weighted in the barrier anchor; reportsmean_role_weight.Tests
3 added: partition-mass reporting + legal-set validation; tether composition + separate metering + reference requirement; role-weight down-weighting + honored
default_role_weight.ruff+python -m scripts.repo_policyclean.Honesty
Additive completion only. No model update, no matrix run, no quality claim; existing objective math untouched.
🤖 Generated with Claude Code
https://claude.ai/code/session_01U5Fy8PnMTV54p675y9T3B8
Generated by Claude Code
Summary by CodeRabbit
New Features
Validation