How Masar Works
Masar is neurosymbolic. A neural model proposes typed choices; a symbolic intermediate representation, a deterministic compiler, and a dual-verifier loop build the program and prove it correct. The guarantees come from the system around the model, not from the model itself.
The neurosymbolic loop
Orb is the symbolic core. Every system is an Orb program — a set of
orbitals, where an orbital = Entity + Traits + Pages. Each trait is a state
machine running a closed circuit: Event → Guard → Transition → Effects → UI
response → back to Event. Orb has a formal type system and is the single
source of truth every stage reads.
The model is only a proposer. Instead of emitting free-form code, the model chooses among declared, pre-verified behaviors and their typed parameters. Almadar maintains a library of behaviors that compose hierarchically (atoms → molecules → organisms); using one is a call site, and a small typed override surface (entity bindings, events, effects, configuration) rebinds it to a domain without changing its verified state machine. New capability comes from composing or extending behaviors — never from arbitrary code.
The compiler and verifiers decide correctness. A deterministic compiler resolves the composed behaviors into a flat program, validates it to zero errors and zero warnings, and generates the running system. Two independent verifiers gate every output: one checks the generated-code path, the other executes the program (a state walk plus visual checks). Because the agent can only invoke behaviors that exist and survive both verifiers, its action space is bounded — and the whole loop can run locally on a 1.5B model.
This framing follows the LLM-Modulo view of neurosymbolic systems — a neural generator paired with sound external verifiers (Kambhampati et al., 2024, arXiv:2402.01817).
The paradigms we borrow from
Masar is neurosymbolic at its core, but it draws on several research lines. Here is an honest map of what each contributes and where it actually sits:
| Paradigm | What it does for us | Status |
|---|---|---|
| Neurosymbolic / LLM-Modulo | Neural proposer + symbolic IR, compiler, and verifier loop | Core, production |
| Embedding retrieval routing | Pick the right behavior by cosine similarity of intent vs. behavior descriptions — no training, no drift | Production |
| Knowledge distillation (frontier → 1.5B) | Replace a cloud frontier model with a self-hosted small adapter for the narrow authoring decisions | Production path |
| Execution-grounded fine-tuning | Train on programs filtered by the real compiler/factory (dispatch + validate green), not on labels | Production path — see Fine-tuning |
| Self-supervised / energy-based learning (VICReg, SIGReg) | The objective family behind our world-model experiments | Research |
| World models / JEPA | Predict build outcomes before dispatch (predict-before-act) | Parked / gated — see The JEPA bet |
| GFlowNets | Step-by-step structural construction proportional to a reward | Experimental — largely superseded by the deterministic factory layer, which guarantees structure by construction |
| Graph learning (GNN / R-GAT) | Read wiring/topology when the behavior set is fixed | Research — built and validated on planted tests, held in reserve |
| Typed-IR-constrained decoding | Mask invalid tokens so generation stays inside the Orb grammar | Research / partial |
The throughline: leverage comes from the typed representation and the verifiers, with the neural model kept small and bounded. Everything above is a way to make that proposer cheaper, more accurate, or more local — not a way to hand it more freedom.