How to build a reinforcement-learning environment from US drug approvals
A reinforcement-learning (RL) environment is a set of tasks with a reward a program can compute, so a model can be trained by trying the tasks and being scored. We built one from 20 novel drugs the U.S. Food and Drug Administration (FDA) approved between August and November 2026. A drug's approved label is the prescribing information the FDA signs off: who the drug is for, the dose, and its warnings. Each task gives a model the pivotal trials, the trials the sponsor's case for approval rests on, as they stood before approval, and asks it to write the label decision as typed fields. Code grades the fields against the approved label.
- We used three open models from three labs: Qwen3-235B, Alibaba's; GLM-5.3-Flash, Z.ai's; and DeepSeek-V4.1-Flash, from the lab DeepSeek. Each answered every task five times. They got between 76.6% and 88.4% of the fields right.
- The hardest fields were the dose (65.9% right) and whether the label carries a boxed warning, the strongest safety warning, printed in a box at its top (70.3%).
- Where the trial and the label differ, 282 of 288 misses were the same mistake: copying the trial into the label instead of deciding what the FDA would approve.
1. We cut each record at the decision
An approval has a date, in Novel Drug Approvals for 2026 and Drugs@FDA. The task is what was public before it, as near as we can rebuild it: the pivotal trials' records from the ClinicalTrials.gov API (design, eligibility, arms and doses, outcomes, and results where posted), and the sponsor's own dated statements of what it filed for. The API returns today's record, so we strip what is dated on or after approval; the limits below say what that cannot catch. The approved label is the key, which the model never sees. It is the same cut SWE-bench makes on a repository, and Hatchery on case stories (Scaling experts to build hundreds of knowledge work environments).
We removed trial results posted on or after the approval date (three trials), every later date, brand names, and any mention of approval, a label, a boxed warning, or a REMS (Risk Evaluation and Mitigation Strategy: a safety programme the FDA can require on top of the label). Test sets leak into training (Golchin and Surdeanu), which is why LiveCodeBench dates every problem. We took only drugs approved from August 2026 on, the most recent there are. That lowers the chance a model read the labels; it does not rule it out.
2. We write the decision as typed fields
The Code of Federal Regulations (CFR) section 21 CFR 201.57 sets what a prescription label says and in which section. We took 11 of its decisions as typed fields: the pathway (regular, or accelerated under 21 CFR 314 Subpart H); who the drug is for (line of therapy, biomarker, a population narrower than the trial's, monotherapy or combination, minimum age); safety (boxed warning, and a REMS); and how it is given. For that last part we use the route; the dosing interval, which is how often a dose is given; and the maintenance dose, which is the dose kept up after any starting phase.
The key is read from the label on DailyMed, and each value is stored with the label sentence it came from.
3. We grade each field with code, not a model
The reward is the share of fields that match the label: the dose exactly, in its unit; enums and yes-or-no fields outright. No model judges, for the reasons in the companion post: judges are biased (Zheng et al.), and a label is one right answer, which suits verifiable rewards (Tulu 3, DeepSeek-R1) better than rubrics (Rubrics as Rewards). Medical benchmarks such as MedQA test what is already known; this asks for a decision that was not yet public.
4. Three model families answer every task
The three models each answered every task 5 times: 300 runs, with no malformed answers. The margin, a 95% interval, comes from resampling the 20 tasks: the five runs and the fields of one task are not independent, so the task is the unit.
| Model | Fields right | Margin, 95% | Right where the key has a value | Malformed | Misses on the rigid answer |
|---|---|---|---|---|---|
| GLM-5.3-Flash | 88.4% | 83.5–93.1 | 90.4% | 0 of 100 | 71 of 71 |
| DeepSeek-V4.1-Flash | 81.0% | 76.2–86.1 | 83.1% | 0 of 100 | 96 of 100 |
| Qwen3-235B | 76.6% | 69.2–83.4 | 79.5% | 0 of 100 | 115 of 117 |
Compared task by task, GLM-5.3-Flash is ahead of DeepSeek-V4.1-Flash by 7 points (margin 4 to 12) and of Qwen by 12 points (margin 7 to 17). DeepSeek's lead over Qwen, 4 points, is within what 20 tasks can resolve.
By field, the hardest are dose_amount (65.9%), boxed_warning (70.3%), line_of_therapy (74.7%), age_min_years (75.7%); the easiest is route (98.0%).
| Field | Right, all runs | What it asks |
|---|---|---|
| dose_amount | 65.9% | recommended maintenance dose per administration for a 70-kg adult, as a bare number in the unit named on the record's DOSE UNIT line (if the label titrates up to a named maximum as tolerated, that maximum); null if the label individualizes the dose to a lab or clinical target with no single recommended maintenance dose |
| boxed_warning | 70.3% | true if the label carries a boxed warning |
| line_of_therapy | 74.7% | second_or_later if every patient in the indication must already have received, or be currently receiving, another therapy for the disease; first if the indication is limited to untreated patients; any if a treatment indication does not require prior therapy for every patient; not_applicable for a risk-reduction/prevention indication (e.g. preventing a stroke) |
| age_min_years | 75.7% | lowest age in years the indication allows: 18 for adults only, 12 for 'aged 12 years and older'; null if the indication sets no age floor (all ages, or only a body-weight floor) |
| approval_pathway | 81.3% | accelerated if the indication is approved under accelerated approval (surrogate endpoint, confirmatory trial required); otherwise regular |
| biomarker_required | 82.0% | true if the indication is limited to a subgroup defined by a test result beyond the diagnosis itself (a mutation, gene rearrangement, receptor or antibody status, an antigen level) |
| population_narrower_than_trial | 85.3% | true if the labeled population leaves out patients the pivotal trial(s) enrolled (a biomarker subgroup, a prior-therapy subgroup, an age or onset band); false if it is the same as or broader than the enrolled population |
| combination | 87.0% | combination if the indication statement names another therapy the drug is used with or added to (including 'in patients currently receiving X'); either if it states the drug may be used alone or with another therapy; monotherapy if it names no companion therapy |
| dosing_interval | 89.3% | interval between maintenance doses (every 3 months, divided daily doses and the like are other) |
| rems | 91.0% | true if the drug is available only under a Risk Evaluation and Mitigation Strategy (REMS) |
| route | 98.0% | route of administration of the recommended dosage (intrathecal and others are other) |
8 of the 20 tasks average under 80%. Pick one to see its key, the rigid answer, and what the models said:
WELGEMDA (ribitol)
Decided 2026-11-23 · trials NCT05775848 · input 8k characters · the label
Mean score: Qwen3-235B 0.82 · GLM-5.3-Flash 0.93 · DeepSeek-V4.1-Flash 0.80
| Field | Key | Rigid answer | Runs right | Most common wrong answer |
|---|---|---|---|---|
| approval_pathway | regular | regular | 14 of 15 | accelerated |
| line_of_therapy | any | any | 15 of 15 | — |
| biomarker_required | no | no | 5 of 15 | yes |
| population_narrower_than_trial | no | no | 15 of 15 | — |
| combination | monotherapy | monotherapy | 15 of 15 | — |
| boxed_warning | no | no | 15 of 15 | — |
| rems | no | no | 15 of 15 | — |
| route | oral | oral | 15 of 15 | — |
| dose_amount | 12 | 12 | 15 of 15 | — |
| dosing_interval | twice daily | twice daily | 15 of 15 | — |
| age_min_years | not in issue | 12 | 1 of 15 | 12 |
The rigid answer is shown in amber where it differs from the key. Hover a field for the words of the decision its key was read from.
5. We audit the results and the key
The same four checks as the companion post, after RubricCraft and JusticeAxis.
Malformed apart from wrong. None this time.
Cells that never separate models. 137 task-and-field cells were right in every run, mostly route and REMS (Rodriguez et al. on why that matters).
The key, wherever every family disagrees with it. 11 cells; we re-read the label for each, since keys are wrong more often than expected (Northcutt et al., Gema et al.). All held. Cemdisiran is labelled at 567 mg, not the 600 mg the trial studied; tavapadon's maintenance dose is 5 mg where the models said 15; bepirovirsen, tiratricol and camizestrant carry a boxed warning. One is a matter of definition: tiratricol's patients are defined by MCT8 deficiency, which we count as the diagnosis, not a biomarker test.
Which way the misses lean. Our rigid reference is the trial taken literally: the enrolled population, the regimen and dose as studied, regular approval, no boxed warning, no REMS. Of the misses on fields where the label differs from the trial, Qwen3-235B 115 of 117, GLM-5.3-Flash 71 of 71, DeepSeek-V4.1-Flash 96 of 100 land on it. (The other misses, 300 of 588, are on fields where the label kept what the trial did, so copying the trial was not an option there.) The models do not guess; they copy the trial into the label. What they miss is what the FDA adds: a narrower population, a different dose, a boxed warning, an accelerated pathway. That is the skill an environment like this can train.
6. We export the tasks for training
What we do next
Training comes next: keep the best-graded samples, fine-tune an open model on them, then run RL against the label grader, and report it on approvals held out by date. The same cut works on any regulator's dated decisions, and on a company's own record of what it filed and what came back.
What this test cannot show
- 20 tasks, so each model's margin is about ±7 points.
- ClinicalTrials.gov returns today's record, not the record on the approval date, so a protocol edit made after approval could remain.
- Some sponsor filings in the inputs state the indication filed for, which hints at the narrowing. They were public before approval, so we kept them.
- For two drugs no source before approval states the dose, so their dose is not graded.
Sources
- Scaling experts to build hundreds of knowledge work environments. Henry Mao and Arjun Kumar, Hatchery, 2026.
- SWE-bench: Can Language Models Resolve Real-World GitHub Issues?. Jimenez et al., ICLR 2024.
- LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code. Jain et al., 2024.
- Time Travel in LLMs: Tracing Data Contamination in Large Language Models. Golchin and Surdeanu, ICLR 2024.
- Novel Drug Approvals for 2026. U.S. Food and Drug Administration.
- Drugs@FDA: FDA-Approved Drugs. U.S. Food and Drug Administration.
- ClinicalTrials.gov API, version 2. National Library of Medicine.
- DailyMed. National Library of Medicine.
- 21 CFR 201.57: content and format of labeling for human prescription drugs. U.S. FDA, eCFR.
- 21 CFR Part 314, Subpart H: Accelerated Approval. U.S. FDA, eCFR.
- Risk Evaluation and Mitigation Strategies (REMS). U.S. Food and Drug Administration.
- What Disease does this Patient Have? (MedQA). Jin et al., 2020.
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. Zheng et al., NeurIPS 2023.
- Rubrics as Rewards: Reinforcement Learning Beyond Verifiable Domains. Gunjal et al., Scale AI, 2025.
- Tulu 3: Pushing Frontiers in Open Language Model Post-Training. Lambert et al., Allen Institute for AI, 2024.
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning. DeepSeek-AI, 2025.
- RubricCraft: Where Solutions Diverge, Criteria Emerge. Hasanbeig et al., Microsoft, 2026.
- JusticeAxis: Benchmarking Legal Judgment between Rigid Rule Application and Ungrounded Discretion. Tu et al., 2026.
- Evaluation Examples are not Equally Informative: How should that change NLP Leaderboards?. Rodriguez et al., ACL 2021.
- Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks. Northcutt, Athalye and Mueller, NeurIPS 2021.
- Are We Done with MMLU?. Gema et al., NAACL 2025.
- Harbor. Laude Institute, 2025.
- verifiers. Prime Intellect.