Enjoying this issue?
Get tomorrow's AI & engineering digest in your inbox — hand-picked, summarized, and always spam-free.
TLDR
Ufonia, a UK-based healthcare AI company, has built a simulation framework called Matrix that uses an LLM-powered patient (PatBot) to generate thousands of synthetic dialogues and an LLM-as-judge (BevJudge) to automatically evaluate safety hazards, replacing the risky reactive deployment loop with a proactive safety cycle. The core claim is that simulation and prompt optimization (via JEPA) allow the system to iterate safely on its conversational agent Dora before real patients ever hear it, which is essential because A/B testing on patients is unethical, calls cannot be rolled back, and standard model benchmarks don't prove safety in high-stakes clinical conversations. The talk argues that this approach bought Ufonia the right to deploy Dora for 200,000 real calls across UK hospitals, with a path to scale to a million patients.
Key points
- Ufonia's Dora is a voice AI agent that conducts real clinical conversations (post-op follow-ups, pre-op checks) and has completed around 200,000 calls across 20 UK hospitals, with contracts to scale to a million patients in two years.
- The company released its product in the US this year, currently live in two clinics and signed for six more across four states.
- Standard reactive deployment (ship to a small percentage, watch dashboards, roll back) is not ethically viable for patient-facing AI because a bad call cannot be undone and dashboards going red means a patient was already harmed.
- Ufonia's simulation framework Matrix uses an LLM (PatBot) to simulate patient conversations conditioned on specific clinical scenarios, enabling fast iteration without exposing real patients to risk.
- PatBot was validated via a Patient and Public Involvement (PPI) study where real patients found the simulated patient more realistic than real conversations in three out of four comparisons.
- Safety evaluation uses another LLM as a judge (BevJudge), validated against 10 expert clinicians on 240 examples, achieving an F1 score of 0.96 with near-perfect sensitivity (prioritizing over-calling hazards over missing them).
- Prompt optimization is handled by JEPA (genetic Pareto optimizer from the DSPy team), which automatically updates prompts based on a clinician-defined cost matrix (e.g., optimizing for sensitivity on red-flag detection) and reduces manual prompt engineering from hours/days to 30–60 minutes.
- The full safety cycle consists of: real call data → synthetic edge cases → prompt optimization → Matrix simulation gate → gated deploy, where each stage earns the right to proceed to the next (simulation is necessary but not sufficient, real patient testing remains the outer loop).
Tools mentioned
Techniques
- LLM-driven patient simulation for generating synthetic clinical conversations
- LLM-as-judge for automated safety evaluation against predefined hazards
- Prompt optimization using genetic pareto algorithm (JEPA) with clinician-defined cost matrix
- Staged deployment with safety gates: simulation → user testing → supervised clinical evaluation → monitored deployment → increased autonomy
Stop scrolling. Start reading smarter.
Receive the day's most important AI & engineering updates in one concise email. No spam.
Transcript (captions)
[music] >> Uh hello everyone. It's really nice to see you all. Um my name is Jared and I'm going to share some of the work that we do on
shipping healthcare AI safely basically. Um so just a little bit about me. Um I come from South Africa where I actually studied electrical engineering um before making the very unique
decision to transition to AI a few years ago. Um I now work as a research engineer for Euphony which is basically a a healthcare company based in the UK.
And um the work we do I work within the science team is we built the safety and evaluation stack behind Dora which is a clinical conversational agent. And my job and our job within the
science team is proving that the product is safe before a patient ever actually hears it. So shipping to patients takes away the normal safety nets you would normally
ship with. Um three of them could be that you can't actually AB test on patients of course. Randomizing patients into a worse variant is unethical and often illegal.
Um you can't undo a call. Once Dora says it, it's been said and there is no rollback. And very importantly the model card won't save you. Um you can't claim like
some model vendors said that they have 92% on some benchmark. Um it's not a defense at a post instant review. So everything that we do at Euphony comes from living within constraints.
So what is Dora? Um a little bit about Dora. Dora is a a voice AI agent that phones patients and has real clinical conversations like post-op follow-ups or pre-op checks. Um these are calls that a
clinician would usually have to make themselves but Dora doesn't So Dora obviously doesn't replace doctors but it just takes a hugely time-consuming task off their plate and gives them their
time back. Um so far we've done around 200,000 real clinical calls within the UK across 20 hospitals. And we are contracted to scale to a
million patients in the next 2 years. Um, we also um, released our product in the US this year and we are live in in in two clinics and we've signed up for six more clinics across four different
states. So, I'm just going to for for a bit of better context, I just wanted to do a quick demo of what the experience with Dora is actually like.
>> That's not uncommon after cataract surgery. Are you having trouble seeing clearly at a distance, up close, or both? >> Um, at a distance is fine. It's just uh,
up close that's um, it's a bit it's I'm having a bit of trouble with that. >> So, when exactly did you first notice it was a bit blurry when trying to read or see things up close?
>> Um, well, really just after the surgery. And I was wondering how long it would last. >> So, you're asking about the duration.
That's understandable. Blurry vision should improve rapidly in the first few days after surgery. >> Okay. Um, also, um, is it all right if I go swimming again?
>> You should avoid swimming for a month after surgery. That's just to be on the safe side and help your eye heal properly. >> All right. Okay.
>> Awesome. So, as you just heard, sometimes Dora asks about symptoms, it gives advice, sometimes it it answers questions and when it does this, this makes it what's
called a medical device and therefore it has to of course be regulated. Um, and we have to prove that it's safe. And regulation essentially bottles down to three main questions. What does your
software do? What could go wrong? And how do you ensure that it doesn't? For normal software, it's quite tractable that question, but for a model that talks to actual patients, what
could go wrong is quite huge. So, where do we start? We start from what could go wrong. We start from the harm. What could actually harm a patient? And let's look at some
examples. Um Dora could miss a red flag symptom such as sudden vision loss or severe pain. A patient could ask a medical question
and Dora invents an answer, hallucinates something. The patient could be distressed and Dora just ignores it and carries on without actually acknowledging the distress.
There's many, many, many documented hazards of these, 20, 30, 40. And we have to ensure that none of them actually happen in real life. So, how would we actually normally catch
a problem like this before it actually spreads? We would lean usually on the playbook that most softwares ships on. You ship to a small percentage of people. You watch the dashboard. You
roll back if it breaks and you iterate from there. This is a very good playbook. It's reactive. It's fast. It's very safe. And it's how the industry usually de-risks a
launch. But there's a hidden assumption here that it only works because you can afford to be wrong for an instance. A bad change hits a few users. You can quickly catch it. You can roll back and
then no one's actually literally harmed. This is the one assumption is why that it breaks when when the actual user is a patient. For 5% that could be a hundreds if not
thousands of of patients that have got unproven changes and undue care. Roll back. You can't really roll back. The call has already happened. The person has already been harmed. By
watching the dashboards, the dashboards are just going to going red means that a patient was actually hurt. So, the reactive loop is actually gone now. So, how do you iterate at all when
you can't touch a patient until you're sure? Well, for this we started looking at other at at examples from other high reliable industries. Uh the most obvious
one is self-driving cars. Obviously, we're in SF now. There's a lot of Waymos driving around. They've only just come to London unfortunately, very, very late to the to the party. But what did what
did self-driving cars do? Well, they didn't just drive around crashing into walls and say, "We won't do that again." and then doing another RL loop. They put millions of miles of
simulations first before they actually got any um passengers in into the car. For us, we believe in the same thing. Simulation is only the real ethical
option we can go with. You can't run all the hazard the hazards I just mentioned on real people as a first grasp. So, for our clinical history taking, we built a
simulation framework called Matrix. And I'm going to work through how it works and how we use it to prove that our product is safe. And uh the paper's on archive if you
want to read it along with some of the other research that we do. At its core, Matrix recreates a real clinical work conversation but with no real patient in it.
We use an LLM to play the patient. We call it PatBot. And what does it do? We use a simulated patient and not a hired actor because hired actors don't scale. If you want to
iterate very fast and simulate different things at the same time while also updating our system, um hiring actors would just be too slow of a process. So, as a first version, we just use a
simulated patient. The simulated patient is conditioned on the actual scenario we want to test. The scenario defines exactly what the patient should try and do when talking
to our agent. For example, asking whether the agent is a human or a or an AI. PatBot then has a conversation with Dora, our target system, and then
generates simulated dialogues. Very importantly, this all happens under a very specific clinical use case context. So, the scenarios are grounded in real clinical workflows and not
abstract situations. So, how do we actually make sure that the the patient is realistic? If if PatBot is is sounding robotic, the test aren't really worth much. So, we
had to of course validate it. The first thing we did was just a pure um script adherence check. If we told PatBot to do something, does PatBot do it? Yes or no?
This helped us filter out a lot of maybe weaker models that that were that didn't listen to instructions properly, but just purely um following instructions does not make a realistic patient. We
want a patient that flows more realistically like a like a real person. So, we set up what's called a PPI study, a patient and public involvement study. We took real patients and we showed them
two sets of conversations. One conversation was with between a real doctor and a real patient, and one conversation was between Dora and PatBot within our Matrix framework.
And we showed them these two examples side by side and said, "Looking at the patient, can you tell which one is the real person and which one is the simulated person?"
So, I'm going to just wait for a few seconds here if you guys want to quickly read the two conversations. Um maybe we can do a do a hands up who thinks conversation A is the real
person? Who thinks Who thinks conversation B is the real person? Okay. I think us as as engineers
sometimes are pretty good at at finding these things, but um it was actually much more difficult than we thought. And we did this with four conversations that's basically. In three out of the
four, the majority of people actually thought that the simulated patient was more realistic. But the most important thing that we found was of course there is no single
realistic patient. That doesn't really make sense. Some people prefer to speak more verbosely, a lot of ums and ahs. Some people are more straight to the point, a lot of yeses and nos. But the
point is that we actually want to simulate all these different scenarios. We want to simulate people with very diverse personas. Um but what it did show us is that at least our PatBot was
realistic enough um for this simulation. Okay, so now you've got thousands and thousands of simulated dialogues. Are us as the engineers going to go read through them one by one and see if a
hazard has happened? Of course not, it doesn't scale at all. For one, and number two, we aren't clinicians, so we You actually know if an actual hazard has really occurred.
So, we use another LLM as a judge, of course, and we call it BevJudge. It takes the simulator dialogue, it a set of expected behaviors, and the hazardous scenarios that we talked
through with clinicians, and it makes a judgment pass or fail. If it fails, it gives us a reason why it gave that answer. So, we get we get a structured output of
which hazards were triggered and what actually went wrong in that scenario. So, how did we validate BevJudge? Uh we validated BevJudge against expert clinicians. We had we created a corpus
of 240 examples, and we had a ground truth of whether a hazard existed in these conversations, yes or no. Then we got 10 clinicians from 10 clinical specialties to to label them for whether
they had a hazard or not, and we did the same thing with the judge. And the results showed that our judge is at least on par, if not slightly better, than the the real expert clinicians.
The top model, which as of a year ago when we wrote the paper, was Gemini 2.5 Pro. Now we've maybe updated the models. Um it achieved an F1 score of of 0.96. And even maybe more importantly, it
achieved almost perfect sensitivity. Um sensitivity being a very important metric to to healthcare and and to clinicians, of course, because you want to make 100% sure almost that there's
that no hazards appear in a conversation. You would rather overcall hazards that aren't there than undercall hazards that are there. So, now we have an automated judge that
performs at expert level at at expert level, and this is actually what makes this whole process scalable. Okay. So, now Matched can grade thousands of conversations, but grading
isn't technically improving the product. A pile of pass/fails tells you where Dora breaks and where it's not safe, but doesn't actually make the product better. So, how do you do this without
experimenting on the patient? The answer isn't it like maybe a very long ago in our world, 8 months ago, we would manually prompt engineer this. We would look at which agents are going
wrong or which prompts are going wrong, and you'd have to manually prompt engineer. But, we know that prompt brittleness is real, and it's it's quite absurd.
Formatting changes alone have been seen to swing benchmark by 76 percentage points. And reordering few-shot examples flips a model from near random, so near 50%, to near state-of-the-art on some
benchmarks. And hand-tuning can't survive that. It's very subjective, it's not reproducible, and very importantly, it's extremely time-consuming. So, over the last year or so, there's
been these prompt optimizers that have started to come out, and we've focused on those. The one that we use the most is is Jeppa, which stands for genetic pareto. It comes from the same people
who made DSPy, if if anyone knows about them. And how does Jeppa work? You essentially define a metric for what's good is, which I'll I'll get into a bit later.
Then, um you you pass your data through through um it through through Jeppa, and and it tells you which examples failed. Then, you get a very strong LLM to reflect on
the failures and update the prompt automatically. You do this over and over and over again, and it it keeps what they call a pareto frontier of the best prompts until your budget has been
exhausted, and you've now come up with with what what Jeppa comes up with the best prompt. So, we believe this is a much better process from both both a time-consuming
process, you know, it takes maybe manual prompt engineering would take in the order of hours to days, to this is in the hour of minutes. Normally, between 30 and an hour minutes and an hour, you
get an optimized prompt. And very importantly, it's reproducible, and there's a very clear order trail and clear feedback loop. And if anything goes wrong, you can just maybe it's
purely now a data science problem. It's mainly focused on the data, how to make your data right, the feature engineering, and you define the actual metric along with the clinicians.
So, how do you actually know what's good is? Um it's not a flat accuracy score. You don't want just an average of how your whole data set did.
You give it a cost matrix. So, let's go back to our our sensitivity metric. Let's say it's very important for conditions to understand when when and where a red flag is present.
If a red flag is present and you correctly catch it, that's good. If you if you miss it, it is it could be catastrophic. If there's no actual red flag and it over calls um um
that there's a red flag there, it's just mildly annoying to the patient. They may need to ask answer a couple extra questions, but it's not a cast catastrophic harm situation.
So, we what can we do? We can optimize for sensitivity. We can We can work with the feedback metric, and we can just make it um give a higher reward for finding the red flags and a lower reward
for um for missing them. So, you can optimize for certain metrics. You can also optimize for something else that a that a that a for a clinician might want.
They might want to optimize for accuracy or might want to optimize for some other metric. All you have to do is recompile the prompt, and then you got a a new um optimized prompt.
So, remember earlier when we said the we feel like the reactive loop is gone. You ship, watch, and roll back. This is what we believe replaces it. We take real calls, real data.
We um we use then synthetic edge cases which may not come up in real calls, such as like rare symptoms or or mis-transcriptions. We get an optimized prompt through
through Jape or some other prompt optimizer. Then we pass it through through something like Matrix as a simulation safety gate. If anything fails or
anything doesn't look right, we can redo that whole process, redo the data, or or relabel, or get more data. And then after that and you're happy with that, then you can do some gated deploy which
we'll get into a bit. Um the most important thing here is that it's a flywheel. Every single deployment and every new call produces more call data, so your system is consistently
improving. So, as we said with with our matrix framework, we use simulated patients. But, however realistic you think they are, of
course they are not real patients. Passing every test in simulation doesn't prove that Dora actually helps someone in real life. The things might come up in real life that that you can't get in
simulation. It only earns the right to actually try carefully. Simulation is the inner loop. It's fast, it's free, you can do thousands of runs before anyone actually real is is exposed. But,
real patients are the outer loop, and that's where the only real proof is. So, simulation is necessary, but it's not sufficient. Simulation earns the right to to to test
on real people and then eventually real patients. But, you don't just flip a switch. You cross it in stages, and each stage earns the the right for the next. After you've done your simulations and
you're happy with the results, you might do a round of user testing. Then you get supervised clinical evaluation based on those tests, and you and you base it on real patients. You can do some voice
actors, but of course the the most realistic is to get real patients. But, in this step, it's very important that there's clinicians at every step in the loop.
Then you can do some deployments, uh but it's still monitored. And how much autonomy you allow the system to do depends on your evidence. As the system gets more evidence, you can give it more
independence. And underneath all of this, um every call, every data set, and every pinned um prompt, every judge verdict traces back
to the exact hazard that it addresses. That's the real deliverable. The important thing is that you don't ship the model, you ship the evidence when trying to regulate.
So, what can you take back to your own stacks, both in healthcare and and other areas? You first have to define exactly what harm is for your product. You have to manufacture your rare but then but
dangerous cases. Don't wait for them just to happen naturally. Make your evaluation metric your real cost function to optimize. Pin your prompt versions and keep the
traces. These are the important things. The The thing also is that the the work is never done. As you move into new modalities or new languages, there always be new hazards that start to
arise. But with something like Matrix and a an a prompt optimization loop, um you can use the same framework as new modalities arise. You know, when you move into voice for
example, there's things like back channeling and interruptions which which breaks a lot of the the text emails. For example, an agent might be mid safety advice like you must avoid bright
lights and when the patient maybe um um cuts in with some um out of scope question, and weak models usually just forget about the safety advice and just ask answer the next
question. But Matrix captures these things. Um other things that that usually go wrong that we've tested is that um
the the patient could the the Dora or the or an agent could be halfway through giving some safety advice and a back channel just just cause the model to just completely ignore the safety advice
and and stop right there and and wait for the patient to to say something else. The failure models The failure modes The framework doesn't. You still black box
the system, write down the new hazards, and simulate and judge them exactly the that we did over text. Voice is just a new module in the same safety case, and we actually use Matrix in the voice
space to do these exact same things. So, whatever modality you move into, you're not starting over. The same approach finds the hazards before a real user does.
So again, you simulate before it ever touches a patient, and you use an optimization loop to actually improve the system. Thank you very very much for coming to
listen. Um I'm very very open to to talking more about this, and if you want to connect during the conference or after, there's my LinkedIn and socials. Thank you very much.
>> [applause] [music]