Architecture & Engine

Gate Layer (Heuristic Rules)

The Gate is Stage 1 of Axon's inference pipeline. It operates as a narrow allowlist and broad denylist executed synchronously in-process. Its sole purpose is to catch confidently trivial prompts and route them directly to the Fast tier with zero classification cost and zero LLM latency overhead.

The Gate Philosophy

Routing trivial requests through an LLM classifier wastes time and money. However, falsely categorizing a critical or architectural prompt as “trivial” ruins user experience.

Therefore, the Gate is designed conservatively: anything uncertain immediately escalates to the Judge layer. A prompt only passes the Gate if it meets strict, narrow allowlist criteria and triggers zero denylist vetoes.

The 5 Gate Heuristic Rules

RuleClassificationBehavior & Criterion
Rule 1: Length LimitBoundaryPrompt length must be ≤ 20 words. Longer prompts require deeper processing and escalate.
Rule 2: Scope-DenylistVeto RuleInstant disqualification. If the prompt contains any of:
entire, all, every, whole, across, throughout, system-wide, globally, everywhere, codebase
Checked first. If matched, the prompt immediately escalates to the Judge.
Rule 3: Known-Intent MatchAllowlistMust match a known simple utility pattern:
  • Typo/Grammar: typo, spelling, grammar, fix the wording
  • Rewording: reword, rephrase, rewrite this sentence
  • Unit Conversion: convert, to Celsius/Fahrenheit, to kg/lbs, X to Y
  • Translation: translate
  • Simple Lookup: what is, what does X mean, define
Rule 4: No SequencingDenylistMust not contain sequential step indicators:
first, then, after that, next, also, followed by, once done, subsequently
Rule 5: No Context / Code BlocksBoundaryPrompt must not have code blocks (```), attached file context, or multi-turn conversational history.

Evaluation Logic

The Gate evaluates these five rules with explicit priority:

  1. Check Rule 2 (Scope Denylist Veto): If any scope-denylist word is detected, the Gate immediately fails and hands the prompt over to the Judge LLM.
  2. Check Remaining Rules (1, 3, 4, 5): If Rule 2 is false, all four remaining rules must evaluate to true.
  3. Routing Outcome: If all pass, the prompt bypasses the Judge entirely and executes on the Fast tier. If any single condition fails, it escalates to the Judge.
Intentional Leakiness

Heuristic rules 3 and 4 are acknowledged to be slightly “leaky” on edge cases. This is by design: if a simple prompt fails heuristics because of phrasing, the Judge layer will still classify it as Fast or Balanced accurately. The Gate exists solely to fast-path unambiguous trivial requests.

Examples

“Fix the typo in this string”Gate Pass

≤ 20 words, no scope denylist, matches typo intent, no sequencing, no attachments.
→ Routes directly to Fast Tier (0ms overhead).

“Fix typos across the entire codebase”Gate Veto

Contains across and entire (Scope Denylist). Instant veto.
→ Escalates to Judge Layer.