Intro0:00
Alright, hello everybody. Thank you for coming. I'm Dan Bjornn, I'm a senior data scientist at Lease End. Lease End, we connect people who are coming to the end of their auto lease with financing options so that they can buy out their lease and keep their car.
Now, as part of this, we built an LLM-based application in late 2024 to help our customers connect with, uh, with our sales team. This application allowed them to send messages through text, they could ask questions about the sales process, they could schedule calls, they could get reminders, all of this stuff.
Our first solution used a workflow-based approach, built on top of a RAG system where we searched a vector database of messages that we had already seen and classified with the customer's intent. So, for example, a message saying "call me tomorrow" would be classified as "the customer wants to, uh, wants to talk later."
A message saying "I've got time now" would be classified as "the customer wants to talkright now." This has worked, but not super amazing. There's a lot of nuance in messages and conversation, and this RAG approach just couldn't quite pick up on that nuance, and so we started to look for, uh, for new options to improve this.
Now, naturally, being a data scientist, my first thought was, "Hey, let's start fine-tuning." This seemed like a fun thing to do, and I was sure that this was theright call. There's a few reasons for that. First of all, we needed better accuracy.
Why fine-tune1:54
Our entire system was built upon us getting the user's intent correct: did they want to talk now, did they want to schedule a call, did they want to opt out. All of this hinged on that decision, and so we needed to make sure that we got that first and foremost.
Next, we could use smaller models with fine-tuning, and so this would lower the cost and also lower latency. So this was really important for us because we were responding to thousands of messages a day in real time, and so it would help us scale a lot.
Then next, like I said, we were classifying the intent of the user, and so this was a very narrow, structured task that we were trying to do, and so it lent itself very nicely to supervised fine-tuning. We would bucket that conversation in one of six different categories, and the model would learn the differences between those.
So it seemed like a great option there. Lastly, I believe that this would help us have a little bit more control over our destiny with the model providers. The idea was that we had the data, and all we would need to do is pass that into a new model, go through the fine-tuning process, and we could get similar results no matter what we decided to use.
Pipeline and ROI3:32
So we could be model agnostic. So this was the approach that we took, and I built a pipeline to collect examples, run LLM-as-judge classifications to label our data. I'd manually review that, create holdout sets, go through the fine-tuning process, check my metrics.
This was a data scientist's dream. And the numbers sure helped. Within a year, this application had helped us bring in $12 million of revenue at a 50x ROI. It was pretty awesome. But the whole time, it was quietly accumulating debt underneath that we didn't see.
So I want to show a couple examples of how this application could get things wrong. First of all, the confused confirmer is a situation where when customers set up an appointment with a sales rep, we send them a confirmation message to let them know that it's been scheduled and give them the details of that.
Failure modes4:24
So a conversation may look like this: we reach out and say, "Hi Tracy, just confirming your Lease End call with your advisor is set for Thursday at 2:00 PM. We'll call you then." Tracy then sends us a message back saying, "Sounds good."
And then our LLM responds with, "Great, I'm calling youright now." It's not what we want. We just confirmed an appointment for a following day, and then all of a sudden we start calling them. This led to frustrated customers and some missed opportunities.
The next one, I've come to lovingly call the overeager puppy.
The conversation looks like this. So first, "Hi James, this is Alex with Lease End, reaching out about your upcoming lease maturity." James then says, "Hi, good morning." And, "Good morning, I'm giving you a call." Just like a puppy that gets so excited that somebody's giving it attention, our model decided to give a callright there.
Obviously, this is not what James wanted. This actually did happen in production. Very embarrassing there. But these are a couple examples of where it went wrong. And don't get me wrong, the app did well. The revenue numbers show that it was working, but it could also mess up pretty spectacularly.
Retrain cycle6:04
The big issue wasn't how to fix it, but how to make the fix manageable. The fine-tuning process was pretty complex. First, we needed to gather examples of the problems that we started to see. Then we needed to ask ourselves, do we have enough examples to go through fine-tuning?
If not, we synthesized those examples. We passed it through an LLM. It created some possible examples there. We'd have to validate those, which was a very manual process because we wanted to make sure it had the best training data possible.
And then once we had enough, we labeled those with the categorization bins, and we validated those through a manual review. Surprisingly, the fine-tuning process was the shortest part of all of this. It normally took about an hour, depending on the size of the data that we had.
But we never got it on the first iteration. Normally what happened was we would fine-tune and we'd evaluate this, and we fixed the problem that we were just trying to solve, but then we caused regressions and other things.
And so this turned into kind of a whack-a-mole process where we would solve something new, but then other old issues kept popping up that we had to whack down. This whole process took about a week to gather the data, label everything, go through the fine-tuning process, and iterate, and then deploy.
So it was costly. Therefore, we needed to triage all of these issues that we ran into. We asked ourselves three questions before we did any retraining: How frequent is the issue? Is it something that customers are seeing every day?
Is it one-off? One big exception to this was if it was hurting the customer experience too much. So for example, this would be somebody repeatedly stating what their preference for a call time is, and then the model ignoring that.
Another one would be a customer scheduling a call. We tell them that we've scheduled it for them, but we don't return the payload in the proper way, and so the call never gets scheduled, and so we don't follow up with them.
Triaging bugs8:39
So these kinds of things needed to be fixedright away. But before we did that, we asked the last question: Is there anything that we can do in order to prevent a retrain? Can we have some kind of a Band-Aid fix to get out there so we don't have to go through a whole week-long process for one or two issues?
And so we ranked our own bugs based on how much customer pain we could tolerate at the moment. So not a great situation to be in with a production system. This led to what I've come to call the calcification tax.
The more we used the model, the more rigid everything became. This manifested in a couple different ways. First, we were locked into our model. You remember when I said that fine-tuning would give us more freedom in what model we did?
Calcification tax9:31
That was not the case.
Within providers, there's nuance between one model version to another, and so that changes the training data that you need to provide it. Across model providers, it's extremely different. The structure of the data you need to pass to it would be different, the amount of the training data to get good results, the way to interact with the training interface.
All of this caused a lot of complexity, and so it was just too costly for us to switch. And so
we kept the same model for consistency because we already had a lot to do with each retraining process, and we couldn't afford to upgrade the model. So the other way that this locked in was architecture. We built this app in late 2024 when workflows were kind of the gold standard if you wanted good production results.
And the AI world moves very fast, and we couldn't adapt to that because we were so locked into this, just trying to keep it running, and we couldn't take advantage of the new architectures and improve performance that way.
So earlier this year, I had an aha moment. We started using Claude Code for our coding tasks, and I noticed that we never needed to change the model depending on what task we're using. We just changed the skill, the resources that we passed it, the context.
Aha moment11:18
You drop in the better context, you get better results. And I thought, "Why can't we do this with our messaging app?" This was obviously difficult for me to admit because I was the champion for fine-tuning, and luckily we were able to piggyback on a project that was already happening, and so we migrated our workflow approach to a series of skills, tools, and resources that the skills could load into or load up and get that context.
And so we pushed this as one of our first production tests of our new agentic framework that was being built already. Now, I want to compare the process before and after our rebuild. Before, we already went through kind of the training cycle, but there was this triage cycle beforehand where we needed to make sure that we had reached a critical mass of problems before we would even attempt to fine-tune again to improve everything.
The rebuild12:14
Like I said, this took about a week, so it was a long process, costly. After the rebuild, it was a simple process of you find a problem, you adjust the system prompt or the skill that was affected, we validated performance on a curated set that we had been collecting over the time that this was in production.
We iterate a few times, and then we deploy that simply by uploading MD files to an S3 bucket. This whole process, from discovering a problem to deploying the fix, we reduced down to less than an hour. So it extremely improved all of this, and we could be far more reactive, give our customers way better performance or better experience there.
Faster fixes13:08
Now, I'll be honest, it did cost us a little bit more per message. We were using better models, so the API costs were a little higher. But
accuracy went way up. I said before that accuracy was the key to getting all of thisright, and we did that. Accuracy was far better with this than it ever was with fine-tuning. Next, like I said, we reduced our fix process from days down to minutes.
Next, we were able to unfreeze our model and finally get that freedom from a vendor that we never had with fine-tuning. Our agentic framework was built model agnostic, so we could use OpenAI, we can use Anthropic, we can use any other model that we want.
The important part is the context that we're providing to that model. And then lastly, while it cost us a little more per message, the total cost went down because we were spending far less time trying to keep it up and running and fine-tuning to keep it working properly.
So before you fine-tune, I'd ask you, "Can you cross your reason off of this list?" So I thought we would get better accuracy. The rebuild beat the fine-tuned model. I thought we would get lower cost of the volume we were doing.
Before you fine-tune14:54
I was looking at the wrong costs. We paid more per message, but the total cost ended up going down with our rebuild. Lower latency. We did see marginal gains on these smaller models, but they were so small that in practice it really didn't make any difference.
And then maybe you've got a narrow or structured task. Our textbook case still became tech debt.
And lastly, vendor control. It's not as simple as just plugging the data in. The other two situations where you might have privacy and data control, or you need some offline solution, I would say these are the situations where a fine-tuned model may be useful, but you need to be cautious.
There are other solutions out there, but you need to make sure that it's not causing issues in the long run. So finally, fine-tune only when you literally cannot call a frontier model, and even then, your decision still has to beat the tax.
Thank you.





