WebSemantic: scientific codes that ask before they compute

Cyril Voyant · Updated 2026-10-18

Open the web app
Free, nothing to install, in English or French, on a computer or a phone.

A language model asked to run a simulation may fill gaps by itself. "A weak updraft" becomes 0.1 m/s, "the usual dose" becomes 3 Gy, and the code runs on values that nobody stated. In simulations of plausible interpretations, such choices changed the computed result by up to a factor of 2.6 and moved a complication probability from 3% to 47%.

WebSemantic sits between the person, the language model and an unchanged scientific code. The model only translates words into the code's variables. WebSemantic checks them, proposes declared defaults, asks for what is missing, and runs the original code only after the person agrees. Every result states its units, its sources and the exact code version.

One description, four views

Each code is described once. From that descriptor WebSemantic derives:

Artefact Role
Contract Reading rules for language models: meaning, unit, what may be assumed, what must be asked
Ontology OWL/SKOS vocabulary aligned with QUDT and PROV-O, with SHACL shapes that check a scenario
Validator One decision per scenario: execute, clarify or refuse. It never fills in a value
FAIR metadata Identity, licence, versions and persistent identifiers

The scientific code is never modified: it is pinned to a commit and its sources are checked by SHA-256 before each run.

Three codes, three domains

What you get back

CSV tables with units, a manifest.json listing every parameter with its value, unit, origin and acceptance, software versions and SHA-256 hashes, and the provenance as an RDF graph (PROV-O).

Evidence so far

On a corpus of 78 cases asked to four language models, adding the contract to the documentation reduced premature calculations, for example from 26% to 6% (Mistral-Small) and from 52% to 23% (Codestral). Details are in the repository; the associated paper is in preparation.

Install and cite

pip install websemantic installs the Python layer; agents can start from llm.md. Cite the software: C. Voyant, WebSemantic, doi:10.5281/zenodo.23238902.

Source code (MIT) · PyPI · Ontology