Skip to content

·3 min read

An assistant that cannot get the science out of order

Large language models can plan multi-step tool use. That is not enough for quantitative science, so we made correctness structural rather than a matter of trust.

By Dr Simon P. Skinner

There is an obvious version of an NMR analysis assistant, and it is a bad idea. You give a language model a set of tools, you describe your data, and you hope. It will often work. When it does not work, it will not tell you — it will hand you a model-free fit computed before a correlation time was ever estimated, formatted exactly as convincingly as a correct one.

Quantitative science cannot run on hope, so we built the guardrail first and the assistant second.

The ordering problem is the whole problem

Biomolecular NMR analysis has a partial order that everyone in the field knows and nobody writes down. You cannot transfer an assignment you do not have. You cannot fit a rate from intensities you have not extracted. Model-free analysis without a diffusion tensor is arithmetic, not physics.

These constraints are real, and they are invisible in the output. A pipeline run in the wrong order produces numbers with error bars, not an error message. That is what makes them dangerous, and it is why "the model is usually right" is not an acceptable answer.

Making invalid analyses unrepresentable

Every result in the platform is an artifact with a type — a spectrum, a peak list, a peak series, an assignment, a set of relaxation rates, a diffusion tensor. Every operation declares which artifact types it consumes and which it produces. Together these form a directed acyclic graph, and that graph is derived from the platform's own canonical workflow definitions rather than maintained separately, so it cannot drift from what the services actually do.

The assistant proposes an operation. The graph checks whether the artifacts it requires exist yet. If they do not, the call does not happen — not as a warning the model can talk itself past, but as a refusal in code before any service is contacted.

The model chooses what to do. The graph decides what is allowed. Those are different jobs, and only one of them is safe to give to a language model.

Provenance is not optional

Derived NMR parameters get published constantly without a machine-readable trail from raw data to result. Deposition standards like NEF and NMR-STAR solve data exchange — they say nothing about analysis provenance.

So every result we store is an envelope recording the identifiers it consumed and the identifiers it produced. Any value can be walked back to the FID and the structure it came from, months later, by someone who was not there. When a reviewer asks how a number was obtained, the answer is a graph, not a recollection.

Two ways in, one implementation

The part we are most pleased with is not the guardrail. It is that the assistant and the web forms drive the same workflows and write to the same result stores.

A seasoned spectroscopist who knows exactly which CPMG model they want configures it through the forms. Someone newer describes what they are trying to measure and lets the assistant assemble it. Both get an identical, provenance-tracked result, because underneath there is one implementation rather than two that will inevitably disagree.

The scientist drives. The assistant does the legwork. The scientist verifies every result — and consequential output arrives marked proposed, waiting to be accepted or discarded.

_ end transmission //

More