What You Are Building
You want a language model whose output obeys hard constraints: stay in a defined policy space, hold a required register and level of definiteness, and never commit a reasoning step that contradicts what it has already established. And you want that to hold even when a user, a jailbreak, or the model's own drift pushes against it.
The obvious tools are a system prompt and a filter on the finished text. Both are soft. A prompt is a request the model can override; a filter runs after the model has already generated. What you are actually building here is different: a control point interposed inside the inference loop, so that every candidate step is evaluated for admissibility before it is allowed to influence the next step. In the described embodiments an inadmissible step is not emitted and then removed; it is withheld at the point of commitment. The result the disclosure describes is deterministic non-emission rather than best-effort cleanup.
This is the problem the Inference Control inventive step, disclosed in United States Patent Application 19/647,395, addresses. The sections below trace the architecture to that disclosure so you can build it.
Why the Obvious Approaches Fall Short
Three standard approaches, described accurately:
System prompts and instructions. These condition the model's probability distribution toward desired behavior. They are genuinely useful, and they operate as soft constraints: the model weighs them against everything else in context, so whether a given output honored them is determined statistically rather than structurally. The filing characterizes prompt-level governance as an instruction, and positions its own mechanism as a gate.
Post-generation filters, classifiers, and re-rankers. These evaluate completed output for safety, toxicity, or policy. They suppress a finished answer, and they run at a point where the inference engine has already advanced. The disclosure's central observation concerns that ordering. In an autoregressive model, each step conditions all subsequent steps; a commitment at step N shapes the distributions that steps N+1 onward are sampled from. Suppressing the surface text afterward acts on the text rather than on the counterfactual output that would have been produced had the step never been committed. The disclosed architecture therefore places its evaluation point before commitment, so the conditioning effect does not occur in the first place.
Constrained decoding. This masks syntactically invalid tokens from the distribution before sampling, which is effective for enforcing output format (valid JSON, syntactically correct code). The filing distinguishes its approach from this explicitly: constrained decoding enforces structural validity of form, not semantic admissibility, and it operates on individual tokens rather than on structured semantic transitions.
What distinguishes the disclosed approach is where it looks: it evaluates the intermediate state of the inference process. A conventional engine carries that state as hidden activations (attention weights, key-value caches), which are a different kind of representation than the structured, inspectable record of intent, policy, and lineage that an external evaluator reads between steps. The architecture below organizes the intermediate state as exactly that kind of typed, inspectable structure.
The Architecture
The core move disclosed in the filing is to recharacterize inference as semantic execution rather than token generation, and to interpose a governance gate inside the loop. Every candidate step is treated as a semantic commitment that must be admitted before it can influence subsequent steps.
The governed inference loop. The inference engine proposes a candidate transition. That candidate is mapped into a structured mutation descriptor describing the semantic change it would make. The descriptor goes to an admissibility gate. Only on admission does the change update a semantic state object, which then feeds back as the context against which the next candidate is evaluated. In the described embodiments, output is produced from changes that have passed the gate.
The semantic state object. This is the structured, typed, inspectable data structure the disclosed architecture introduces. It is described as distinct from a hidden activation vector or KV cache; it lives alongside the engine and is maintained independently. The filing gives it a schema of typed fields, including: an intent field (what this inference is for, which constrains which candidates are even relevant); a context field (domain, audience, temporal and epistemic conditions); a memory field (the semantic content established by previously admitted steps, so new steps can be checked against it for contradiction, redundancy, and drift); a policy reference field (the governance constraints in force); a mutation descriptor field (the proposed change under evaluation); and a lineage field (the ordered record of admitted transitions with their descriptors and admissibility determinations). It is populated at inference initialization from the agent's governed state and the task, and updated after each admitted step.
The admissibility gate: deterministic admit / reject / decompose. This is the heart. Given the same semantic state object and the same proposed mutation, the gate returns the same determination. The filing is explicit that there is no probabilistic scoring, no soft threshold, and no confidence-weighted pass-through; it is a deterministic evaluation engine over typed fields, not a trained model. The disclosure describes four sequential stages, with a mutation admitted in the described embodiments when it passes all four:
- Policy constraint evaluation. Check the mutation against the policy reference field: content-domain restrictions, safety constraints, structural constraints, task-specific constraints. Violations are absolute and rejected. This stage runs first because it is the fastest bounded comparison.
- Mutation descriptor validation. Check the descriptor for internal consistency and consistency with current state. The disclosure describes rejecting a descriptor that presupposes content that has not been established, contradicts established content, or introduces unresolvable dependencies.
- Lineage continuity validation. Check that the mutation can be coherently appended to the existing lineage without an unexplained discontinuity, an unmotivated topic shift, or a semantic regression.
- Entropy bounds evaluation. Check the mutation against the permitted uncertainty bounds for this context. Tight bounds (high-factual-precision contexts) reject an uncertain step; wide bounds (creative or exploratory contexts) may admit it.
The three outcomes: an admitted mutation is applied and the lineage extended; a rejected mutation is discarded and the engine is told to pick another candidate or terminate; a decomposed mutation (one too coarse to judge atomically, bundling admissible and inadmissible changes) is broken into sub-mutations that are each resubmitted to the gate.
Register and definiteness as a governance input, not a post-filter. The filing discloses an output register field: a structured state governing formality, vocabulary, and precision. It is explicitly not a post-processing filter. A candidate transition whose stylistic characteristics are inconsistent with the current register (for example, highly technical vocabulary when the register indicates informal communication) receives a reduced admissibility score and participates in the gate's evaluation of that candidate. So linguistic and register constraints are enforced at the same point, and by the same mechanism, as policy constraints.
Confidence gating and structural non-emission. The substrate tracks a rolling admission rate over a window. When too many proposed transitions are being rejected, the process transitions from executing mode into a non-executing inquiry mode: instead of forcing output, it returns structured queries naming the information deficiencies, policy ambiguities, or contextual gaps that would need to be resolved before admissible inference can resume. The filing frames this as a first-class constructive result, not an error. This is where "deterministic non-emission" is realized: where the admission rate falls below the configured threshold, the described system withholds output by design rather than emitting a low-confidence answer for downstream review. As the disclosure puts it, no output survives admissibility evaluation unless it is compatible with the governing state.
How to Approach the Build
Concrete, ordered steps to implement this architecture yourself. The interface sketches below are illustrative and faithful to the disclosed structure; they are not shipping code.
Define your semantic state object schema. Start from the disclosed fields: intent, context, memory, policy reference, mutation descriptor, lineage, and (if you need it) entropy bounds and output register. Make it typed and inspectable. This object is the reference your gate evaluates against, so its fidelity determines your ceiling.
Decide your transition granularity. The filing notes a candidate transition may correspond to a single token, a multi-token phrase, or a complete reasoning step. Coarser transitions (a sentence, a tool call, a chain-of-thought step) are cheaper to gate and align better with semantic evaluation than per-token gating. Choose the level at which "semantic commitment" is meaningful for your task.
Build the mutation mapping layer. Translate each raw candidate from the engine into a structured mutation descriptor: which fields of the state object it would change, the proposed new values, and the semantic relationship to current values. This is what makes the opaque generation step inspectable.
Implement the four-stage gate as pure, deterministic functions.
# illustrative sketch, faithful to the disclosed four stages def evaluate(mutation, state): if not policy_ok(mutation, state.policy): # stage 1: absolute return REJECT if not descriptor_consistent(mutation, state): # stage 2 return REJECT_or_DECOMPOSE if not lineage_continuous(mutation, state.lineage): # stage 3 return DECOMPOSE # restore continuity via sub-steps if not within_entropy_bounds(mutation, state.context): # stage 4 return REJECT return ADMITKeep it deterministic: the same state plus the same mutation should yield the same outcome. Resist the urge to make any stage a learned classifier; the disclosed property is that the gate is a rule evaluation over typed fields, which is what gives it repeatability and auditability.
Close the loop. On ADMIT, apply the descriptor, extend lineage, and feed the updated state back as context for the next candidate. On REJECT, request an alternative candidate or terminate. On DECOMPOSE, split into sub-mutations and resubmit each.
Add the confidence gate. Maintain a rolling admission rate. Below your threshold, switch to inquiry mode and emit structured questions about what is missing, rather than forcing an answer. This is your non-emission path; treat its output as a valid result surface in your API, not an exception.
Encode register and definiteness as policy inputs. Put your required register and precision into the state object and evaluate candidates against them inside the gate, so tone and definiteness are enforced structurally rather than requested in a prompt.
Log the lineage. Because every admission carries its descriptor and determination, you get a per-step record of why each committed step was allowed. Persist it; it is your audit trail.
What This Does Not Give You
This is an architecture, not a drop-in library. There is no package to install and nothing here "just works" out of the box; you implement the state object, the mapping layer, and the gate against your own engine and policies, and the quality of your result depends entirely on how well you specify them.
It is disclosed in a patent filing. It is not a benchmarked or productized system, and this guide reports no performance numbers, because the filing states none to report. Do not represent it as shipping software.
It also does not replace training-time alignment or downstream monitoring; it is a runtime control point, and it is only as good as the policy and consistency rules you encode. A gate cannot enforce a distinction you never defined. The approach fits tasks where semantic commitments are meaningful and inspectable and where withholding output is acceptable when nothing admissible can be committed. Where you genuinely cannot afford non-emission, or where per-step gating cost is prohibitive, the tradeoff shifts and you should weigh it deliberately.
Disclosure Scope
The approach described in this guide is disclosed in United States Patent Application 19/647,395, in its treatment of inference-time semantic execution control and the deterministic admissibility gate. This guide is educational: it explains an architecture so a developer can understand and build it themselves. It is not a warranty, a specification, or an offer of software, and nothing here should be read as a representation that a productized or benchmarked implementation exists.
Frequently asked questions
What problem does this guide address?
An architectural guide to gating LLM output at inference time with a deterministic admissibility gate, so inadmissible reasoning steps are never committed instead of being filtered after generation.
Which patent filing discloses this architecture?
The architecture described in this guide is disclosed in U.S. Patent Application 19/647,395. The full filing text is published on this site at qu3ry.net/patents/19-647395/chapters/inference.
Do I need a license to build this?
This guide is educational and describes an architecture disclosed in a pending patent application; it is not legal advice. Adaptive Query licenses the portfolio, and licensing conversations start at [email protected] or on the licensing page.