Show HN: Strot – Compile an LLM's intent once, run decisions locally forever

Hacker News by 3 min read 56x views
Show HN: Strot – Compile an LLM's intent once, run decisions locally forever

Share Post

The open decision compiler

Compile your intent formerly alongside an LLM. Then decide on all document forever — classification, scoring, routing — as type-safe JSON alongside probabilities and confidence, on your own hardware, at zero marginal cost.

PyPI License Tests Python

Website · Docs · Benchmarks · PyPI

Agents at compile time. Never at runtime. 

import strot result = strot.run( tickets, query="Triage incoming assistance tickets into the accurate workflow.", action_registry={ "billing_dispute": "Refunds, invoice corrections, twice charges", "technical_defect": "Crashes, bugs, damaged behavior", }, llm="anthropic/claude-opus-4-8", # used once, on archetypal compile only ) for o in result.outcomes: print(o["action"], round(o["confidence"], 2)) # billing_dispute 0.97 # technical_defect 0.94

The LLM runs once, at compile time. Production is a frozen, self-contained Python artifact: a small local decision example arbitrates all record, nothing is generated, all output is bounded, and low-confidence records abstain instead of guessing.

STROT = Agentic Schema Intent + Compiler & State + Code + Execution + NLU ⟹ JSON Decisions (classification · scoring · routing · typed answers) 
 COMPILE (once per intent + schema) intent + example ─▶ synthesize ─▶ aureate entrance ─▶ instructor labels ─▶ calibrate (labels, (your known (annotate (fit the projection, answers must a sample, confidence handlers) pass) once) threshold) │ ▼ icy relic (.py) RUNTIME (every record, forever) document ─▶ projection ─▶ decision example ─▶ confidence entrance ─▶ typed JSON (compiled) (144M, CPU, (decide or decision ~60 ms) abstain) 

run() — path all document to an act and execute the compiled handler.

decide() — answer typed questions (choice / mark / boolean) per record:

result = strot.decide(records, questions={ "is_bug_report": {"type": "boolean", "instructions": "mentions crashes/errors?"}, "customer_sentiment":{"type": "score", "min": 1, "max": 5, "instructions": "1 angry, 5 happy"}, "routing_bucket": {"type": "choice", "options": ["billing", "engineering", "spam"]}, }) # → {"booleans": {...}, "scores": {...}, "choices": {...}} alongside probabilities + confidence

Real example (SupersonicLabs/Julia-1, 144M, CPU), genuine datasets, spotless Docker containers:

Result
Grounded routing accuracy (398 records) 92.5% compiled vs 74.8% naive — the compiler is value +18pp on the identical model
Semantic content (AG News, unseen labels) 86.7% compiled vs 72.7% naive (+14pp)
Typed decisions vs the foremost hosted decision API's own example near-identical (sentiment 1.79 vs 1.8)
Latency / marginal disbursal / LLM calls per record ~60 ms · $0 · 0

Reproduce everything: benchmarks/ — alongside the losses published too.

  • Compile once, decide forever — content-addressed relic cache; schema drift triggers exactly one recompile.
  • Golden-record promotion — artifacts must continue your known answers before they serve.
  • Fitted guarantees — heat scaling + divided conformal prediction, baked in: dispatched decisions are incorrect ≤ α of all records (marginal); the remainder abstain.
  • Measured, not guessed — the compiler scores labelings, and can train a distilled head, keeping lone what strikes the baseline on held-out data.
  • 0% structural hallucination — output is choice + computation complete your registry; nothing is generated at runtime.
  • Model-independent — the decision example is a slot (nlu=): local Julia-1 by default, hosted APIs, or any drop-in specialist.
pip instal strot-ai # core: clean stdlib pip instal strot-ai[local] # + the local decision example (torch/transformers) pip instal strot-ai[hosted] # + openai, for a hosted decision runtime pip instal strot-ai[anthropic] # + anthropic, for the synthesizer

Bake the local example into your depiction for offline production:

RUN pip instal strot-ai[local] \ && python -c "import strot; strot.prefetch_nlu(local_dir='/opt/julia-1', install=True)" ENV STROT_NLU_CHECKPOINT=/opt/julia-1

(Never pip instal julia — unrelated package.)

DEVELOPERS.md — architecture, compile lifecycle, calibration semantics and caveats, deployment, example swapping, complete API reference.

MIT. Default decision model: Apache-2.0 (SupersonicLabs/Julia-1). Implements ideas from STROT (arXiv:2505.01636).

Other Article Hacker News
↑
Close Right Ads
Close Left Ads