Architecture

We reason deterministically before we generate a word, and govern the pipeline the same way throughout.

We did not build a better document generator. We built a framework for clinical reasoning that can be validated, reproduced, and signed under — and an agentic layer that inherits that foundation rather than bypassing it.

THE PRINCIPLE

You cannot validate a probability distribution. You can validate a decision tree.

Every hard constraint in a regulatory submission is also a hard constraint on AI architecture. We started with the most unforgiving environment we could find and built backwards from it.

The trust gap is an architecture problem

DETERMINISTIC CORE REPRODUCIBLE BY DESIGN NOT RAG · NOT FINE-TUNED

Most AI systems in regulated clinical development were built to impress in a demo. The gap between "it worked the first time" and "I would put my name on this" is where every serious deployment lives or dies — and most systems were not designed inside that gap.

The core problem with RAG-based and generative-first approaches: the model makes judgment calls about clinical relevance at the moment of generation. Each probabilistic decision compounds the uncertainty of the last. The audit trail, if it exists at all, is a log of model calls — not a record of validated clinical reasoning.

TriloDocs works the other way around. The clinical decisions are made before any language model is involved. The LLM's job is narrower and safer: it renders already-determined conclusions into compliant prose. It does not decide what is clinically true. It writes it up.

This is not a technical preference. It is the only honest answer to the question every regulated environment eventually asks: can you validate this?

How clinical reasoning flows through TriloDocs

Study data Your inputs

TFLs · SAP · Protocol

Explicit sponsor intent Defined before any model runs

Study objective, population, clinical thresholds — captured via structured questions before the system processes anything.

Deterministic clinical reasoning Auditable · versioned

Rules, thresholds, and decision logic — fully inspectable. Same input produces the same clinical finding. Every time.

Explainable decisions Traceable to source

Every conclusion traces to the exact rule and source data point that produced it. Generated in real time — not assembled after the fact.

Language layer Rendering only

Converts already-determined conclusions into compliant, readable prose. Architecturally prevented from producing clinical judgments of its own.

Human review + submission Regulatory-ready

Qualified reviewer sees the reasoning, not just the output. Every sentence traceable to source.

The audit trail is generated in real time — not assembled after the fact. When a narrative sentence references a clinical finding, you can walk back to exactly which rule fired and which source data point triggered it. That is not a logging feature. It is an architectural property.
THE FOUR ENGINES

Four engines. Each doing only what it should. No data leaves the platform.

Safe and secure processing throughout. No third-party access to study data at any stage. Each engine hands off to the next with a clean, traceable record of what it did.

Engine 01 · Parse

Parse

Extracts and simplifies relevant data from source files. Structured, consistent, and traceable from the first step. The pipeline knows exactly what it is working with before any reasoning begins.

DETERMINISTIC
Engine 02 · Identify

Identify

Rule-based AI identifies and catalogues table types, data structures, and clinical data points. Non-hallucinating by design. The system categorises what it sees — it does not infer what might be there.

DETERMINISTIC
Engine 03 · Transform

Transform

Aligns and summarises data across multiple sources against sponsor-defined rules and clinical thresholds. This is where the clinical reasoning happens — explicitly, auditibly, and entirely before any language model is involved.

DETERMINISTIC · CORE REASONING
Engine 04 · Render

Render

The language layer converts already-determined clinical conclusions into compliant prose. Guided by medical writing knowledge and best practices. Architecturally prevented from introducing clinical content of its own.

LANGUAGE LAYER · RENDERING ONLY
TWO TYPES OF AI

Two types of AI. Each doing only what it should — and kept strictly apart.

Most platforms call everything "AI." We label exactly what each layer does and what it is architecturally prevented from doing. Your QA team should never have to guess.

Symbolic · Deterministic AI

Core clinical reasoning layer · owns all data decisions
Rule-based and non-hallucinating by design — not by model behaviour
Same input produces the same clinical output. Every time. Guaranteed by architecture.
Every finding traces to the exact rule and source data point that produced it
Transparent, inspectable, and ready for regulatory scrutiny
Decision criteria versioned and customisable to your SOPs — a rule update is an auditable event, not a model retrain
The part that needs to be right is also the part that can be validated — because it is rules, not weights

Medical Writing LLM

Language generation layer · phrasing only
Operates on already-determined clinical conclusions — not on raw study data
Guided by medical writing knowledge and regulatory best practices
Produces compliant, readable prose and patient-friendly narrative
Cannot produce a number, threshold, or safety-critical finding of its own — architecturally prevented
Validated separately against fixed inputs for language fidelity and format compliance — not clinical judgment
Why we keep these two layers strictly separate: the reason you can validate TriloDocs is that the component making clinical decisions — the deterministic layer — holds still. It does not drift between runs. It does not have off days. You validate it once, against fixed inputs, and the validation means something. Mixing probabilistic generation into the clinical reasoning layer would make that impossible.
THE AGENTIC LAYER

Agents and MCPs built on validated ground — not on raw data.

The way TriloDocs extends AI capability is not by giving agents access to raw study data and asking them to reason. It is by giving agents a clean, already-validated deterministic output as their starting point. The audit trail exists before any agent is involved.

Why the foundation matters for everything that comes next

IN ACTIVE DEVELOPMENT AGENTS OPERATE DOWNSTREAM OF REASONING

Most agentic AI in regulated environments gives an orchestrator access to raw data and asks it to reason its way to a conclusion. Every agent decision compounds the probabilistic uncertainty of the last. The audit trail, if it exists, is a log of model calls — not a record of validated clinical reasoning.

TriloDocs is building the other way around. By the time an MCP tool or agent is involved, the clinical decisions are already made, already traceable, and already clean. Agents operate on validated outputs — not on raw data. Decision making inherits the provenance of the deterministic layer automatically.

This changes what agents can safely do — and what governance over them looks like — in a regulated environment.

  • Elsewhere: agent reaches raw data → makes probabilistic clinical judgment → audit trail assembled after the fact
  • TriloDocs: deterministic layer produces validated output → clean audit trail exists → agent operates on that foundation
  • MCP tools extend capability without extending the zone of probabilistic risk
  • Version a rule in the deterministic layer — the agent inherits that provenance automatically
  • A governance model that holds as the system scales, because the foundation was designed to be governed
The agentic layer in context

Deterministic reasoning layer Foundation

Clinical decisions made. Rules applied. Findings traced. Audit trail clean.

Validated clinical outputs Agent starts here

Not raw data. Explainable decisions with full provenance. The agent inherits this — it does not produce it.

MCP tools & agents In development

Summarise sections. Compare runs. Surface related findings across documents. All operating on validated ground.

Governed decision making Concrete foundation

Decisions built on auditable outputs — not on a probability distribution. Governance holds as the system grows.

Human review Unchanged

The human reviewer's position in the workflow does not move. What they review has a cleaner provenance than before.

The frontier is not better generation. It is agents that can be trusted because they start from validated ground. The framework — deterministic reasoning, explicit intent, explainable decisions, controlled generation, governed agentic layer — is not specific to clinical study reports. Protocol deviations. Safety narratives. Risk-based monitoring. Anywhere expert clinical judgment needs to be encoded, reproduced, and trusted at scale, this architecture applies.
BUILT FOR REGULATED ENVIRONMENTS

Designed for GxP from the ground up. Not retrofitted to it.

Every architectural decision was made with a regulatory submission — and the person who signs it — in mind.

Certification

ISO 27001 & SOC 2

Certified information security management. Your study data is protected at every stage of processing.

Data security

No data leaves the platform

No third-party model access to study data at any point. Processing is contained. What goes in does not move outside.

Audit trail

Full traceability on every output

Every generated statement traces to its source rule and data point. Generated in real time. Exportable. Inspection-ready.

Validation

Validation Accelerator Pack

URS, IQ/OQ protocols, and traceability matrix. The deterministic layer is validated separately from the language layer — because they carry different risk profiles and should be treated differently.

Change control

Every rule update is versioned

A change to clinical decision logic is an auditable event — documented, versioned, and traceable. Not a model retrain with opaque effects.

GxP design

GAMP 5

Intended use specification, risk assessment, and IQ/OQ/PQ-style validation of the deterministic logic layer. Designed to sit inside your existing CSV lifecycle — not outside it.

WHERE THE ARCHITECTURE GOES NEXT

The proof was built in clinical documents. The architecture extends further.

Medical writing was the hardest starting point. That was deliberate. The same framework — deterministic reasoning, explicit intent, governed agentic layer — applies wherever expert clinical judgment needs to be encoded, reproduced, and trusted at scale.

In production today

Clinical Study Reports & companion documents

The deterministic core engine running on live studies. Proven in the most submission-critical environment we could find.

In active development

MCP tools & agentic layer

Agents that summarise, compare, and surface findings — operating on validated deterministic outputs, not on raw data. Governed decision making on a clean audit foundation.

In active development

Module 2.7 Clinical Summary & Module 2.5 Clinical Overview

The same deterministic core extended up the CTD. Synthesis across the full clinical documentation set — with the same traceability guarantees as the CSR engine.

Architecture horizon

Expert clinical reasoning as governed infrastructure

Protocol deviations. Safety narratives. Risk-based monitoring. Regulatory responses. Anywhere the pattern holds — explicit intent, deterministic reasoning, explainable decisions, controlled generation — the architecture applies.

Contact us to discuss where your use case fits →

TriloDocs
See TriloDocs in Action

See the architecture run on a live table.

One laboratory shift table. Run it once. Run it again on the same input. Bring your QA lead and your AI governance questions — book a demo and we'll walk through the full audit trail and the validation pack contents.

We reply within one working day.