LLM Gene Annotation Demo
Does the annotation say what its sources say?
This annotates Mycobacterium tuberculosis genes. It hands a language model a set of lookup tools — KEGG for pathways, STRING for protein interactions, PubMed for literature — lets it decide which to call and when it has enough, then writes up what it found.
Then the last step. Every identifier in the write-up is checked against what the tools returned. Not by another model judging it, but by looking: was this exact record retrieved, for this exact gene, and where text is quoted, do those words really appear in the source? A model can produce a fluent, plausible, correctly-formatted citation for something it was never shown. This catches that.
Nothing here is live — these are real runs captured earlier and replayed. The checking itself runs fresh in your browser each time, using the same code as the library. Source code, and the reasoning behind every design decision.
Starting Python in your browser… (a few seconds, first time only)
1. What the model asked for
The model chooses which tools to call and when it has enough.
This is a two-gene run, so the calls marked pipeline were made deterministically by the code before the model started, not chosen by it. Single-gene runs have none.
2. What it wrote
3. What survived checking
Quoted passages
CROSS-TARGET means the record
was retrieved during this run, but not for the gene being annotated — a real
identifier that a check of “does this ID exist?” would wave through. It is
a mechanical comparison against the run’s own record of which gene returned what,
not a reading of the sentence, so a neighbour gene discussed as context is flagged as
well. UNSUPPORTED means no tool returned it at all. Two-gene runs have
no single target and so are not checked this way.
Research use only. Not for clinical decisions.
Repository.
An upstream classifier emits rules over per-locus variant states. This page reads each one against the WHO catalogue, the annotation and the interaction data, and says what is already accounted for.
Nothing here was stored. The gene tab above replays a model’s summary, because a summary cannot be regenerated without an API key. A rule annotation has no model in it — given the catalogue rows, the annotation and the rules, every verdict is arithmetic. So the page ships those inputs and runs the same classifier the library does. What you see is computed here, now, and cannot drift from the code.
Rules
Pick one to see the reasoning. minimal means no smaller rule in the set is contained in it.
Why
A locus being catalogued means the
gene is known to resistance, never that the variant driving the rule is one of
the graded ones — katG holds 1,771 catalogued variants of which 139 are graded
associated. Enrichment is measured against the full annotation, not the subset shipped
here, and a p measures surprise against a uniform draw rather than evidence that the
loci are related.
Research use only. Not for clinical decisions.