Skip to content
⚡️Using RFT to Build Clinical Superintelligence episode artwork

Jul 29, 2025 26 min

⚡️Using RFT to Build Clinical Superintelligence

from Latent Space: The AI Engineer Podcast Hosted by Latent.Space

Watch the full show on YouTube: https://www.youtube.com/watch?v=ujjyNjQ5Cfo

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

⚡️Using RFT to Build Clinical Superintelligence

0:00 26:58
of matches

Transcript Auto-generated, may contain errors

Hi, everyone. Welcome back to another Latest Space Lightning pod. This is Alessio, partner and CTO at Decibel, and I'm joined by my co-host Wix, founder of Smalleyai. Hello, and today we are joined in a remote studio with Brendan Fortunato of Ambience. Welcome.

Hey, thanks so much for having me. Huge, huge fan of the pot. So let's talk about Ambience. You know, I think you are actually our first guest covering or working in the healthcare sector. There's a lot of doctor, medicine, AI scribe things out there. What's the origin and what's your specific pitch for Ambience? Yeah, sure, sure. So I'll tell you maybe just a quick TLDR and maybe get into the workflow and share some of the problem for folks who are less familiar with healthcare. So the TLDR is basically, you know, Ambience is a healthcare company. We're building an AI assistant for doctors. We help doctors take notes. We help them complete, you know, administrative tasks. And the end result is we save them a bunch of time and they can spend that extra time like caring for patients, right?

Our customers are actually like big health systems. So like Cleveland Clinic and UCSF, Ardent, Sean Muir, these are the kind of customers we sell to. But the end users are actually the clinicians themselves, doctors, nurse practitioners. The basic workflow with Ambience is we have a mobile app. The doctors will take it into the room with the patient. You may have seen this, you know, if you're a patient. We'll then listen to that audio. We'll transcribe it into text. And then we'll call language models that are fine-tuned for medicine to generate all different types of unstructured and structured documentation. And then we'll automatically write it back.

into the electronic health record. That's a system of record where doctors do a lot of their typing and note-taking. And the end result is, like, we'll save doctors, you know, up to two hours a day. We make them tremendously happier, and we help the health systems as well. See more benefits. Every time someone mentions EHR, I have to mention, like, it's a complicated system in the U.S., right? Like, that's basically the default system that is owned by one company. Is that how it works? Like, you have to send data to it, and, like, everyone works out for that system.

Yeah, so there's actually many electronic health records, at least 20 or so. But there's a few big ones that our customers, you know, the big health system's drawn. Epic is obviously like the Goliath in the room, over 50% share. Cerner, that's another really big one owned by Oracle, maybe about 27%. Then there's Athena and MedTech, you know, Ambience. We integrate with these EHRs and they have open APIs. They have some private APIs. We try to make it seamless for clinicians. And you previously were working in self-driving. That's right. Yeah, so I joined Ambience like three and a half years ago to join the founders, Mike and Nikhil, my close friends.

Prior to this, I was at Cruise. I was working on self-driving cars and computer vision and LiDAR. I co-founded our machine learning platform team there and took some of that knowledge here at Ambience. Yeah. Part of me thinks that this sort of LLM-centric problem is very different from the machine learning problem that you had at Cruise. But maybe it isn't because...

So once different, once the same. Machine learning is still very frustrating. It's always been frustrating. That's a great question. I think like over the last, you know, four years has been huge transformation in the industry and how machine learning has been practiced. You know, before you might focus at Cruise on labeling massive data sets, millions of images, right? Or LIDAR and fine tuning models that are like a lot smaller. These days, the models are massive. They generalize extremely well. You can use techniques like prompting to kind of few shot them. Even fine tuning itself is very sample efficient. So it's definitely a lot faster to iterate. It's a lot faster to get into production. That's actually really, really exciting.

the thing that i'll say that they have in common um is it's still a data engine it's still very data-driven you know um machine learning where what data do you have like what's the distribution how do you collect really good annotations how do you evaluate success some of these fundamentals haven't changed that makes sense and talking about data being frustrating i think healthcare is like one of the number one places where that happens that's right can we just walk through very quickly the different pieces of like the ambient experience so to speak like uh where people start using it you mentioned it doctors kind of bring it in the room uh we can talk about some of the work you've done on reinforcement fine-tuning as well yeah sure sure absolutely so the ambience the initial use case as i described it's called ambient scribing that's where the name ambience came from you know that's we listen to audio and we take notes but that's actually just like i would say five percent of like the total value that we can kind of offer you know once you have the audio um of a conversation right once you have access to the hr and you can read and write to it samus is rapidly proliferating an actual ai platform So why stop at just notes? Why not place, help place orders? Or why not place, you know, ICD-10 codes? Or why not help, you know, maybe call patients on the phone and ask them if they've taken their medication? So Ambience is slowly building out all these generative AI use cases in healthcare, you know, given the transcripts and the access to the EHR. In terms of the stack, I think it really depends on the use case. Ambience internally, we use prompting, we use chaining, we use RAG, we use fine-tuning, we use SFT and RFT. Yeah, so you mentioned RFT specifically. I think it just went GA on OpenAI maybe a couple of weeks ago. Obviously, everybody's talking about reinforcement learning, but maybe most companies don't really know how to do it. Can you maybe talk about...

the rfd journey at ambience and like when did you think when did you decide it was like a good fit and then how did you spin up the whole infrastructure to get the right data for it yeah this is a great question Maybe just, you know, stepping back, just a quick summary of RFT. So RFT, it's a RL-based method for fine-tuning language models and teaching them how to think and how to reason, you know, before answering questions. It's phenomenal for very objective tasks. You know, STEM, math, science, coding are kind of the flagship use cases. And it's the same technique that's used to train these state-of-the-art reasoning models, like O3, you know, R1, Cloud4. But it's now, you know, very recently available to all developers and startups. Our foray into RFT has primarily been through the OpenAI kind of platform.

So we're using those self-service, you know, APIs. The basic core concept, right, of the RFT, which I think makes it so special, is unlike supervised learning, where you create these big label data sets of thousands of examples, you know, drafted by humans, and you kind of train the model to imitate them, right, and try to get the correct answer. With RFT, you kind of replace those labels with these graders. These programmable graders, these scoring functions, right, they'll output a score of zero to one, and the model learns to kind of hill climb and try to maximize these scores using RL, right? So with the API, it starts with a grader, right, and there's different types. You could try, like, string match. You could try regex. You could do a fuzzy match.

Often you could do a unit test, run some Python code, or even use an LLM grader, or you can combine a bunch of graders together into a massive grader kitchen sink. I've seen some crazy stuff. But I think the actual technique behind the scene, and we don't know exactly how OpenAI does it, but I think from our perspective at a high level, the models, each epoch, they're generating four or 64 different candidate trajectories for every example in your dataset. The grader scores them, zero to one. And then the model kind of learns what tokens did I generate that helped improve that score, and then reinforce those.

or like what tokens actually hurt me and then you know don't don't send those tokens as much and then through trial and error over thousands and millions of you know kind of iterations or trajectories kind of figures out how to maximize the score right so ambience like we found this this is attractive to us for many reasons in medicine there's a lot of tasks that are fairly objective in nature and we'll talk about maybe icd also there's a lot of reasoning there's a lot of medical reasoning that's kind of difficult and complex for just you know some of the off-the-shelf pre-trained or sft models and i also think like in machine learning we're often optimizing these proxy metrics right like loss in the real world nobody cares about loss So as a machine learning engineer, you're always looking for ways and techniques to kind of optimize for the end objective. Like, what do you really want? Like in basketball, like, it doesn't matter your form. What matters is you get points, right? And I think that's what RFT brings to the table. It's like, it gives you a way to optimize for the end objective. And Ambience cares about that in healthcare. And the second, I think, is like, it's tremendously sample efficient, right? Each example sort of blooms into dozens of labels, right? And trajectories. You can squeeze like X more signal, right? Out of a data set. I think those two things are like tremendously profound. I'll pause there, but yeah, there's some cool stuff.

Something worries me about data efficiency. We all want it until it works against us. So sometimes it's possible to learn too much from one sample. You know what I mean? I saw a paper on that recently. It's an RLVR thing? Yeah. That one is more elicitation and like being Quinn. But like, did you have examples where it went wrong? And like, what would be advice there? You know, like that can help others try to do the same thing. Yeah, I couldn't. I think the interesting discussion is maybe, I mean, there's many things to talk about. The reward hacking, I think, is a thing. I think.

In the physical exam use case, we can kind of talk about that, but we used an LLM grader for the first time. And whenever you're using like an LLM grader, the task is like a little bit more prose or a little longer form generation. You could be very vulnerable to this. The models are super clever. They're incentivized to win, but they'll cheat and they'll do weird things. So yeah, maybe I'll be able to define it, like define what is a physical exam and like how kind of the reward hacking that we saw. So in medicine in the room with a patient, the doctor will do this thing called a physical exam. They'll get your elbows, they'll test your reflexes, they'll listen to your lungs. At the end of the visit, they go back to their desk and they fill out this like structured form of for each body system. What do they observe? You know, is the heart, you know, good or not? I'm sweet.

frame this as an rft task we have the model generate the structured data of a bunch of findings right and we use an lm grader to kind of measure the accuracy we were optimizing for like precision and recall you know how many of the findings did it get did it hallucinate any findings and we kind of saw like two things the first was the model started to inflate the number of findings to kind of gain precision So it's like, I'm going to generate a bunch of the same thing redundantly and I'm going to get great precision, right? That was one thing. And so we had to kind of like update the grader to kind of constrain the model. The second thing, there was like this tone degradation. So the model started using these layman terms like grandpa has an unhappy heart. We would get crucified if we put that into a medical note, right? So what we did is in the grader, you know, in addition to just the content and like the semantic accuracy of what it's saying, we also started to add style and we kind of weighed them like 75, 25. And over time, you can kind of harness and get the reward hacking to go away. What were some of the emails, especially, yeah, you mentioned the ICD encoding, which is...

from understanding how the insurance coding works. How did you eval whether or not the model was good? Yeah, it's a great question. So this is the one, the ICD-10, it started as a blog post, right, on OpenAI's website. And then it got picked up by the news media, like CNBC and Inc. And my grandpa started texting me about it. He's like, oh, like, you know, I saw you in the news, like, when is AI going to replace doctors, right? And I was like, grandpa's like, AI's not going to replace doctors. So the task was ICD-10 coding. This is essentially, after the visit with the patient, the doctor has to go back to the EMR. And they have to select these things called ICD-10 codes. They're essentially like an international system of like diseases and conditions that have these normalized codes, right? So you'll say in the visit, the doctor will say like, oh, you have left ear pain.

right but the doctor later needs to go map it to this code which is normalized there's about 70 000 of them and they look like h65.195. you know acute otitis media comma recurrent comma left right like that's doctors didn't go to medical school to do that and they're not that great at it so we did as we we recruited about 18 physicians in the wild we created this like you know eval set annotated by four expert annotators each you know to kind of make sure that the quality is extremely high and the clinicians using f1 score were scoring like let's say around 40 right on the f1 score which was surprisingly low lower than we thought we were able to use rft to kind of hill climb and get that you know get a small model o3 mini um up to around like 57 um there's still plenty of hill to climb we just thought that was like a really interesting result and just early signs that this could be framed you know as an rft task so like what all else do you do right like so i think there's there's a broad surface area of products and i think there's a there's an unlimited amount of demands for help. Like what are you hearing from doctors? Like what do they need? Yeah, I think when you first get into a health system and into healthcare, like you just learn how many problems are kind of unsolved because there hasn't been as much like startup innovation in that space. It's very difficult to get in. There's a lot of like HIPAA requirements and regulations and health systems are traditionally very conservative buyers. And then you have the EMRs, which aren't making life easier. So now that we're getting in, like our clinicians and our health system partners are telling us about all these different use cases, right? So like, for example, we have like early prototypes of like a patient facing agent. One of the problems after the doctor visit is patient, they don't take their medication. They don't even go pick it up.

They don't go to the labs. And this creates like hundreds of thousands of hours of phone calls and inbox messaging, right? And it's very time consuming, very expensive. So Ambience, you know, is like, why don't we like use one of these very powerful voice agents to do this kind of more administrative task and just report back to the nurse, right? That's an example. There's another really interesting one actually is, you know, certain specialties like oncology or cardiology. Before they go into the visit with a patient, they can often spend like 10 minutes or 30 minutes or 60 minutes looking at the chart. They're going to look at labs and images and, you know, other data about the past visit. So Ambience actually, you know, we have a product where we call it pre-charting. We'll create this like summary of like, here's what happened.

in the past notes for those visits to save them a bunch of time and even create a visit agenda for them so they know like what questions asks the patient um and then you know make the visit more productive those are just two but there's like dozens and dozens of use cases yeah this patient side reminds me of the times that i've gone to the doctor about medicine and never never followed the plan exactly and it's yeah it's my fault but like i could get some help i saw the prep notes that we had but there was one we're sorry around burning 25k on a one grader so we'll have to chat through that it's definitely relevant to like startups and and you know if you're just toying around um it gets into the cost thing so it really depends on you know the data set size it depends on you know what type of grader that you're using right string match would obviously be like less efficient but with like sft let's say you're using the opening eye you know to do some supervised fine turning you probably have like you know maybe a few thousand examples the job takes a few hours it costs you like 100 bucks right with rft maybe you have like 100 examples The job takes a few days and it costs thousands of dollars. One way to burn money really fast is to use a very, very expensive grader. So I think one of our first experiments we ran is like only 100 examples, right? We quickly burned like immediately 20K just on the grader alone. So just like a watch out for, you know, builders out there. What's your observability stack for LLMs? Like, are you tracking the spend both on, you know, when you're like setting up an experiment, you know, what does that, the harness look like, so to speak?

Yeah, great question. So I think we use like a variety of techniques. One of the cool tools that we use internally is Braintrust. I think they're doing some incredible work over there, building like a tool for domain experts. They do give some built-in observability. They let you deploy on-premise. It's a fantastic technology. I highly recommend folks checking that out. But there's a lot of like areas where that stops, where you kind of have to build some custom tools, right? It could be something like data mining tools or automated ring release tools, right? To release safely and some, you know, maybe automated monitoring tools. And we've had to build a lot of stuff in-house as well. We had Ankur from Braintrust on the podcast and he's speaking at the conference next week. What are you looking for in eval tooling? Is there something that is really, really good for you that you want to shout out?

And maybe what's missing? Really good question. Wow. Chain of thought there. I'm just reasoning. Yeah, so I think it really depends on the task. You know, if you have a very objective task and it runs as a unit test or string match, like a script is actually quite good and engineers are very good at automating scripts. I haven't seen, you know, traditional issues on that side. But if you're going to have like domain experts or non-programmers, if they're going to review, that's actually kind of challenging. It's not obvious how to do that. There's ergonomics is a big issue. Like they need to see the outputs side by side or multiple side by side. I think brain trust is making tremendous progress there, right? And even allowing you to kind of incorporate some automation. But I still think it's very early days, you know, in the ergonomics, you know, the full IDE for a domain expert, like early days.

Yeah, I'm curious whether the domain experts really use these kinds of tools or do they need something else? That's something that everyone wants, but I haven't popped enough domain experts to know. Yeah, I think this is like the billion dollar question, right? I'd love to hear what you all think. Do we need machine learning engineers anymore? Or like, can you just train with domain experts alone? I think the answer is both.

I think the answer is both. I think the domain experts, like in our case, clinicians, they're really good at like debugging model outputs, meeting with users, distilling that feedback into something actionable, maybe annotating or doing evals. But they don't necessarily have like, you know, the right intuitions about what techniques to even try in the first place. And I think that's where machine learning engineers and researchers come in and they kind of guide the domain expert teams. They see something manual, they do it 10x faster. That's kind of how I see the underplay of these teams working. Yeah, I think like there's like sort of test environments where you sort of, let's say you hire domain experts and clinicians to be labellers for you, like a scaly eye or whatever. But like also that's pretty artificial. And I think you want like demonstrated behavior from just day-to-day work.

like that's kind of where like there's like kind of like a co-pilot like experience right like you don't take the just the raw thumbs up and down like you actually see like how much of that was useful and stick around yeah i don't know how to design it beyond that but i am looking for like okay like no you don't need any of that you know like here's the shortcut yeah i don't think i don't think there's any silver bullet i think it's like automation but still like humans reviewing outputs fundamental you know fundamental the sniff test the vibe check like huge part Segments on hallucination, I don't think we've dealt with it specifically. Obviously, I think the number one question that people have on medical use cases of LLMs is what do you do with hallucinations?

Yeah, I think this is interesting. I have some takes here. So I think like base models out of the box, they actually, they really still struggle in healthcare in many ways. One of the issues is this like robustness problem. So the models are like geniuses, right? But they can still like erratically fail a non-trivial percentage of the time. And like fumbling agents, it doesn't work in healthcare. This is a patient safety critical environment, right? I think one of the problems is like the benchmarks, they always report like the best event. So they report like, you know, what's the best metric they got out of 64 attempts? But in healthcare, we're more interested in like, what's the worst event?

right um i think like you know karon and team you know at health bench at open are doing like wonderful work here they're doing some great work at stanford but really just start to think about that if you plot out the worst event for a lot of benchmarks you're going to be like really surprised like as an example another thing we see a lot in the base models and this is why they require like a lot of fine tuning patient, you know, they start to make these medical inferences. They're so smart, but they start to like infer things that the doctor didn't actually explicitly say. You know, for instance, a patient will say like, I'm feeling sad and stressed out, difficult sleeping, right? You know, the base model is going to be like, patient reports increased anxiety and depression. But wait a second, those are diagnoses, right? The doctor didn't actually confirm those things. The models are going to jump to these conclusions in unsafe ways. I think the last thing I'll say about this is I actually think clinical, real world clinical data is out of distribution.

And I think as much as the model is generalized, if you have no access to that data, it's really hard to learn. I think that the reasons are maybe twofold. The first is a lot of realistic clinical data is inside these walled gardens, right? It's inside Epic and Cerner. And they're locked down for patient privacy reasons, but this means there's not a lot of realistic clinical data on the internet, right, to feed into the models. The second I'd say is actually, like...

You know, there's a lot of tribal knowledge in medicine. So the base models, they went to medical school, they memorized the textbooks, but there's also this thing called residency. It's like two, four, eight years where you get all this hands-on experience, right? Working with, you know, attendings. And there's a lot of learning that happens there that's encoded in the EHR, but not actually encoded on the internet. Yeah, that actually is the same analogy that people use for the coding models. We did an episode with the OpenAI Codex team and they were like, yeah, you went to college and you have basic knowledge of software, but here we are giving them like the first few months, maybe the first year of being on the job training. Yeah, exactly. Yeah, exactly. It's so huge.

Do you feel like things like a health bench that have been announced are steps in the right direction to maybe fix some of these, like a, you know, model evaluation? Lacking? Or do you think like the same issue? So I haven't read Healthbench, but I'll squeeze in an explanation of what it does. Yeah, so it's a new open source data set released by opening up, you know, Kron and a lot of amazing researchers and participants kind of built this data set. I think it has a few thousand examples. And these are like very realistic kind of healthcare tasks that they've put together and given out to the community, which I think is phenomenal. I think like they're thinking about it the right way. They're thinking about it like these academic data sets that we've been kind of saturating for a long time are no longer useful. Models are going to ace medical exams. And they're just trying to figure out how can we create these real realistic, like clinical cases. And I think that's like the first step. And there's still a big health.

to climb, and that's great to see. Yeah, I mean, broadly on data sharing, I don't know if you've come across Tanishq Abraham. He used to work on MedArk at Wisdability AI, and now he's working on SoFans, which is kind of the spin-out version of it. And he actually has a really interesting conversation around, like, sometimes we don't mind, like, anonymized data sharing. train this more natively. We just need more data. This is obviously the single most privacy-sensitive issue for data on planet Earth. At the same time, we also need a lot of data, man. What are you going to do? Yeah, this is the billion-dollar question. I can also share some more anecdotes. Once you get that data, I didn't tell you it was high-quality data. In fact, it's actually tremendously messy.

It's just like, watch house. Yeah, it's tremendously messy. And I think that creates new problems when you even start to get that data. And I think the reasoning models are tremendous when you give them really accurate context. But imagine giving them messy kind of context. And they have to have taste. They have to have clinical taste. And that's something we're still learning about as an industry. What is clinical taste? Just judgment of what's right, what's wrong?

Yeah, exactly. Like, what source do you trust? It's what source do you trust? Similar to, like, you know, if you ask, you know, O3 to go on the internet and find the right travel kind of destinations, it's just going to kind of get, like, tricked by whatever has the best SEO. And then in healthcare, it's the same. Like, you know, what is an example of an EHR kind of data element that actually is messy? Like, you shouldn't trust this one. You should actually trust these other, you know, paragraphs over here. So that's what I mean by, like, clinical taste and intuition. Have you had, so sometimes reasoning on wrong premises can lead you to wrong results, obviously. And I wonder if you've had conversations with OpenAI on...

Are there different kinds of reasoning or is reasoning just a generally, is it just IQ or is there like seven different types of IQ? And maybe OpenAI has spiked on math and coding IQ, but not so much on the medical IQ. Like how distinct are they or how correlated are they? That's a really good question. I think, I don't know how it works underneath the hood. I do know that when you kind of plot out base model performance on some medical tasks, like ICD-10 coding between like, you know, previous generations and new reasoning generations, it's actually not like a big leap. I think like what we're recognizing is, look, if you don't actually train on the distribution of data in these verticals, you're actually not going to see gains. So I don't know what patterns are shared. I'm sure there's reasoning patterns in mental models, but I also think there are probably mental models, right, in healthcare specifically, that these models need to learn before they can be effective. Yeah, thinking about patterns. Also, one idea that we're going to talk about in the prep is like...

But you have Devin for clinical AI research, kind of like moving more towards and job assistance, like more long running experimental things. Yeah. Can you share more about that? Yeah, I think the thought here is that our engineering team is like seeing tremendous productivity gains, right? With coding assistant and coding agents. Why can't we do the same thing for clinical research? I think there's definitely a world where you have a voice agent, talk with an end user, distill that feedback into, let's say like a prompt or maybe a PRD for what we should be doing. And then you can have the agent, like go mine the data, go look at the edits, distill that analysis, you know, run evals, even do annotation. I feel like this is fully possible. And it's something I'm excited about. I'm not saying we built it yet. Great. Yeah. Any parting thoughts, call to actions, you know, you got the audience listening to you.

Super happy to be here. I appreciate you both. I love what you're doing. Huge fan of the pod. Yeah. Thank you for the time. Yeah. Take care, Brendan. Absolutely hiring. Hiring engineers, clinicians, researchers, machine learning engineers, machine learning researchers. You betcha.

Maybe let's focus on a specific role and why it's what you're really looking for that is hard. What's the skill that you want that you can hire for? That's a good question. I do think there's machine learning research talent, the best in the world. That's definitely hard to get, but super valuable as we start to push some of these frontier use cases. That's number one. I also think there's like a really interesting skill set in like a clinician researcher archetype. So these are the folks with the domain knowledge, but how can you find the ones that also have like an experimentalist mindset that have like a startup work operating system?

That's actually surprisingly hard. And I think that's, you know, maybe one of the gold kind of unicorn kind of archetypes. That's really important to us. So like a Venn diagram of startup person, also somewhat domain expert, somewhat ML person, right? Well, I think like being specific about that intersection helps you hire more because you're more clear about like, you know, this is what we're doing. So I wanted to miss it. But thank you for all the important work you're doing. I'm sure you're saving lives. Not all of us can say that. Thank you, Brandon. Cool. Thank you both. Keep up the great work.

Frequently asked questions

How long is this episode of Latent Space: The AI Engineer Podcast?

This episode is 26 minutes long.

When was this Latent Space: The AI Engineer Podcast episode published?

This episode was published on July 29, 2025.

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this Latent Space: The AI Engineer Podcast episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.