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 Anthropic’s definition of workflow versus agent, we don’t have agents. I would not classify any of our applications as agents. x Eric Ma, who leads Research Data Science in the Data Science and AI group at Moderna, joins Hugo on moving past the hype of autonomous agents to build reliable, high-value workflows. We discuss: * Reliable Workflows: Prioritize rigid workflows over dynamic AI agents to ensure reliability and minimize stochasticity in production environments; * Permission Mapping: The true challenge in regulated environments is security, specifically mapping permissions across source documents, vector stores, and model weights; * Trace Log Risk: LLM execution traces pose a regulatory risk, inadvertently leaking restricted data like trade secrets or personal information; * High-Value Data Work: LLMs excel at transforming archived documents and freeform forms into required formats, offloading significant “janitorial” work from scientists; * “Non-LLM” First: Solve problems with simpler tools like Python or ML models before LLMs to ensure robustness and eliminate generative AI stochasticity; * Contextual Evaluation: Tailor evaluation rigor to consequences; low-stakes tools can be “vibe-checked,” while patient safety outputs demand exhaustive error characterization; * Serverless Biotech Backbone: Serverless infrastructure like Modal and reactive notebooks such as Marimo empowers biotech data scientists for rapid deployment without heavy infrastructure overhead. You can also find the full episode on Spotify, Apple Podcasts, and YouTube. You can also interact directly with the transcript here in NotebookLM: If you do so, let us know anything you find in the comments! 👉 Want to learn more about Building AI-Powered Software? Check out our Building AI Applications course. It’s a live cohort with hands on exercises and office hours. Our final cohort is in Q1, 2206. Here is a 35% discount code for readers. 👈 https://maven.com/hugo-stefan/building-ai-apps-ds-and-swe-from-first-principles?promoCode=vgch 👉 Eric & Hugo have a free upcoming livestream workshop: Building Tools for Thinking with AI (register to join live or get the recording afterwards) 👈 Show notes * Eric’s website * Eric Ma on LinkedIn * Eric’s blog * Eric’s data science newsletter * Building Effective AI Agents by the Anthropic team * Wow, Marimo from Eric’s blog * Wow, Modal from Eric’s blog * Upcoming Events on Luma * Watch the podcast video on YouTube * Join the final cohort of our Building AI Applications course in Q1, 2026 (35% off for listeners) Timestamps 00:00 Defining Agents and Workflows 02:04 Challenges in Regulated Environments 04:24 Eric Ma's Role at Moderna, Leading Research Data Science in the Data Science and AI Group 12:37 Document Reformatting and Automation 15:42 Data Security and Permission Mapping 20:05 Choosing the Right Model for Production 20:41 Evaluating Model Changes with Benchmarks 23:10 Vibe-Based Evaluation vs. Formal Testing 27:22 Security and Fine-Tuning in LLMs 28:45 Challenges and Future of Fine-Tuning 34:00 Security Layers and Information Leakage 37:48 Wrap-Up and Final Remarks 👉 Want to learn more about Building AI-Powered Software? Check out our Building AI Applications course. It’s a live cohort with hands on exercises and office hours. Our final cohort is in Q1, 2026. Here is a 35% discount code for readers. 👈 https://maven.com/hugo-stefan/building-ai-apps-ds-and-swe-from-first-principles?promoCode=vgch Get full access to Vanishing Gradients at hugobowne.substack.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00Surprise, 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 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 productive workflows. But then again, There's also the definition of what is an agent, right?
SPEAKER_02That was Eric Ma, who leads research data science in the data science and AI group at Moderna Therapeutics on moving past the hype of autonomous agents to build reliable, high value workflows. Now the year of agents is over. Ha ha. And we're getting further into the decade of agents, as Karpathy has called it. We're seeing more nuanced ideas emerge of what agentic even means.
SPEAKER_00Autonomy is what defines agency. But then I have a very microscopic example that can maybe even challenge that definition too, right? I built a Git commit message writer. It has the choice to decide what is the scope of of the commit. Is this a feature? Is this a CI improvement? Is this a bug fix? Is this something else? So now is the choice of the commit type, is that something that the LLM has agency over?
SPEAKER_00In this episode, Eric offers a pragmatic look at applying large language models and frontier models
SPEAKER_02within a complex biotech research environment. We dive into the value of automating what he calls intellectual drudgery, specifically how LLMs can quantify the unquantified by reformatting laboratory records for regulatory submissions. Eric pulls back the curtain on the technical nightmare of security and permission mapping in regulated industries.
SPEAKER_00A lot of regulatory work is just filling forms. Right. So that just ends up being the big theme and filling forms that are not HTML forms, but free form forms. There's documents you have to write. So that ends up being a huge time saver when the application is built correctly. But there are so many data security issues that we have to work through that in a regulated environment, that it becomes difficult. quite heavyweight.
SPEAKER_02Eric also shares his essential non-LLM filter, the practice of using simple Python or traditional machine learning before reaching for generative AI. We also discuss why evaluation rigor must be matched to the consequence of the task at hand and how a modern stack involving serverless infrastructure like modal and reactive notebooks like Marimo allow his team to operate at the speed of thought. This conversation was a Q&A from a recent cohort of our course, Building AI-Powered Applications, which I have the great pleasure to co-teach several times a
year with Stefan
SPEAKER_02Krauchik, who works on AI agent infrastructure at Salesforce. Links in the show notes if you're interested. We also live stream many of our podcasts and free workshops at Vanishing Gradients. We have a lot of exciting ones to kick off for you, including one with Eric, actually, on using AI to build tools that help you think. Check out the Vanishing Gradients Luma calendar and subscribe to ourSubstack newsletter and YouTube channel. All links are in the show notes. If you enjoy the show, the best way to support it is to share this episode with a friend or colleague who you think would get something out of it also.
SPEAKER_02I'm Hugo Bowne-Anderson, and welcome to Vanishing Great. Welcome, everybody. I need to admit a few more people. Hey, everyone. As always, we would love cameras on, if possible, and microphones off, except when talking. Thank you all for joining. Oh, it's been a long day. What is up, my dear friend, Eric Maher? The ceiling. No, I'm just joking. And he says the sky's up. Yeah. When someone says nice to see you, he always says nice to be seen. That's a good one.
Maybe it gives a bit of insight into my upbringing and why I'm such a fool.
SPEAKER_02Eric. Thank you for joining us at this late hour. It's after dinner in Boston.
SPEAKER_00My pleasure. Yeah, it definitely is. But yeah, anytime you go, anytime. And is spring springing there? Because I presume it's been a long winter. Spring is springing here. And it's also the season I hate the most. allergies allergies exactly finally i don't want to get into this too much but allergies in the northeast of the u.s are pretty bad for me they're way worse in sydney because of all the oh they are we have okay it's totally brutal but look i'm
SPEAKER_02really excited to introduce eric ma who's an old dear friend we met About a decade ago now. Wow. Look at that. ODSC up in Boston when you were teaching a workshop on Network X that I just loved so much. I've always learned so much from you. And we've collaborated on courses over the years and lots of different things together. And you're now at Moderna. So I just wonder if you could start by just telling us a bit about what you do there and what you're up to.
SPEAKER_00Yeah, definitely. So I'm part of the Moderna research for digital for research organization. Specifically, I'm a team lead of a small team of data scientists. There are six of us in total. So myself and five others. We serve the research organization and our work is basically science, interacting with laboratory scientists. We co-design experiments. We help out sometimes when the stats team doesn't have enough capacity, we help out with statistical analysis. We built custom machine learning models.
SPEAKER_00reverse engineer algorithms from academic literature, all in the service of making molecule discovery faster, making discovery science run at the speed of thought and to quantify unquantified. That's been the mission of the team. So it's pretty fun because it's a position. It's a, the nature of the work is, Leverages the scientific training that I had in grad school and undergrad. So almost 10 years of life sciences training and chemistry training. But also not only does it tickle the science hat that I tickle the science side,
SPEAKER_00it also tickles the digital side. So like... We deliver things that are packaged. We deliver our work products as like software effectively. So machine learning models or custom algorithms that are wrapped inside a command line interface. And it's a wonderful position to be in because we get to build high power tools for scientists. It's incredibly cool. And we were fortunate enough to have you join us in our January cohort to talk
SPEAKER_02about information retrieval systems at Moderna. And in our course wiki, everyone here is part of the course. You'll have access to the first session Eric gave, which was a Q&A. And that's how we're structuring this as well. So Eric and I will chat for a bit and then open it up to any questions you have and feel free to put them in the chat for sure. Last time it was about information retrieval and RAG. And I said... you why don't we come and talk about agents at moderna now and being a bit yeah cheeky because agents aren't necessarily well defined and
there's a path to agentic systems so with that the slight hedge i'm wondering if you could start by telling
SPEAKER_02us about agents ai and llm agents at moderna eric
SPEAKER_00Yeah, two things. 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 Anthropic's definition of workflow versus agent, we don't have agents. I do not believe I would not classify any of our applications as agents. They are, however, highly productive workflows. But then again, there's also the definition of what is an agent, right? Like I think in January at Moderna, we hosted a Boston, Pi Data Boston Cambridge event.
SPEAKER_00And I spoke as, I played double duty as both the host and the speaker. And in it, my top question was like, what exactly is an agent? And I think there were lots of philosophical questions We had, it was a live coded thing. I have a blog post I'm happy to share and the whole Marimo notebook on that as well. But I think it definitely prompted a lot of thinking and discussion. And I think we left that talk with no answers, but more precise questions. Like how do we think about what constitutes an LLM agent for that matter?
SPEAKER_00Yeah. So surprise, we don't have agents at Moderna and I'm not surprised either because actually when I think about the application space for agents, usually you would think about it. The anchoring example that I go with is like a flight booking agent. So you'd give a very defined but broad scope of tasks that a human would do. And now you're just asking LLM to do that. And you interact with a set of APIs and the likes. And that sort of customer service type of category is where I think agents,
SPEAKER_00LLM agents probably have the most they probably have the most applicability. Now, if you think about like how a biotech organization operates, we don't sell consumer products. So we don't really have a big need for customer facing agents, so to speak. But there are uses for responding to humans in a more, how do I put it, regulated, like responding to other regulator questions and the likes. And that is a place where LLMs can really help accelerate the process,
but they don't demand the near real-time sort of nature that you would think of when you're thinking about a flight booking agent or a customer service LLM agent.
SPEAKER_00I really appreciate you demystifying that for us.
SPEAKER_02And actually, I'm incredibly attracted to the statement From these definitions of agents, we don't have agents because I have a lot of people who ask me to help them build agents, to consult, to teach and that type of stuff. And I say, what business 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 a lot anthropic, right? Anthropic's vision of what agents are and how we start by augmenting LLMs with memory, information retrieval, and tool usage.
And then there is just some common workflows and patterns that we then use. And they define agents as AI systems that dynamically choose their own tools that they use.
SPEAKER_02So one example would be if a tool, if an LLM has access to three ways to search the web, and I'm like, hey, can you find this information? It will... use Kavali or Reddit search tool or whatever. And these types of things, I don't necessarily see a lot of use cases for, but is that really how you think about differentiating agents from augmented workflows?
SPEAKER_00Yeah, I think the notion of autonomy definitely is. But then that notion of tool choice autonomy, like autonomy is what defines agency and agency is the root word for agent or sorry, agent is the root word for agency the other way around. But then think about it. I have a very microscopic example that can maybe even challenge that definition too, right? Like I built a Git commit message writer. And I come back to this as the anchoring example for personal productivity tooling. Now, as part of the git commit message writer,
SPEAKER_00it has the choice to decide what is the scope of the commit. Is this a feature? Is this a CI improvement? Is this based on the description of the diff, for example? Is this a CI improvement? Is this a bug fix? Is this something else? Especially if you adhere to what is it called? The conventional commits convention for writing git commit messages and you want to automate that. So now is the choice of the commit type, is that
SPEAKER_00something that the LLM has agency over. It's making a choice, it's doing without human intervention, but it's also trying to find, we're also saying it has to find some kind of right answer. So it's, I'm not saying that the definition is bad, but there are possibly an edge there. There's a space where the definition runs a little blurry, right? And whether we want, I can perhaps legitimately claim that my Git commit message writer has agency, But then if you take a step back, it's not really useful agency.
SPEAKER_00Like it's solving one really minute piece of the bigger problem. And so in terms of its business impact, not really. It's not like an agent that's autonomously booking flights for me or something.
SPEAKER_02Yeah, that makes perfect sense. And I do think in a lot of ways, agent is a marketing term as well. That's my own personal take. It's not only my personal take, but I don't want to say when you tell me you want to build an agent that you shouldn't build a marketing term. But I am so fascinated that you don't need agents at this point. So I'm wondering if we could drill a bit deeper into the types of problems you face at Moderna and what you think to solve them.
SPEAKER_00Yeah, yeah. There's a lot of document reformatting. Let's put it in the form of like, we've got source information from laboratory experiment records, reports that are stored and archived in a centralized system. And then what we need to do is we need to reformat the contents of those PDFs. They don't store the raw text, they store PDFs. And we need to store the contents of those, reformat the contents of those PDFs into a different,
SPEAKER_00a thing that gets used and submitted to regulators, for example. So it's like documents that are part of regulatory submissions. And those are... Those are like the big use cases. And you can think about the business value there, right? There's not a lot of intellectual work that goes into reformatting information, like getting a human to click around on another system and manually search for stuff. So you might as well build the automation somehow that allows them to go, OK, help me go find From this set of curated documents that I,
SPEAKER_00the human, know of already, helped me go and reformat this into the way that's needed. So document reformatting is a big one that I've seen my colleagues do. Because even though I'm the research org, I'm actually still in digital. So I actually do spend a lot of time thinking about how do we make our digital folks more efficient and more. Document reformatting is literally the theme for automated documentation writing that command line tools that we've built as well. And I get a human goes to the code repository and they declare,
SPEAKER_00these are the documents that I have curated as necessary information for markdown file that I want to write. And then I also have my intents declared. And our CLI tool, read the intents, read the other source files, the .py or .ts files, and then draft the documentation for us. A lot of it really just falls under the realm of document or information reformatting into a target format, like basically filling in a form. If you really think critically about it, all we're doing is like a lot of regulatory work is just filling forms.
SPEAKER_00Right. So that just ends up being the big theme and like filling forms is not high. Filling forms that are not like HTML forms, but like free form forms. There's documents you have to write. So that ends up being a huge time saver when the application is built correctly. But there are so many data security issues that we have to work through that in a regulated environment, that it becomes quite heavyweight, right? Like I operate, thankfully, mostly in the research and digital primarily orgs,
SPEAKER_00but for my colleagues in CMC manufacturing, as well as in the clinical development world, they have to deal with a lot of regulatory overhead.
SPEAKER_02That makes a lot of sense. I am interested in these systems when you do build them and help people build them. What are the types of challenges or issues expected and otherwise that just like some gotchas for people who are starting to embark upon building these systems?
SPEAKER_00Yeah. Okay. I'll probably take the angle from if you are in a regulated environment, because I've talked with the infra folks and I've talked with my counterparts in the data science teams that serve clinical development and regulatory, as well as like CMC manufacturing. 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. But now you're pulling it from a regulated system where you can view it to now you might be storing it inside an S3 bucket now that suddenly has wide open permissions.
SPEAKER_00That's not allowable. So you need to ensure the data security from the time you take the document out and then you put it inside either an S3 bucket for your fine tuning pipeline, or if you're embedding it and storing the embeddings, then your vector database store needs to have the same security permissions that are matching to the original documents security permissions and mapping those permissions, I tell you, is a nightmare because some systems are on Active Directory, some systems are on our internal,
SPEAKER_00some systems are on Okta, some systems have their own vendor proprietary and like mapping. Literally, this is just an email address mapping exercise, but like it's so difficult because some of our vendors are not the best at giving us that information. It's stupid, but those are the stupid problems you have to work through to make these applications work. And then comes the model security. If an LLM is trained on documents that had different sets of permissions,
SPEAKER_00who has access to the LLM? Because the LLM will naturally... have a probability of spilling out information from a document. So let me give you an example. Document A, three people are authorized to view it. Document B, a different set of four people are authorized to view it. Now, for whatever use case, we needed to fine tune an LLM on both sets of documents. So now we have an LLM artifact. Who gets access to that LLM artifact? Not sure, not sure. It's not an easy problem.
SPEAKER_00Those are crazy business problems, business process problems that need to be worked through first that before you can even like think about LLMs being trained. And the same goes for the vector stores. You have to do the same thing, two documents and then transform it into a vector store. Who gets access to the vector store? And by derivative, then who gets access to the LLM? It is very challenging to solve these problems. 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,
SPEAKER_00which by the way, I think Hugo has probably emphasized this umpteen times to everyone in the class. Are you logging your traces, right? Are you logging your LLM traces somewhere? Who gets access to the LLM traces in a regulated environment? Is it just the data scientist? But then what if the data scientist Yeah, the data scientists might be involved in like the RAG system, for example, building the RAG system. But should the three people plus four people whose authorization was on the original docs also get access to the traces?
SPEAKER_00And what about the data scientists line management? Should they get access? to the traces, but what if the line management wasn't authorized on the docs? You see where I'm going with this, right? It's a big, one big hairy problem. And there's no, there are no set patterns for this. And so those are like, that is one big, big, big, big, big, big problem to work through when operating in a regulated environment. But then even then, let's say you're not operating in a regulated environment, like the tools that I build that are LLM-based for my digital colleagues and for my
SPEAKER_00research colleagues. You're then faced with the question, how do I build an agent? Do I build a workflow? Do I build a custom Python program? Do I just build a simple machine learning model? And the decision-making process that I've gone through has always been like, make a quick assessment if you can build it just without an LLM. Because if you can build it without an LLM, you eliminate a whole boatload of stochasticity that you don't have to deal with 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 model.
SPEAKER_00And if a simple model doesn't work, then try it with an LLM or skip to the LLM if you know that it's a waste of time. But then even then, you don't necessarily want to go straight to an LLM agent because you're dealing with more stochasticity and more failure points. I think the part that is exciting about agents is that it's novel. But 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. So all the practices that Hugo is probably teaching,
SPEAKER_00which is start with your data, evaluate any changes against data, against known benchmark set of data. log every LLM trace, like those all apply. Recently, our git commit message writer, we wanted to make a change from GPT 4.0 to GPT 4.1 mini. And I'm personally okay with that change going from like a... I'm personally okay with changing models if it means going from a model that's less powerful to more powerful. But now we were motivated to reduce the cost of the commit
message writer by
SPEAKER_00dropping back down to a slightly less... accurate, slightly less powerful, but 80% cheaper model. And what I made the call on that pull request, which is, let's not roll, let's not change the model this time around. 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. And we've got old commit messages logged locally in a SQLite database for folks.
And so then now we can take advantage of that information and just do a side-by-side experiment.
SPEAKER_00Here's what the commit messages look like under 4.0. Here's what they look like under 4.1 mini. And in this particular case, We just need a human to do a quick snap judgment on whether the new commit messages are going to be good enough or not. That is the level of formality for the eval that's required. We don't need to go full on like scoring things one to a hundred and whatever. It's a quick vibe check, but it's a vibe check that is very repeatable because we have the same benchmark diffs available for changing models.
SPEAKER_00And so that becomes that's the process for changing models. And I think that was that one was like a microcosm of what how we're supposed to do changes to LLM applications to begin with. Sorry, I rambled there and monologued a lot there.
SPEAKER_02Oh, no, dude, I wanted I wanted that. That's one of the reasons I've invited you on the amount of I'm going to say insights because I'm too LLM trained, but insights per minute, Eric Ma should be the name of this show. It's a high signal to noise. I am. And dude, in all honesty, I'm trying to tell people not to use agents while you're playing 4D chess and telling people, do they even want to use LLMs? That's like boss level maneuvers. I am interested. There are several directions we could move in here. I do want to maybe come back to fine tuning at some point,
SPEAKER_02but I am interested in the evaluation question. And I love that you've said you can do this via vibes. And I have encouraged people to... When you build out an MVP, do an MVE, minimum viable evals. And that can be vibe-based. You can also just use your annotated set to build like a basic harness, essentially, right? With LLM as a judge, maybe some fuzzy matching, whatever it is. And I just think... Something we talked about in our first workshop this week was just thinking through that, how much this is like machine learning product building and
data science product
SPEAKER_02building. You do, you have a test set, right? And then it isn't straightforward as ML where it's because it's classification or regret and you can actually, you've got your error function, loss function and that type of stuff. But what you can do here is use the test set to start doing this vibe based as you've suggested in this diff case. the Git commit case, but you can also start to build out a basic harness. And I'm just wondering how you think about when to do things by based or when to start building out a basic harness and what that process looks like.
Yeah, I think the, okay, so definitely you want to have known curated inputs to an LLM.
SPEAKER_00That is a must-have. Whether you're doing like proper full-on test harness with automated or human evaluated scoring, or whether you're doing it vibe-based, you want to have a consistent suite of inputs that you work with. Like that is a non-negotiable.
SPEAKER_02The level of formality... Essentially, don't you want input-output pairs with pass or fail as well in terms of your test
SPEAKER_00set? It depends then, right? If you have pass or fail levels, If you have pass or fail labels for your outputs, that's an added level of formality that you're tagging along. 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. That is a non-negotiable. Then you have the output. So in the case of the git commit message writer,
I can get 4.0 to generate commit messages.
SPEAKER_00And I can assign them pass, fail, pass, whatever. More often than not, it's just looking very quickly at the diff and looking at the commit message. And looking at the commit message, you can gauge by eye very quickly whether this does what you want. And so the consequences of getting a bad commit message aren't as high. And if the consequences aren't high, I'm comfortable vibing my way through. the outputs and going, sure, that's fine. If the consequences of a bad LLM output imply life and death
for a patient in the
SPEAKER_00clinic, I'm going to put as many evals as I can on that LLM output. And if it means the difference between regulators approving or not approving a product to move from one phase to the next, I'm also going to put much more stringent evals on there. We're going to make sure that there's like proper characterization of the error modes of the LLM and we've worked our way to minimize those error modes as much as possible. Yeah. And that's the playbook. Basically,
SPEAKER_00The level of evaluation should be commensurate with the consequences, level of degree of consequences of a bad LLM output. Because a git commit message, like it doesn't matter. Someone's maybe going to be confused for two minutes in the future looking at the commit history, but it's not part of anything regulatory. So yeah, vibe your way through. But if the outputs really matter, then your evals really matter.
SPEAKER_02I couldn't agree more. And also on top of that, one thing we have that's really lovely here is if that happens with the git commit message, for example, then you have something else to add to your eval set as well, right?
SPEAKER_00That's right.
SPEAKER_02Constantly iterate on this. It's dynamic. It's organic. Yeah, she has a great comment about whether using LoRa as an adapter fine-tuned based on permission levels, so that for each query, you could have a config for which LoRa adapter was used. And I'm wondering if that's something you've thought about.
SPEAKER_00It's an interesting architecture. So you basically say the LoRa adapters are tied to permissions of the doc, for example. That can work if you can straighten out the permissions, how the permissions of the doc link to the LoRa permissions, of course, which is, if you think about it, it's at its core, it's a great idea from a technical perspective. That said, it doesn't have any fundamental difference from whole model weights versus just the LoRa adapter weights.
SPEAKER_00The nature of the problem is still the same. If three people on one dock, four people on another dock, and I fine tune on all seven on both sets of docks, do all seven get access to that LoRa adapter weights? That's still an open question. And that's actually not a science question. It's a business process.
SPEAKER_02Now for a word from our sponsor, which is, well, me. I teach a course called Building AI-Powered Software for data scientists and software engineers with my friend and colleague, Stefan Krauchik, who works on agent force and AI agent infrastructure at Salesforce. It's designed for people who want to go beyond prototypes and actually ship AI-powered systems. The link's in the show notes. I am interested because I tend to tell people fine tuning often should be one of your last resorts and you should try retrieval,
SPEAKER_02prompting, this type of stuff beforehand. So I'm wondering, firstly, if you agree with that or push back, and I always welcome pushback. And if so, why you're doing fine tuning?
SPEAKER_00Yeah, okay. Fine tuning is usually explored as an alternative to RAG methods, primarily to get us around LLM limitations, right? Like you use fine tuning when you want to bake in effectively bake in and compress knowledge as part of the LLM weights. I actually agree that it should be the thing of last resort. Let me try to describe a hypothetical situation that I've
played in my head that we
SPEAKER_00may encounter in the future. We encounter an application that demands the use of an LLM, but it's in a regulated environment. So we can only work with open source LLMs. We cannot work with APIs as a result. You can't use Claude. You cannot use Azure. You cannot use Bedrock. You cannot use OpenAI. None of those are allowed. You have to have... full hosting of the weights internally in your own environment. You might deploy OLAMA or VLLM,
doesn't matter which, but you host it by API.
SPEAKER_00And that model must be served there. And then we run into a situation where RAG performance does not get us to the point where we are able to, does not get us to the point where we are able to have the kind of performance that allow a human to go off the like offload work from a human in 95 to 98% of the cases. In that case, then fine tuning might be the only option left to make that happen,
SPEAKER_00to enable a human to be really hands off. and not have to do a lot of work in that sense, in that situation, like the bulk of the work. Because even like, even for more pedestrian use cases, like automatic chromatography integration, where you got traces and stuff, we, our custom algorithms and machine learning models still suffer from a 2% to 5% failure rate. And sometimes, depending on the chemical analyte, and it's sometimes 50% if we're doing something crazy chemistry-wise.
SPEAKER_00So you'd expect the same from an LLM, right? Like an LLM that is not fine-tuned, but is using... Sorry, an LLM that has general knowledge, but is not specifically... trained on, say, regulatory documents, right? Like we miss out on certain nuances that are present inside regulatory documents. If you want the drafting process to be much more regulatory sounding, you're going to have to do a fine tuning exercise there. Sometimes with long like when when we're doing early experimentation,
SPEAKER_00it's always the API providers with their long context windows. But and those provide a sort of baseline check. But 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. And the open source LLMs, they're great for certain use cases, but I think they have not proven their mettle against the API
hosted GPT 4.0 or Cloud 3.7 or 01 when it comes to longer document drafting and that sort of stuff.
SPEAKER_00So it is a bit of a challenge, right, to only rely on RAG, where really your goal is to... Like RAG, all it does is it extracts certain pieces of information from a knowledge base. But 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 on that particular style and also doesn't have enough context window to provide full regulatory documents that are just like...
SPEAKER_00given as part of the context in context learning. 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. Like we're still exploring the most efficient and hands free ways of doing fine tuning.
SPEAKER_02Awesome. And those use cases are really illuminating. And I think philosophically and approach wise, we do agree. And I probably should say, I'm like, I do think fine tuning should be a measure of last resort. I'm not as strongly adamant about it as I was a year ago or even 18 months ago, because one of the costs used to be just how difficult it was. And it's actually significantly easier. And there's more tooling established these days. So that's cool. We are going to have to wrap up in a second, but Yas has just put a great question in the Discord. I don't know if she's online and wants to just ask Eric directly.
SPEAKER_02So if you're able to, Yas, that'd be great. Otherwise, I can read it out.
SPEAKER_01No, sure, I'll ask you. Hi, Eric. Thanks for being here. One of my questions is, when in dealing with this security issue with training the LLM model on two different security level data sets, instead of trying to say, OK, who can use it, is there a way to change the output of the model? So you train a model, and then anybody can use it, or whoever that's allowed for both sides. And then afterwards, the output is sent to another LLM with specific prompts that
are based on those
SPEAKER_01security levels. And you can change the output of that LLM, the original LLM, based on the different security levels of the users. And that way, you don't have to worry so much about who uses it, but what kind of an output it would be based on their security level. And yeah, I was wondering if that's... Yeah, yeah, yeah, yeah.
SPEAKER_00Yes, that's a very creative idea, actually. I didn't think of that. Let me try to reason out loud how that might play out. So basically, we have an authentication layer upfront, which says this is the user. And then we have prompts that are stored and the users are authorized on different prompts. And I learned this from one of my colleagues that authorization and authentication are two different things.
Authentication says you are who you are and authorization says you who have said
SPEAKER_00who you are are allowed to see the thing. So then that means the prompt is automatically selected based your authorization is on the prompt layer. And then the prompt, say 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.
SPEAKER_00So it may in theory be possible, but difficult, right? So possible, but difficult to force the LLM to divulge information that I'm not authorized. 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
SPEAKER_00to an unauthorized user. Now, for certain applications, I can see that the low enough probability of leakage has to be set at zero for trade secrets, personal information, and that sort of stuff. In which case, I think the mechanism you've described might not be suitable, but I think there might be a circumstance, like a sweet spot, where the consequences aren't strong enough to that this mechanism might actually be a good enough way to
change yeah a good enough way to secure information there might be like our data classification levels are restricted classified and open so like restricted you'd probably not work but classified for internal use only certain groups big larger groups are allowed to
SPEAKER_00use it that might be the circumstance under which this measure could be useful. So yeah, security, I've just gotten like more and more in the security world, thinking about the security world as a result. And so that's also influencing a lot of how I'm thinking about the info security problem. Hopefully that was helpful.
SPEAKER_01Yes, thank you.
SPEAKER_02Thanks for the great question once again, Yas, and the wonderful, thoughtful and generative answer, Eric. I always love seeing you think through things in real time. It's time to wrap up. We've gone slightly over time. I could talk and hear from Eric. constantly. But I just want to say thank you all for joining. And thank you, Eric, for bringing your expertise and knowledge from what you're up to at Moderna, but just generally thinking about what science and software mean, where they intersect. And we didn't even jump into all the cool Python stuff that we love talking about and teaching all the time.
SPEAKER_02That's for another time and another place. But thank you so much. And I'm wondering if people wanted to connect is following on LinkedIn or something like that. I've linked to a couple of your blog posts, but do you have a newsletter as well?
SPEAKER_00Yeah, I have a newsletter. It's called Eric's Data Science Newsletter. Usually I write about biotech problems, data problems. But sometimes I also jump out and do some stuff in the LLM or tooling space. And it just tracks my blog, really. So... You know, if you sign up, you get the blog posts at a weekly cadence, but I publish on my blog at a faster than weekly cadence. So there's always something in the queue. And so if you want a passive way to receive it, then that's the best way.
SPEAKER_00Yeah. Awesome. And for LinkedIn, I do ask if you want to connect, please write a note that we met at Hugo's class so that I know because I put a bit of a filter on who I accept because I have a backlog of 200 plus that I don't know who they are. And so I would really appreciate just that little note.
SPEAKER_02Totally. And I actually, I just want to say one thing. Your most recent blog post is called Wow Marimo. And one of our guests this morning was Vincent Vamadam, who works at Marimo now. And it was a wild session because Zoom had their global outage, so he couldn't get onto Zoom. So he ended up live streaming from OBS to his YouTube channel and doing a live demo of him doing all types of cool stuff in Marimo notebooks, which I'll see later. But maybe you could just, we could wrap up by,
SPEAKER_02Telling us why you, and we can read the blog post, of course, but why did you call a blog post Wow Marimo?
SPEAKER_00Oh yeah, Marimo's great. I've been burned building like versions of Bayesian models and other models with like reused variables. So the reactive nature of Marimo notebooks and more importantly, the prohibition that you cannot redeclare a free variable inside a notebook is actually a great guardrail against foot guns in programming inside notebooks. There's granted, there's quite a bit of stuff that you need to get used to. But yeah, that is the biggest one.
Another big one that I note inside the blog post is that Marima notebooks,
SPEAKER_00you can actually run them standalone. So you can actually, if you structure your notebooks to be completely self-contained, you don't need a second file. to define the environment. Your .py file defines the environment with PEP723 compatible inline script metadata. It's amazing. So I can just give a colleague a notebook and go, they can do uvx marimo run that file.py, or I can put it on the web, right? Give them a URL and you can do uvx marimo run and then some URL
and it'll auto
SPEAKER_00download and then go and run the notebook live for you from there. So that's so rad. Also, Marima notebooks can be served up with a web server and everyone in the class has modal credits. I got modal credits from another class that I took. And so I just mucked around like deploying Marima notebooks on modal. And it is so easy, like 10 minutes and you're done. I'll have another blog post that will be titled Wow Modal, because I think you can build an entire I have a thesis that you can build an entire modern biotech data stack.
SPEAKER_00completely eliminating AWS from the equation. You can just do it on, you can just do it on modal. So modal's also really great for building, building stuff. I encourage everyone go play with it, master it. It is my, if I hope I'm not being preposterous when I say this, but I really think it's the patterns they're setting are the future of cloud infrastructure it's really that good that is so that's a third and i guess that's the final one that is a so many good things about marimo notebooks i love it awesome i can't wait for your wow modal blog post next it's the
fact that you're accelerating science to the speed of thought but also you're such a quick thinker gives makes me it makes me incredibly excited for the future of everything you're
SPEAKER_02working on thanks you go I've got more questions, but I'll save them for next time. I'd love to thank all of you for sticking around. It's been a long day. We've actually had seven hours of classes and workshops. And not everyone has been here for everything. But we had Ines from Spacey, Catherine Jarmul, Pavithra from Ponsight, and then Eddie from Fondue. And so thank you all for sticking around. Thank you once again, Eric, for your wisdom and expertise. And we'll see you later. Awesome. All right. See you, everybody. Thanks, everyone. Thanks for tuning in, everybody. And thanks for sticking around until the end of the episode.
I would honestly love to hear from you about what resonates with you in the show,
SPEAKER_02what doesn't, and anybody you'd like to hear me speak with, along with topics you'd like to hear more about. The best way to let me know is currently on LinkedIn and I'll put my profile in the show notes. Thanks once again and see you in the next episode.
Hilary Mason, CEO of Hidden Door, works with agents across software development and creative projects. Drawing on Richard Hamming’s distinction between science and engineering, she describes agents as “bringing the...
Agents can write the code, run the analysis, and produce a convincing explanation. How do you check that they’ve answered the right question, used the data appropriately, and reached a conclusion you can act on? I...
“It’s an LLM, a loop, and enough tokens.” - Nicolay Gerold, Amp Code So why does a coding agent forget your instructions, keep reading tiny pieces of a file, or struggle with an edit another model handles easily?...
“If you feel that a product is hard to eval, or you feel like, ‘I don’t even know how to eval this,’ it’s a strong smell that your product isn’t good.” - Hamel Husain, on AI product design An AI data agent tells you...
“It would be sad if local models were not an option and there were only proprietary models. It’s good to have alternatives. Competition is good for business.” - Sebastian Raschka, on open-weight AI Kimi K3’s weights...