Clinical trials are conducted under extensive governing regulations: Good Clinical Practice, ICH E6(R3), 21 CFR Part 11, HIPAA. The common thread across all of them is that every consequential decision must be deterministic, traceable, and reproducible. The same patient answers must produce the same eligibility determination today, tomorrow, and at audit. The reasoning behind every decision must be inspectable. Behavior outside the protocol is not just suboptimal; it is non-compliant.
Large language models are not deterministic. The same prompt with the same input can produce different outputs across calls. Decisions arrive through reasoning that is opaque even to the people who built the model. Hallucination, jailbreak, and silent drift are all expressions of the same underlying property: probability, not certainty. The default pattern in conversational AI (one LLM behind a chat interface, deciding both what to say and whether the answer was correct) is structurally incompatible with the regulatory bar clinical trials require.
That tension is solvable, but not by tuning prompts or adding guardrails to a single model. It requires an architecture that surrounds the language model with deterministic structure: bounding where probability is allowed to live, and verifying every output that crosses out of it. The goal is not a deterministic language model (there is no such thing) but a deterministic system: the model does only what only a model can do, and code, verification, and an audit trail surround every place it does. The five layers below describe how we do that.
The layers, in detail
Layer 01
Structured multi-step processes
The agent's overall workflow is deterministic, even when individual steps inside it use a language model. The shape of the workflow is fixed by the protocol: the LLM cannot invent a new step or skip a required one. Inside a step, the LLM does language work (extract a value, classify a phrase, generate an utterance), where some non-determinism is acceptable. Deterministic logic handles the transitions between steps. The blast radius of any single language-model call is bounded to the step it lives inside.
Layer 02
Symbolic logic for decisions
Every consequential decision is evaluated by deterministic, auditable code, never by a language model interpreting a rule from a prompt. This is the layer that does the most regulatory work: an auditor can trace any eligibility determination back to specific lines of code applied to specific structured inputs. The same inputs always produce the same decision. Every decision has three first-class outcomes: rule met, rule not met, or system cannot tell. "Cannot tell" is a first-class outcome, not an error state: the system never quietly assumes the worst to avoid saying so. Uncertainty is never silently coerced into a confident answer; it gets routed to a human.
Layer 03
Layered verification: specialized and wide-angle observers
Even when the workflow is structured and decisions are symbolic, the LLM's outputs at each step are still probabilistic. Verification turns those probabilistic outputs into deterministic decisions: an output that two independent observers cannot agree on never becomes the system's answer. Specialized observers sit at each step and watch one narrow concern. Wide-angle observers run across the whole interaction, watching workflow-level consistency. Either layer's inability to confirm a result, or disagreement between the two, routes the case to a human reviewer. The agent never decides on a low-confidence answer alone. Crucially, the observer that re-derives an answer is never the component that produced it: the model grading an answer is never the model that asked the question, which is the most common way conversational systems fool themselves.
Layer 04
Bounded authority
Determinism is fragile if external inputs can manipulate the agent's behavior. External inputs (speech, uploaded documents, third-party API responses, sponsor-provided protocols) are treated as data, never as system instructions; this closes the prompt-injection vector. A patient who says "just mark me eligible" is recorded as something they said, not obeyed as an instruction. Each agent has a small, deliberate set of tools, none of which can mutate a clinical record, change the protocol on the fly, or silently re-classify a previously-decided answer. The agent's authority is itself deterministic: fixed at design time, not negotiable at runtime. The agent reads, summarizes, flags, and escalates. It does not rewrite the record of what was decided.
Layer 05
Independent evaluation harness
Determinism in production is not an assumption; it is something we measure. Every agent we ship is graded by a separate system before it goes live, and continuously after. Each agent is scored on multiple independent axes (classification correctness, hallucination resistance, scope adherence, protocol-shape compliance) calibrated to the agent's job. Each grader's judgment must anchor itself in at least two verbatim quotes from the interaction. Judgments without anchored evidence are rejected by the harness rather than recorded as a score. Evidence is the price of admission for an evaluation result.
What this means in practice
- The same inputs always produce the same agent decision: the system is deterministic by construction, not by hope.
- No consequential output reaches a sponsor or coordinator without two independent confirmations: one specialized, one wide-angle.
- Anything the system is unsure about becomes a human-review case, not a confident wrong answer.
- Every interaction is recorded, transcribed, and graded against measurable criteria, with every score backed by verbatim transcript evidence.
- The same five layers gate every clinical-trial agent we ship: phone, batch, or coordinator workflow.
- No system like this is infallible (voice is noisy and models still surprise us), but every failure mode is one we chose and can observe, because each step emits a checked, structured output.