> For the complete documentation index, see [llms.txt](https://platform-docs.opentargets.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform-docs.opentargets.org/drug/ai-and-machine-learning.md). Agents can also search and read this documentation through its [MCP server](https://platform-docs.opentargets.org/~gitbook/mcp).

# AI and machine learning in drug annotation

Where and how AI and machine learning models are used to annotate drugs and clinical candidates

The Platform uses AI and machine learning models to read clinical trial registrations, regulatory records and the literature at a scale that manual curation cannot reach. This page lists where these models are used for drugs and clinical candidates, what they produce, and how their output is checked, so that you can tell predicted annotations from curated ones.

All models run before the release is built, when the sources are staged, and each release uses a fixed output from fixed model versions. No model is called while the Platform data is generated or served.

## Summary

| Where                                                                                                                            | Model                                                                                                                                                                                                                                                                                   | What it produces                                                                               | How to recognise it                                                  |
| -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [Clinical trial extraction](https://platform-docs.opentargets.org/drug/clinical-report.md#entity-extraction-for-clinical-trials) | Anthropic's Claude Haiku 5.5                                                                                                                                                                                                                                                            | The drug–indication pairs each ClinicalTrials.gov trial tests, and the trial's drug intent     | All clinical reports from ClinicalTrials.gov                         |
| [Electronic mechanisms of action](https://platform-docs.opentargets.org/drug/clinical-report.md#electronic-mechanisms-of-action) | Anthropic's Claude Opus 5.5                                                                                                                                                                                                                                                             | Drug targets and action types for clinical candidates that ChEMBL has not curated              | `curation = "electronic"` in the mechanism of action data and widget |
| [Reason to stop](https://platform-docs.opentargets.org/drug/clinical-report.md#reason-to-stop-categories)                        | Open Targets [clinical trial stop reasons classifier](https://huggingface.co/opentargets/clinical_trial_stop_reasons)                                                                                                                                                                   | Categories of why a trial stopped early                                                        | `trialStopReasonCategories` in clinical reports                      |
| Drug and disease recognition in TTD, EMA and PMDA records, and drug names in ClinicalTrials.gov                                  | Named entity recognition models: [BioBERT chemical NER](https://huggingface.co/alvaroalon2/biobert_chemical_ner), [BioBERT diseases NER](https://huggingface.co/alvaroalon2/biobert_diseases_ner) and [DrugTEMIST](https://huggingface.co/BSC-NLP4BIA/bsc-bio-ehr-es-carmen-drugtemist) | Drug and disease names found in free text, which are then mapped to ChEMBL and EFO identifiers | `drugFromSource` and `diseaseFromSource` in clinical reports         |

## Clinical trial extraction

ClinicalTrials.gov records describe trials in free text and semi-structured fields, and their condition and intervention terms do not say which drug is tested for which disease. Claude Haiku 5.5 reads each trial's registry text and records the drugs the trial tests, the indication each is tested for, with an exact quote from the trial text and a confidence, and the trial's drug intent (therapeutic, prevention, diagnostic, supportive care or other). Drugs with other roles, such as background therapies, comparators and placebos, are not linked to the disease.

* The confidence is the model's own rating of each drug–indication link, from 0 to 1: 0.9 or more when the trial text states the link outright, 0.7 to 0.9 when it takes one inference from the trial arms or design, and lower when the text is sparse or the drug's role is unclear. Only links with a confidence of at least 0.8 are added to the trial's clinical report, and a trial with no such link does not produce a clinical report.
* The [quality filters](https://platform-docs.opentargets.org/drug/clinical-report.md#quality-filters) use the drug intent: trials whose intent is not therapeutic, or could not be determined, are flagged and do not contribute to clinical evidence. Single-drug prevention trials registered with a phase and a prevention or treatment purpose are the exception.
* The prompt is [available on GitHub](https://github.com/opentargets/pipeline/blob/main/pts/src/pts/transformers/clinical_mira/prompts/aact_trial_v2.txt).

## Electronic mechanisms of action

Claude Opus 5.5 infers the mechanisms of action of clinical candidates not yet curated manually by ChEMBL, from the ClinicalTrials.gov registrations of the trials that test the drug and from sentences in publications that mention it. It is instructed to use only what these texts state, not outside knowledge, and to prefer a missing mechanism to a wrong one.

* Each mechanism quotes the sentence that states that the drug acts on its target, references the NCT IDs or PubMed IDs it comes from, and is mapped to an Ensembl gene.
* The confidence is the model's own rating, from 0 to 1, of how well the texts support each mechanism. Benchmarked against ChEMBL's curated mechanisms, it separates correct from wrong predictions with an AUROC of 0.87. Only mechanisms with a confidence of at least 0.80 are released. At that threshold, 96–97% of predicted targets match a ChEMBL target exactly. For mechanisms from the literature this rises to 99.5% when a second model, acting as a judge, also accepts targets that ChEMBL does not list but the text supports as the drug's primary mechanism.
* Approved small molecules are not given electronic mechanisms, as they are covered by ChEMBL manual curation. Approved biologics (antibodies, antibody–drug conjugates, enzymes, oligonucleotides and proteins) can be assigned one from their trials.
* Electronic mechanisms are labelled `electronic` (ChEMBL mechanisms are `manual`) in the `drug_mechanism_of_action` dataset, the GraphQL API (`curation`) and the mechanism of action widget, so they can be filtered out.

Electronic mechanisms are used for clinical precedence evidence, associations and target prioritisation in the same way as curated ones.

## Reason to stop classification

A machine learning model, trained on the free-text reasons of 28,842 stopped trials on ClinicalTrials.gov, classifies why a trial stopped early into 17 categories. Trials that stopped for negative or safety reasons have their clinical precedence evidence score halved (see [Clinical precedence](https://platform-docs.opentargets.org/evidence.md#clinical-precedence)). The model and its evaluation are described in [Razuvayevskaya et al., Nature Genetics, 2024](https://www.nature.com/articles/s41588-024-01854-z).

## Named entity recognition

TTD, EMA and PMDA records describe drugs and diseases in free text. Named entity recognition models find the drug and disease names in these texts, and the drug names of ClinicalTrials.gov interventions, before they are mapped to ChEMBL and EFO identifiers. These models only recognise names; they do not map them to identifiers. The models are BioBERT chemical and disease NER models and DrugTEMIST, all available on Hugging Face (see the [summary](#summary)). The code, including how recognised names are mapped to identifiers, is openly available in the [Open Targets pipeline](https://github.com/opentargets/pipeline/tree/main/pts/src/pts/transformers/clinical_mira) on GitHub.

## What does not use AI

* Structured sources, such as ChEMBL indications and mechanisms, ChEMBL drug warnings and Drugs\@FDA approvals, are integrated without language models.
* [Pharmacovigilance](https://platform-docs.opentargets.org/drug/pharmacovigilance.md) signals are computed with a statistical test (likelihood ratio test) on FAERS reports.
* The harmonisation of clinical stages, the quality filters and the evidence scores are rule-based.
