whetstone_RSA

Tiny Models For Bounded NLP Decisions

Turning messy user requests into deterministic tool calls

A common shape

Users type messy things.

Software needs clean actions.

The gap
  • fuzzy input
  • bounded output
  • deterministic execution
Today's options
cheap
regex
inspectable
rules
flexible
LLM prompt
Regex is cheap
  • fast
  • local
  • inspectable
Regex is also annoying
  • brittle
  • tedious
  • bad at paraphrases
LLMs feel great
  • flexible
  • natural-language friendly
  • good with paraphrases
LLMs are often overkill
  • expensive
  • heavy
  • hard to control
The missing middle
regex -> RSA -> LLM
What RSA is

A contract layer for bounded semantic decisions.

What RSA takes
  • messy input
  • bounded schema
  • optional context
What RSA returns
  • action
  • slots
  • confidence
  • abstain or escalate
The core pattern
1
Natural language
2
Semantic interpretation
3
Bounded contract
4
Deterministic software
Example query

show me the failed builds from yesterday

Example contract
action:     search_builds
status:     failed
date:       yesterday
confidence: 0.93
Example execution
  • run the query
  • render the results
  • log the action
Why this can stay tiny

The output is bounded.

First real target

whetstone_DSL

AST-first codegen pipeline

The initial gate

prereq_op_selector

Decides prerequisite operations before a taskitem executes.

Gate input
  • title
  • requirements
  • acceptance criteria
  • constraints
Gate output
  • needs_resolve_dependencies
  • needs_architect_review
  • needs_validate_intake
Source corpus
1000pipeline runs

JSON artifacts with real decision logs

Extraction

extract_gate_rows.py

run artifacts -> per-gate rows

Clean rows
1321total rows
24schema drift rejected
1297clean rows
The surprise

needs_validate_intake

was always true: 1297 / 1297

Gate decomposition
Gate 1
resolve dependencies
Gate 2
architect review
Tiny specialists
213Kparameters
800KBon disk

one specialist per gate

First results
resolve dependencies69.4%
architect review75.0%
Honest diagnosis

1297 rows

but only about 17 unique text patterns

The fix
  • architecture surface
  • cross-component deps
  • security sensitivity
  • uncertainty score
Model sizing

Match model size to gate entropy.

What makes a gate hard?
  • more labels
  • class imbalance
  • wider context
  • fuzzy boundaries
  • slot interactions
Runtime scaffold
  • gate definitions
  • evidence
  • diagnosis
  • probes
Careful claim

RSA does not replace all LLM reasoning.

RSA replaces bounded semantic decisions.

Closing
Fuzzy input in.
Typed contract out.
Deterministic software after that.
Click / arrows: navigate · N: notes · F: fullscreen