Building Reliable LLM Workflows in Biotech Research

moderna · Healthcare · 2026 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.5 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Regulated biotech research and documentation workflows

Moderna's research data science team needed to help scientists automate low-value but correctness-sensitive documentation and analysis work in a regulated biotech environment without overusing autonomous agents or introducing uncontrolled data-security risk.

Constraints:

Architecture

Moderna's pattern is a protected workflow architecture, not an autonomous agent architecture. Humans curate source documents and declare intents; command-line tools read those documents, Python reports, and intent files; LLM steps draft regulatory-style documentation or reformatted outputs only where simpler Python or ML is insufficient. A non-LLM filter routes work from simple Python to simple ML to LLMs and avoids agents unless autonomy is genuinely necessary. Regulated data movement is guarded by permission mapping across source systems, destination stores, vector stores, model artifacts, and LLM traces. Evaluation is consequence-based: low-risk outputs can use repeatable human vibe checks on curated input sets, while clinical or regulatory outputs require stringent evals and error-mode characterization. Rapid experimentation and deployment use tools such as Marimo notebooks and Modal, but GxP validated systems may require internally hosted models rather than external APIs.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  research-scientists[Research scientists] --> curated-source-documents[Curated source documents]
  research-scientists --> intent-declarations[Intent declarations]
  curated-source-documents --> permission-mapping-layer[Permission mapping layer]
  curated-source-documents --> documentation-cli[Documentation CLI]
  intent-declarations --> documentation-cli
  python-reports[Python reports] --> documentation-cli
  documentation-cli --> non-llm-filter[Non LLM filter]
  non-llm-filter --> llm-drafting-step[LLM drafting step]
  llm-drafting-step --> trace-logging[Trace logging]
  llm-drafting-step --> evaluation-suite[Evaluation suite]
  permission-mapping-layer --> trace-logging
  permission-mapping-layer --> model-artifact-store[Model artifact store]
  model-artifact-store --> llm-drafting-step
  experimentation-stack[Experimentation stack] --> documentation-cli
  evaluation-suite --> documentation-cli
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Research scientists Domain users who curate source documents, define intents, and consume generated research or regulatory documentation. Curated source documents, Intent declarations, Documentation CLI
Curated source documents Laboratory records, reports, PDFs, and centralized-system documents selected by humans as necessary source material. Research scientists, Permission mapping layer, Documentation CLI
Intent declarations Human-authored descriptions of what the target document or workflow should produce. Research scientists, Documentation CLI
Python reports Existing computational reports and source files that the CLI reads alongside documents. Documentation CLI
Documentation CLI Command-line workflow that reads curated documents, reports, and intents, then drafts documentation into target formats. Curated source documents, Intent declarations, Python reports, LLM drafting step, Evaluation suite
Non LLM filter Decision gate that tries simple Python, then simple ML, then LLMs, and avoids agents unless required. Documentation CLI, LLM drafting step, Evaluation suite
LLM drafting step Generative step used for document reformatting, drafting, or style-sensitive outputs when simpler approaches are inadequate. Documentation CLI, Permission mapping layer, Evaluation suite, Trace logging
Permission mapping layer Maps source-document access rights to downstream S3 buckets, vector stores, model artifacts, and traces. Curated source documents, LLM drafting step, Trace logging, Model artifact store
Trace logging Captures LLM traces whose access rights must be governed like the underlying regulated documents. LLM drafting step, Permission mapping layer
Model artifact store Potential internally hosted or fine-tuned model artifacts whose access depends on source-document permissions. Permission mapping layer, LLM drafting step
Evaluation suite Curated inputs, side-by-side comparisons, human judgments, and stringent evals scaled to output consequence. Documentation CLI, Non LLM filter, LLM drafting step
Experimentation stack Marimo notebooks and Modal-style serverless infrastructure for rapid tool experiments and deployment. Documentation CLI, Evaluation suite

Data flow

A scientist curates source PDFs or reports and declares the intended document. The documentation CLI reads those source documents, Python reports, and intent declarations, then uses the non-LLM filter to decide whether simple Python, simple ML, or an LLM is justified. If an LLM is used, permission mapping must carry source-document authorizations into downstream storage, vector stores, model artifacts, and trace logs. Outputs are evaluated with a curated input set whose formality depends on consequences: quick repeatable human judgments for low-risk commit messages, stringent evals and error-mode characterization for clinical or regulatory outputs. Experimental tooling can be packaged in Marimo or deployed with Modal, while validated regulated systems may need internally hosted models.

5 supporting quotes
“I get the human goes to the code repository and they declare these are the documents that I have curated as necessary information”transcript, stated
“our CLI tool read the intents read the other source files thepy orts files and then draft the documentation for us.”transcript, stated
“machine learning model? And the decision-m process that I've gone through has always been like make a quick assessment if you can build it with just without an LLM. Cuz if you can build it without an LLM, you eliminate a whole boat boatload of stoasticity that you don't have to deal with”transcript, stated
“your vector database store needs to have the same security permissions that are matching to the original documents security permissions”transcript, stated
“You want to have a consistent suite of inputs that you work with like that is a non-negotiable. the level of formality. >> Can I spot you there just to >> you want essentially don't you want input output pairs with pass or fail as well in terms of your test”transcript, stated

Why this architecture

Moderna avoids autonomous agents because its valuable use cases are structured, correctness-sensitive workflows, not real-time customer-service autonomy. The non-LLM filter removes stochasticity where deterministic code or simple ML is enough. Permission-aware architecture dominates because regulated documents, model artifacts, vector stores, and traces can all leak protected information. The evaluation layer is consequence-aware so low-risk tools can move quickly while patient- or regulator-facing outputs receive much stronger validation.

5 supporting quotes
“"youtube" transcript_kind: "auto" --- # Building Reliable LLM Workflows in Biotech Research Surprise, we don't have agents. I actually went in and did an audit of all the LLM applications that we've developed internally. And if you were to take”transcript, stated
“versus agent, we don't have agents. I would not classify any of our applications as agents. They are however highly protected workflows. But then again, there's also the definition of what is an agent. Right? That was Eric Maher who leads research data science”transcript, stated
“if you can build it without an LLM, you eliminate a whole boat boatload of stoasticity that you don't have to deal with in in in your program. But then if it genuinely is not a simple Python program, for example, then move on to trying it with a simple”transcript, stated
“if you think about going to production, the thing you want in production is not supposed to be the novel thing. You want a reliable thing in production.”transcript, stated
“Basically, the level of evaluation should be commensurate with the consequences level of cone of consequences of a bad LLM output”transcript, stated

Models used: GPT-4o for an existing git commit message writer baseline · GPT-4.1 mini considered for a cheaper commit-message model · Open-source internally hosted LLMs for potential GxP validated systems · Simple ML models before LLMs when possible · Fine-tuned LLMs as a last resort for regulated document style or performance

Scale

Alternatives considered (roads not taken)

Build autonomous agents for the internal use cases

Rejected because: The business problems are better served by protected workflows and tool use; autonomous agents are rarely necessary.

“if you were to take Anthropic's definition of workflow versus agent, we don't have agents. I would not classify any of our applications as agents. They are however highly protected workflows. But then again, there's also the definition of what is an agent. Right? That”transcript, stated
“problem are you trying to solve? What do you actually want? What problems do you have? And rarely is an agent necessary. tool use may be necessary but ala anthropic rightthropics vision of what agents are and how we start by augmenting LLMs with memory information retrieval”transcript, stated

Reach for an LLM or agent first

Rejected because: Simple Python or simple ML removes stochasticity and failure points when it can solve the problem.

“machine learning model? And the decision-m process that I've gone through has always been like make a quick assessment if you can build it with just without an LLM. Cuz if you can build it without an LLM, you eliminate a whole boat boatload of stoasticity that you don't have to deal with”transcript, stated
“you don't necessarily want to go straight to an LLM agent because you're dealing with more stoasticity and more failure points.”transcript, stated

Switch the commit writer from GPT-4o to GPT-4.1 mini immediately

Rejected because: The cheaper model needed a repeatable eval against representative git diffs before the model change could be accepted.

“we were motivated to reduce the cost of the commit message writer by dropping back down to a slightly less accurate, slightly less powerful, but 80% cheaper model.”transcript, stated
“what I made the call on that pull request which is let's not roll let's not change the model this time round we should do an eval we've got we've collected a bunch of git diffs that are commonly representative of what the data scientists would end up committing inside their code repositories”transcript, stated

Use fine-tuning before retrieval and prompting

Rejected because: Fine-tuning is treated as a last resort for cases where RAG cannot reach required performance, internal hosting is required, or regulatory style must be learned.

“effectively bake in knowledge comp bake in and compress knowledge as part of the LLM weights. I actually agree that it should be the f the thing of last resort. Let me try to describe a hypothetical situation that I've played in my head that we may encounter in the future. We encounter”transcript, stated
“if you also need the model to adopt a certain style, then that's going to be challenging for a model that's not been specifically trained”transcript, stated

Rely on prompts alone to enforce authorization

Rejected because: Prompt-based security is only one layer, and system prompts can be jailbroken when leakage probability must be near zero.

“the system prompt gets set based on the user itself. I think that is a first layer of defense against an LLM leaking out information. It would of course we do know that like system prompts can be jailbroken. So it may in theory be possible but difficult, right? So possible but difficult to force”transcript, stated
“to to view. So you may need a suite of prompts to security is always Swiss cheese model, right? So there are holes in every mechanism. So you probably need to have multiple layers and then you need to reduce it down to a low enough probability of low enough and acceptable probability of data leakage”transcript, stated

Patterns

privacy-preserving-processing (security)

Regulated source-document permissions must be preserved across buckets, vector stores, model artifacts, and LLM traces.

“your vector database store needs to have the same security permissions that are matching to the original documents security permissions”transcript, stated
“Who gets access to the LLM traces in a regulated environment? Is it just the data scientist? But then what if the data scientist?”transcript, stated

eval-driven-development (quality)

Model and workflow changes use curated input suites, side-by-side comparisons, human judgment, or stringent evals depending on consequence.

“Your inputs to the LLM must be a curated set that you consistently use over time that you expand as you find new edge cases.”transcript, stated
“So, yeah, vibe your way through, but if the outputs really matter, then your evals really matter. >> I couldn't agree more.”transcript, stated

model-routing (modeling)

The team explicitly gates model changes, comparing GPT-4o and GPT-4.1 mini on representative diffs before accepting a cheaper model.

“Here's what the commit messages look like under 40. Here's what they look like under 4.1 mini.”transcript, stated
“we just need a human to do a quick snap judgement on whether the commit new commit messages are going to be good enough or not.”transcript, stated

rag-retrieval (retrieval)

RAG is considered before fine-tuning for regulated document knowledge, but the same permissions and trace-access problems apply to vector stores.

“Finetuning is usually explored as an alternative to rag methods primarily to get us around LLM limitations”transcript, stated
“And the same goes for the vector store. If you have to do the same thing, two documents and then transform it into vector store.”transcript, stated

fine-tuning-adaptation (modeling)

Fine-tuning remains an option for internally hosted regulated systems when RAG cannot produce enough hands-off performance or regulatory style.

“if this is going to be part of a GXP validated system we need to move off an API provider and onto an internally hosted LLM.”transcript, stated
“if you want the drafting process to be much more regulatory sounding, you're going to have to do a fine-tuning exercise there.”transcript, stated

batch-offline-processing (workflow)

The main production use case is structured document reformatting and drafting, where humans provide curated sources and intents for an offline CLI workflow.

“document reformatting is literally the theme for automated documentation writing that command line tools that we've built as well.”transcript, stated
“A lot of it is really just falls under the realm of document or information reformatting into a target format.”transcript, stated

Tradeoffs

Use protected workflows instead of agents

Chose Structured LLM workflows with human-curated sources and intents over Autonomous agents with broad tool-choice autonomy.

Rationale: The biotech use cases do not need real-time autonomous action; reliability and regulatory fit matter more.

“I do not believe I would not classify any of our applications as agents. They are however highly protected workflows.”transcript, stated
“we don't sell consumer products. So we don't really have uh big need for customer-f facing agents”transcript, stated

Automate intellectual drudgery

Chose Document reformatting and regulatory drafting workflows over High-autonomy scientific decision-making.

Rationale: The value is freeing humans from tedious reformatting while letting scientists retain source curation and intent control.

“there's not a lot of intellectual work that goes into reformatting information that it like getting a human to click around on another system”transcript, stated
“filling forms is not high filling forms that are not like HTML forms but like free form forms.”transcript, stated

Run a non-LLM filter before using generative AI

Chose Simple Python, then simple ML, then LLM only when needed over Defaulting to LLMs or LLM agents.

Rationale: Simpler methods remove stochasticity and reduce production failure points.

“if you can build it without an LLM, you eliminate a whole boat boatload of stoasticity”transcript, stated
“if it genuinely is not a simple Python program, for example, then move on to trying it with a simple model.”transcript, stated

Delay an 80% cheaper model switch until evals run

Chose Side-by-side evaluation on representative diffs over Immediate cost-driven downgrade from GPT-4o to GPT-4.1 mini.

Rationale: The model was cheaper, but the team wanted repeatable evidence that output quality remained good enough.

“we've collected a bunch of git diffs that are commonly representative of what the data scientists would end up committing”transcript, stated
“It's a quick vibe check, but it's a vibe check that is very repeatable because we have the same benchmark diffs”transcript, stated

Use fine-tuning only for constrained regulated cases

Chose RAG and prompting first, fine-tuning as a last resort over Fine-tuning as the default way to adapt models.

Rationale: Fine-tuning may be necessary for internally hosted GxP systems or regulatory drafting style, but it brings artifact-permission and hosting complexity.

“you use fine-tuning when you want to bake in effectively bake in knowledge comp bake in and compress knowledge as part of the LLM weights.”transcript, stated
“So that's probably that's that's the scenario that I've played out in my head for my regulatory colleagues and CMC colleagues when they and I think it's a low probability event that we'll need to hit fine-tuning, but we've not let our ball we've not let that ball drop, right?”transcript, stated

Gotchas (what bit them)

Permission mapping becomes the dominant implementation problem.

Root cause: Data moves from regulated source systems into new buckets, vector stores, models, and logs while identity systems vary across Active Directory, Okta, internal systems, and vendors.

Resolution: Treat authorization propagation as a business-process and security-design problem before training or embedding regulated data.

“The big one is when you build either a rag system or you build a fine-tuning pipeline, data access authorization becomes a huge problem because if you are going to pull data from you might yourself be authorized as the data scientist to pull data out.”transcript, stated
“some systems are on active directory some systems are on our internal, some systems are on Octa, some systems have their own vendor proprietary”transcript, stated

Fine-tuned model artifacts inherit ambiguous access rules.

Root cause: A model trained on documents with different permission sets may probabilistically reveal information from any source document.

Resolution: Resolve who may access model artifacts before fine-tuning across permission boundaries.

“If a doc if an LLM is trained on documents that had different sets of permissions, who has access to the LLM?”transcript, stated
“the LLM will naturally have a probability of spilling out information from a document.”transcript, stated

LLM traces can leak regulated source information.

Root cause: RAG and fine-tuning logs contain data derived from original documents, while trace viewers may not share the same authorization set.

Resolution: Govern trace access as carefully as source-document, vector-store, and model access.

“You need if your fine-tuning pipeline is logging information while doing the fine-tuning training and the logs also or if you're doing rag and you're keep logging all your traces which by the way I think Hugo has probably emphasized this teen times to everyone in the class.”transcript, stated
“Should they get access to the traces? But what if the line management wasn't authorized on the docs?”transcript, stated

Novel agent designs add stochasticity and failure points without necessarily adding business value.

Root cause: The work can often be done with protected workflows, simple Python, or simple ML rather than autonomous tool choice.

Resolution: Apply the non-LLM filter and escalate only when simpler methods are inadequate.

“the thing you want in production is not supposed to be the novel thing. You want a reliable thing in production.”transcript, stated
“you don't necessarily want to go straight to an LLM agent because you're dealing with more stoasticity and more failure points.”transcript, stated

Low-formality evals do not transfer to high-consequence outputs.

Root cause: A bad commit message is cheap, but a clinical or regulatory output can affect patients or product approvals.

Resolution: Scale from repeatable vibe checks to stringent evals and error-mode characterization based on consequence.

“If the consequences of a bad LLM output imply life and death for a patient in the clinic, I'm going to put as many evals as I can”transcript, stated
“if it means the difference between regulators approving or not approving a product to move from one phase to the next”transcript, stated

External API models may be unusable for GxP validated systems.

Root cause: Validated regulated systems may require internally hosted model weights even if API models perform better on long-document drafting.

Resolution: Use APIs for early baselines, but plan for internally hosted open-source models and possible fine-tuning when validation demands it.

“if this is going to be part of a GXP validated system we need to move off an API provider and onto an internally hosted LLM.”transcript, stated
“the open source LLMs, they're great for certain use cases, but I think they have not proven their metal against the API hosted GPT40”transcript, stated

Evaluation

Moderna's evaluation stance is consequence-based. Every workflow needs a curated, reusable input set; low-risk tools can use repeatable human judgments or side-by-side comparisons, while clinical and regulatory workflows require stringent evals, error-mode characterization, and ongoing expansion of edge cases. Model changes, such as moving from GPT-4o to GPT-4.1 mini, are checked against representative diffs before rollout.

Metrics: Curated input-set coverage · Human pass/fail or quick snap judgment for low-risk outputs · Side-by-side output quality under GPT-4o versus GPT-4.1 mini · Error-mode characterization for high-consequence outputs · Consequence level of a bad LLM output · Human offload target such as 95 to 98% of cases for a potential fine-tuning need · Failure rates from comparable custom algorithms, such as 2 to 5% or higher in difficult chemistry

4 supporting quotes
“known curated inputs to an LLM. That is a must have whether you're doing like proper full-on test harness”transcript, stated
“Let's if we think about it this way, the non-negotiable is your input set. Your inputs to the LLM must be a curated set that you consistently use over time that you expand as you find new edge cases.”transcript, stated
“We're going to make sure that there's like proper characterization of the error modes of the LLM”transcript, stated
“>> Constantly iterate on this. It's dynamic. It's organic. >> Yeah, >> has a great comment about whether using Laura as an adapter fine-tuned on based on permission levels so that for each query you could have a config for which Laura adapter was used.”transcript, stated

Outcomes

Concrete scale includes a six-person research data science team, an 80% cheaper candidate model, two-minute low-stakes commit-message impact, potential 95 to 98% human offload threshold for fine-tuning, and observed 2 to 5% or sometimes 50% failure rates in comparable non-LLM scientific automation. No production document volume or latency is reported.

4 supporting quotes
“I'd actually went in and did an audit of all the LLM applications that we've developed internally.”transcript, stated
“>> A lot of regulatory work is just filling forms, right? So that just ends up being the big theme in filling forms that are not HTML forms but free form forms.”transcript, stated
“document reformatting is literally the theme for automated documentation writing”transcript, stated
“there are so many data security issues that we have to work through that in a regulated environment that it becomes quite heavy weight”transcript, stated