Let the language model read, let the validated code compute: WebSemantic

Language models are good at understanding a request written in plain words. They are not a substitute for a validated scientific code. WebSemantic gives each one its role, and asks the person whenever something is missing.

Cyril Voyant · Mines Paris – PSL, Centre O.I.E.

In brief

The finding

Language models become useful in science when they are kept in their place: reading and translating the request. Computing stays with codes whose validity is known. When an input is missing, the right answer is a question, not a guess.

The question

Can a language model run a scientific simulation on someone's behalf? It can, but it will happily fill in what was not said: "a weak updraft" becomes 0.1 m/s, "the usual dose" becomes 3 Gy, and the code runs on values nobody stated. The result looks precise and may be wrong.

The theory, in plain words

Each code is described once, in a contract: what each variable means, its unit, what may be assumed by default and what must be asked. Every input of a scenario carries its value, its unit, its origin (stated by the person, unit conversion, declared default, assumption) and whether the person accepted it. The rule is simple:

The validator never invents a value. The scientific code is pinned to a precise version, checked before each run, and returns its results with a full record of where every number came from.

Where it sits on the complexity ladder

Complexity ladder: a language model, a deep network on the top rung, reads the request; the validated variables go down to the low rungs, where the calculation stays
Complexity ladder: a language model, a deep network on the top rung, reads the request; the validated variables go down to the low rungs, where the calculation stays

WebSemantic does use the top rung: a large language model, a deep network, reads the request. But it computes nothing: it hands validated variables down to the low rungs, direct calculation and simulation, where the validated codes compute. AI belongs in every toolbox, not in every solution.

The chain: request, language model, validator, validated code, result
The chain: request, language model, validator, validated code, result

The example in figures

A complete radiotherapy research scenario (rectum and prostate, 39 fractions of 2 Gy, every input stated and accepted): the validator answers execute, and LQL-Equiv returns an EQD2 of 78.0 Gy. Remove the dose per fraction from the same scenario: the answer becomes clarify, "an explicit value or accepted assumption is required", and nothing is computed.

Premature calculations, with and without the contract
Premature calculations, with and without the contract

What it brings, and its limits

Go further