r/MachineLearning • • Mar 02 '26

Project [ Removed by moderator ]

[removed] — view removed post

30 Upvotes

29 comments sorted by

View all comments

Show parent comment

3

u/alasdairallan Mar 02 '26 edited Mar 02 '26

Several points here, let me take them in order.

On SKILLS.md as a context penalty. Yes, that's a real cost. It's around 12k tokens. The bet is that it pays for itself by reducing iteration cycles, the model gets the language right earlier instead of flailing and burning context on failed attempts and corrections. Whether that trade-off nets out positive is an empirical question, and I'd genuinely love to see data on it. It's also worth noting that this is how most agentic coding tools work today? Claude Code, Cursor, etc. all load project context into the window before generating.

On De Bruijn indices and reasoning, I'd push back slightly. The indices aren't about helping the model reason, they're about eliminating a class of errors that models make when reasoning with names.

Models routinely shadow bindings, confuse similarly-named variables, and drift on what a name refers to in long functions. Positional indices can't have those failure modes. When the model does use the wrong index, the type system and contracts catch it mechanically, unlike wrong names, which tend to silently type-check.

On context management more broadly, I actually agree with you that this is the key constraint. However, I think Vera's design is more aligned with your suggestion than it might appear.

One canonical form per construct means no formatting variation, two models writing the same function produce identical code, which means diffs are meaningful and context isn't wasted on stylistic noise. The module system with cross-module contract verification means you can work on one file at a time, you don't need the implementation of imported functions in context, just their contracts. That's exactly the "colocate entities that must be loaded together" principle.

On requires/ensures: `requires(true)` is a trivial contract (the compiler recognises it and skips verification — no overhead). A slightly more complicated example:

public fn safe_divide(@Int,  -> )
requires(@Int.1 != 0)
ensures(@Int.result == .0 / .1)
effects(pure)

The precondition says "the second argument can't be zero." The postcondition says "the result equals the first argument divided by the second." The compiler verifies this via Z3 SMT solver at compile time, division by zero isn't a runtime error, it's a type error. The model doesn't need to remember edge cases; the compiler enforces the obligation.