[Back to blog]
[Research]Post-training

Alterra's training takes a 27B open model to the frontier on clinical workflows

Introduction

Demand for AI in healthcare is growing faster than models are learning to practice medicine. AI doctor apps and chatbots field medical questions at a pace few expected. Providers, health systems, and the companies building for them see AI as a critical way to provide care more efficiently, from documentation to billing and medication management. The promise is real, but so are the gaps.

Today's models possess the medical knowledge to pass licensing exams with ease, but these exams are single-step Q&As. Delivering care is fundamentally different. To make decisions, clinicians review large amounts of unstructured data, work through conflicting information, and reason over patient conversations, notes, labs, imaging, and medications together. They make several linked decisions in parallel and simultaneously, from findings and diagnosis to plan, treatment, and next steps. This is the work models struggle to do reliably and at scale.

Alterra Labs is dedicated to advancing the safety, alignment, and capability of AI in healthcare and the life sciences. We study how models behave on complex, multi-step tasks in real clinical work, find the gaps that limit what they can safely do, and develop training data and paradigms that advance the frontier.

We believe much of the gap between frontier models and safe clinical work is a training-signal problem. Closing it depends on how well clinician judgment is turned into tasks, rubrics and rewards a model can learn from. To show what that looks like, we ran a focused experiment: we post-trained Qwen3.8-27B on long-horizon clinical workflows in a simulated EHR using Alterra Garden, our proprietary post-training platform. Qwen's pass rate rose from 35.7% to 92.4% on 359 multi-step, held-out tasks, level with Opus 5.5 while being 25x cheaper per task. Reinforcement learning also generated emergent behavior that improved how the model gathers clinical evidence before making decisions, a behavior we never explicitly rewarded in our training process.

[Results]Held-out pass rate · 359 tasks ↑ Higher is better

From 35.7% to 92.4%: level with the best frontier model we evaluated

Figure 1. Held-out pass rate on the 359 tasks after each training stage (SFT: supervised fine-tuning; RS: rejection sampling; RL: reinforcement learning). Dashed lines: the frontier models in the Results table. Bars: 95% confidence intervals. Shaded band: Opus 5.5's 95% interval.

Task scope

We focus on building longitudinal, multi-step tasks because this is where we believe the gap between knowing medicine and practicing it shows up. The model has to look through a patient's history, pull out the few facts that matter, track serial changes in labs and vitals over time, and make a series of connected decisions before acting in the EHR. We often see models reach a correct answer without doing the reasoning through the information that would support it. Our tasks are designed so we can study the path to each decision along with the decision itself, and see where today's models still skip the steps essential to support safe, reliable clinical intelligence at scale.

To test these behaviors, we chose anticoagulation management as a workflow for this study. Anticoagulants (blood thinners) are a leading cause of US emergency visits for adverse drug events. Correct dosage and treatment path are incredibly dependent on a patient's unique context (e.g., kidney function, weight, age, other medications, etc.), and those facts are spread across a chart and change over time. We felt this was a great task where models would be challenged on the complex, longitudinal multi-step reasoning and decision-making that is core to real-world healthcare practice.

Engineering the training environment

We built this environment so that the only way for an agent to score well is to reason through each case as a clinician would. More than 60 clinicians designed the evaluation set, defined the clinical decisions the tasks test, wrote and weighted the grading rubrics, and calibrated both the graders and the pipeline that generates training tasks. Together we built thousands of clinical tasks grounded in sixteen FDA drug labels, systematically covering clinical rules, their interactions and exceptions, and the drugs most often prescribed alongside anticoagulants.

We build tasks for every side of every rule
1The rule, from the label
Eliquis (apixaban) · dosingFor atrial fibrillation, give 2.5 mg twice daily, not 5 mg, when the patient has at least two of:
Age ≥ 80years
Weight ≤ 60kg
Creatinine ≥ 1.5mg/dL
2The cases the map lists
3Values drawn for each case
Age
Weight
Creatinine
counts toward the rule this patient
4A full chart around those values
Message the model receives
Demographics

Vitals

Labs

Problem list

of 3


Figure 2. How one label rule becomes training tasks: the rule, the cases the map lists for it, and the values drawn for each case.

Across supervised fine-tuning, rejection sampling, and reinforcement learning, we used approximately 2,300 training tasks, with no overlap between training and test sets. Our headline results are measured on 359 held-out tasks.

Clinician-led task and environment design: Our clinicians designed the held-out evaluation set, and every task is based on de-identified patient records. Clinicians reviewed those records, clinical rules, and rubrics against FDA labeling, so that the held-out benchmark was clinically appropriate and realistic. The tasks were run in Alterra's EHR simulation environment. Rather than receive all information in a prompt, the model has to interact with the complex, messy chart similar to a clinician in the real world, reviewing a patient's history across the demographics, vitals, labs, problem list, medication flowsheets, and unstructured notes.

Eliminating shortcuts: To ensure our model learned clinical reasoning behaviors instead of unrelated patterns in the records, we tested each task family against reflex strategies that skip reasoning. In an early version of the dataset, age and weight alone were enough to make the correct decision in 97% of cases within one task family. We added counterexamples where this shortcut no longer worked, forcing the model to reason through the clinical rules and individual patient context to consistently answer correctly.

Reliable reward design: Our clinician-written rubrics weight each check by clinical importance and give zero reward for any actions we deem are critical safety violations that would harm a patient. We grade clinical actions directly against the final state of the EHR after the task ends, as models can write convincing notes but still take incorrect actions. We use an LLM evaluator only to check specific documentation requirements, asking it to cite evidence from the clinical note rather than judge whether the treatment was correct. Our clinicians calibrated the evaluator against their own reading of the same notes.

Clinical care rarely has a single right answer, and a fair grader should accept plans clinicians would defend. A rule-based grader is harder to game, but it can also fail a correct answer it did not anticipate. To address this, we reviewed every task the strongest frontier model failed in our pilot, and our clinicians reviewed model trajectories and widened rubrics wherever a different plan was still clinically sound. We made these corrections before any training began.

[Held-out patient]Base Qwen vs after post-training

Base Qwen skips the allergy list and the kidney calculation. After post-training, it does both.

A 40-year-old man on the blood thinner edoxaban has new lab results. His creatinine clearance (CrCl) is about 134 mL/min, and above 95 the US label says edoxaban should not be used for atrial fibrillation. He is allergic to apixaban.

Numbers show the order each model opened the chart. Blurred: never looked at.

Base Qwen3.8-27B
  1. never opened
  2. used eGFR 87 instead

Its noteRenal function and weight (106.4 kg) support continued edoxaban 60 mg daily for atrial fibrillation.

  • Kept edoxaban 60 mg
  • Also changed his insulin (22 → 24 units) without being asked

Fail

After post-training

Its noteRenal function is normal and stable, but CrCl ~134 mL/min is >95 mL/min.

  • Stopped edoxaban
  • Started rivaroxaban 20 mg once daily

Pass

Figure 3. Held-out task (not used in training), real, de-identified patient record. Kidney rule: the US Savaysa label's boxed warning,1 from the ENGAGE AF-TIMI 48 trial;2 CrCl by Cockcroft–Gault.3

Preventing reward hacking: We tested our grader for loopholes that an agent could exploit during training. An early version of our grader rewarded agents for doing nothing when no treatment change was needed, omitting treatment end dates (227/227), prescribing unnecessary additional drugs (285/285), and hedging between two answers (179/186). We incorporated 47 such strategies into our test suite and systematically closed every identified loophole. None of more than 36,000 adversarial attempts passed our final rule-based grader.

Designing the training around the model

Choosing the model: We wanted a model that could run on a single GPU, making it practical for health systems to deploy within their own infrastructure. Within this size class, we chose Qwen3.8-27B. The base model made repeated mistakes on pilot tasks around drug clearance and rules involving second medications, specific gaps in clinical knowledge and reasoning that we could address through post-training. With a baseline accuracy of just 35.7%, reaching frontier-level performance required substantial gains from post-training.

Targeted knowledge augmentation: We wanted to fine-tune the model only on verified expert demonstrations. However, we found knowledge gaps that these demonstrations alone did not adequately address.

For each clinical rule, we tested three points: whether the model (1) understood the rule, (2) could apply it to a patient's chart, and (3) knew when not to apply it.

This test revealed two different kinds of failure. When we provided the model with the relevant rule from the drug's prescribing information, performance on one rule went from 0 of 30 correct to 30 of 30, suggesting a gap in its clinical knowledge. Another rule improved only from 5 of 30 to 18 of 30 with the same help, suggesting that even when the model had access to the correct rule, it struggled to apply it.

Each failure required a different fix. For knowledge gaps, we added targeted facts from the FDA labels to the fine-tuning data, alongside the 1,123 verified demonstrations. For application failures, facts alone weren't enough, so we relied on later training stages where the model practiced applying each rule and learned from its own attempts.

Validated reasoning: We wanted the model (Qwen) to have full and proper reasoning behind each step. In rollout review, we verified that clinical calculations, patient-specific facts, and referenced rules were supported by the information available to the agent at each step.

Adaptive reinforcement learning: After fine-tuning, the model could still only solve 67% of tasks on attempt, however when given 8 separate trials, the model's performance improved. This indicated the model had the right knowledge but lacked consistency. We closed the consistency gap with rejection sampling4, which trains the model on its own passing attempts, and then GRPO5. Fine-tuning plateaued, and we noticed that the most meaningful gains came from learning from the model's attempts during RL.

[Method]Where the model puts its probability mass behavior the verifier passesheight = probability% = mass on passing behavior
Base modelQwen3.8-27B
35.7%
gap 7weak 10known 17

For each rule, a quiz tested whether the model knew it, could apply it to a chart, and knew when not to.

01 · SFTTargeted supervision
73.1%

FDA label facts for those rules and 1,123 verified teacher demonstrations shift mass onto passing behavior.

02 · SFTRejection sampling
84.1%
passed, keptfailed

Training on its own passes concentrates the mass.

03 · RLAdaptive GRPO
92.4%
mean0.62
above the group meanbelow

Each attempt is scored against its group's mean, so mass moves to higher-reward behavior. Mastered tasks retire.

Figure 4. Post-training moves the model's probability mass onto behavior the verifier passes (lime ground), then concentrates it. Each landscape's lime share equals the held-out pass rate after that stage; the shapes are illustrative. The objects below show real data: the base model's quiz map, the targeted training data, one task's eight attempts, and one training group's rewards around its mean.

Building our model-specific trainer

We identified several limitations in existing RL frameworks that led us to develop our own trainer.

Preserving small learning updates: We measured that individual reinforcement learning updates were so small that converting them to 16-bit precision significantly distorted their direction. We maintained trainable weights in 32-bit precision and avoided merging them into the base model during synchronization, allowing these small updates to accumulate across training steps.

Architecture-specific fine-tuning: Three-quarters of Qwen3.8-27B's layers use linear attention, which conventional fine-tuning configurations could overlook. We adapted our trainer to optimize both attention architectures while preventing information from leaking between independent training examples.

Training–inference consistency: We verified that the model receives identical token sequences during training and inference across thousands of agent trajectories, ensuring consistency between how the model learns and how it operates.

What reinforcement learning changed

We analyzed the model's interactions with the EHR to distinguish cases where the model assumed information from cases where the model's decisions were grounded in retrieved clinical information. As a result:

  • Successful episodes relying on patient information the model had never retrieved decreased from 3.7% to 0.7%.
  • Kidney-function-dependent dosing decisions made without retrieving the necessary information fell to zero.
  • Allergy checks before clinical actions increased from 29% to 59%. We had previously tried to improve this behavior through targeted supervised fine-tuning, with little success.

Supervised fine-tuning taught the model what a good answer looks like. After this stage, the model's notes cited weight and kidney function about as often as the expert notes did. However, SFT did not teach the model what a good answer depends on. When we tried targeted fine-tuning to make the model check allergies before acting, it had little effect.

Rejection sampling made the model more consistent, raising its pass rate from 73.1% to 84.1%. Because rejection sampling trains on every passing attempt, the training data also kept attempts that reached the right answer without reading the chart. Before RL, 3.7% of successful runs relied on information the model had never retrieved.

Reinforcement learning is what changed this behavior. We never explicitly rewarded the model for checking this information before acting. Instead, attempts that retrieved the relevant information earned higher rewards precisely when that information mattered to the clinical decision. Through reinforcement learning, the model learned to ground its decisions in the individual patient's unique context and when gathering additional evidence was necessary (Figure 5).

[What RL changed]Before vs after RL · 359 held-out tasks

After RL, the model reads the chart before it decides

Before RL, it sometimes guessed his weight. After RL, it reads it.Held-out patient: 89-year-old man on rivaroxaban 20 mg for atrial fibrillation. His chart lists his weight: 80.3 kg.
Before RLAge 89, male. Estimated CrCl (Cockcroft-Gault, assumed ~70 kg) ~55 mL/min.weight never opened
After RLAge 89, weight 80.3 kg (03/05/2026). Cockcroft-Gault CrCl = (140-89) x 80.3 / (72 x 0.92) = ~62 mL/min.weight read from the chart
Successful runs that relied on information never retrieved↓ Lower is better

3.7% → 0.7%

Before RL3.7%
After RL0.7%
Opus 5.50.8%
Kidney-dose decisions made before reading the weight↓ Lower is better

13 → 0

Before RL13
After RL0
Opus 5.59
Allergy list checked before the first order or note↑ Higher is better

29% → 59%

Before RL29%
After RL59%
Opus 5.540%
Figure 5. 359 held-out tasks. Opus 5.5 was run on the same tasks and analyzed the same way.

How we evaluate

Clinician-designed evaluation: Our clinicians designed the held-out evaluation set, and every task in it is based on de-identified patient records. Clinicians reviewed those records, clinical rules, and rubrics against FDA labeling, so the benchmark measures what a clinician would accept rather than what a generator happened to produce.

Held out by patient: The 359 evaluation tasks use patients the model never saw in training. No patient, name, or record is shared between the two sets. The tasks span multiple decision families, such as kidney-based dosing, drug switches, interacting drugs, and warfarin management, and also include cases where the right action is to change nothing.

Evidence-backed note grading: Our clinicians calibrated the evaluator that grades the clinical note. We tested whether breaking clinical note evaluation into narrow, evidence-backed yes-or-no questions improves grading accuracy. This approach matched reference labels on 477 of 479 checks (99.6%), compared to 388 (81.0%) using a single broad question. The evaluator also remained consistent across all 986 repeated checks.

Results

All models were evaluated under the same benchmark protocol, using the same clinical environment, tools, prompt, step limit, and clinician-designed grading criteria.

Each training stage built on the one before it. Reinforcement learning strengthens behavior the model already produces, and behavior with near-zero initial probability is hard for it to discover at all. Supervised fine-tuning supplied the prior that RL needed, placing probability mass on correct behavior and raising the pass rate from 35.7% to 73.1%. Imitation taught the model what a good answer looks like, but not how to produce one reliably, because it gives no signal on the model's own mistakes.

The remaining 19 points came from the model learning from its own attempts, first through rejection sampling and then through reinforcement learning. Reward redistributed that probability mass toward the attempts that reached the right decision for the actual patient and lowered the entropy of the model's decisions. Along the way, RL advanced capabilities that we never rewarded directly, such as thoroughly reviewing the chart before making dosing decisions. Our final model reached 92.4% accuracy, statistically level with Opus 5.5 at 90.8% and within the confidence intervals in Figure 1, while leading the other five frontier models by 12 to 24 percentage points.

Model / training stageHeld-out pass rate
Qwen3.8-27B (base)35.7%
+ Supervised fine-tuning73.1%
+ Rejection sampling84.1%
+ Reinforcement learning (Alterra)92.4%
Opus 5.590.8%
Gemini 4 Carbon80.2%
GPT-6.2 Astra79.7%
Gemini 4 Neon76.6%
Kimi K3.1 Pro72.7%
Grok 4.768.2%

A small open-weight model is also far cheaper to run. Our post-trained model fits on a single NVIDIA H200 GPU, and served that way, a task costs under 2 cents, about 25 times less than Opus 5.5.

[Inference cost]Pass rate vs cost per task ↖ Better

Frontier-level accuracy for under 2 cents a task

Post-trained Qwen3.8-27BPost-trained Qwen92.4% · $0.01792.4% · $0.017Opus 5.5Opus 5.590.8% · $0.4390.8%Gemini 4 CarbonCarbon80.2% · $0.6380.2%GPT-6.2 AstraAstra79.7% · $0.3479.7%Gemini 4 NeonNeon76.6% · $0.7876.6%Kimi K3.1 ProKimi72.7% · $0.2472.7%Grok 4.7Grok68.2% · $0.4768.2%
Figure 6. Held-out pass rate against inference cost per task on the anticoagulation workflow. Post-trained model: one rented NVIDIA H200 at $4.54 per GPU-hour, at the roughly 270 tasks per GPU-hour we measured. Frontier models: the providers' list API prices, with prompt caching. Hover or tap a point for its cost per passing task.

The errors that remain are narrow. In most of them, the model gathered the right evidence and got a single decision wrong. The hardest tasks left are those that stop one anticoagulant and start another. In these scenarios, the model has to make several related decisions about stopping the current drug, choosing and dosing the new one, and managing the transition. Each decision can depend on different information in the chart, and getting just one wrong fails the task. Dosing rules also differ by condition, and the model sometimes applies the rule for one condition to a patient with another. It also occasionally miscalculates creatinine clearance from values it did read correctly.

Post-training with Alterra Garden

We ran every stage of this work on Alterra Garden, our end-to-end platform for evaluating and training frontier AI models for health and life science. Garden started as the tool our clinicians used to build tasks from de-identified patient charts, write rubrics, and run frontier AI evaluations in our simulation environments; we have since extended it to cover the rest of the stack, from task generation and environment engineering to running rollouts, calibrating rewards/graders, and training open-weight models.

Because our clinicians, scientists, and researchers work on the same platform, what we learn about a model's behaviors shapes how we train it. Unifying these elements in a single platform allows us to accelerate the design and creation of clinically and technically meaningful training environments. By identifying a model's limitations and designing the training process around them, we can improve both its performance on specialized workflows and the reliability of how it carries them out.

We would love to build this way with more teams. Our customers and partners can use Garden the same way our own team does, with your clinicians and engineers working beside our experts and researchers from day one to build tasks from your own data, grade against your clinical standards, and train models to perform better on your priority workflows, with frontier intelligence that you own.

What's next

This work covers one clinical workflow. Medicine has thousands, and even the same workflow can vary across health systems. The public is increasingly trusting chatbots and personal health agents with more of their health. What we saw in this workflow matches what our clinicians find across many others: frontier models still miss steps a careful clinician would take when delivering care. And closing the gaps in real, clinically grounded care takes a well-trained team to curate and evaluate best-in-class training data.

Our clinical team is constantly working to expand the frontier of performance across the many unique workflows of healthcare. Whether you are training frontier models, building healthcare and life sciences products, deploying AI in a health system, or running research in pharma and biotech, we can show you where your models have room to improve on real clinical and scientific work and train them to close those gaps.

Our research team is already applying this approach to new workflows and tracking where frontier models still fall short with each new release. We are building the infrastructure behind models that improve healthcare delivery, drug discovery, and access to care at scale, and we'll have more to share soon.

References

  1. SAVAYSA (edoxaban) tablets, US prescribing information, Daiichi Sankyo. Boxed warning: reduced efficacy in nonvalvular atrial fibrillation patients with CrCl > 95 mL/min.
  2. Giugliano RP, Ruff CT, Braunwald E, et al. Edoxaban versus warfarin in patients with atrial fibrillation. N Engl J Med. 2013;369(22):2093–2104. doi:10.1056/NEJMoa1310907
  3. Cockcroft DW, Gault MH. Prediction of creatinine clearance from serum creatinine. Nephron. 1976;16(1):31–41. doi:10.1159/000180580
  4. Yuan Z, Yuan H, Li C, et al. Scaling relationship on learning mathematical reasoning with large language models. arXiv:2308.01825, 2023.
  5. Shao Z, Wang P, Zhu Q, et al. DeepSeekMath: pushing the limits of mathematical reasoning in open language models. arXiv:2402.03300, 2024.

Build with Alterra Labs

If you are training frontier models or in the business of delivering safe and reliable healthcare, we should talk.

[Get in touch]