Full Transcript: How to Use AI to Diagnose Margin Leakage

Episode 2|~27 min|Published May 5, 2026

Why Margin Leakage Is Hard to Diagnose

AI can take four files most services businesses already have, a job cost summary, original estimates, a change order log, and project manager notes, and produce a ranked diagnosis of which jobs leaked margin, the root cause of each, and which dollars are still recoverable. The entire analysis takes about twenty minutes.

If your board asked you last Friday why margin was off plan, could you answer with concrete evidence and not anecdotes? Many operators can't, not because the answer doesn't exist, but because it's spread across four or five systems and nobody really has the bandwidth to pull it together quickly and efficiently.

In this episode, I'm going to take four files that most service businesses already have and drop them into a single AI chat with just one prompt. In minutes, AI will give us a table that identifies the root cause of every leaking job, the evidence behind it, and which dollars are still recoverable.

But here's where it gets even more interesting. I'll run a second prompt that shows the leakage patterns: which job types leak, in which ways, whether a specific PM or branch is driving a disproportionate share, and which jobs have the most recoverable dollars right now. That's the part that turns this from a postmortem into a catalyst for change that increases the bottom line.

Preparing Your Data

Data preparation for margin leakage analysis means selecting the right jobs to examine and exporting four files from systems the business already runs. The key step most people skip is filtering to the 25 worst performers first, so the AI focuses on the jobs where the most dollars are at stake.

We're going to start with a data prep checklist. Part of that is picking the right model. We're going to use the most advanced model of any AI we pick. I'm using ChatGPT today in thinking mode. For Copilot, if you can switch to GPT, go ahead and use 5.5 or whatever is latest and pick Think Deeper. For Google Gemini, you would be using Pro. For Claude, Opus 4.6 or 4.7 is the way to go. I have a little warning not to use the fast models because they are not that reliable, but the thinking models have given really good results in testing.

The first file is the job cost summary. This is really the main part of the analysis. Without it, you can't do any of this. It lists the jobs themselves, how much was budgeted, how much actually came in, and everything in between. You should be able to export it from your closed jobs report from your ERP as a CSV file. We're not going to run more than 25 jobs at a time. The AI can only really accurately reason across about 25 jobs because we're feeding it a lot of data.

Now, your quarter might be producing 100 to 200 closed jobs. That's fine. You can export all of them, and what we're going to do is pick and filter the 25 worst performers, the ones that are leaking the most. We add a simple variance formula: actual revenue minus actual cost, minus bid revenue minus bid total cost. Sort smallest to largest, and the top 25 are the ones we analyze.

Next, we need the original estimates. These will likely be PDFs with scope of work, key assumptions, bid summaries, and projected gross margin. Then the change order log for those 25 jobs. And finally, the project notes, which you can pull directly from your ERP.

Running the Master Analysis

The master analysis prompt includes a leakage threshold, a root cause taxonomy, and a scoring methodology that tells the AI how to connect the dots between estimates, actuals, change orders, and field notes. You paste it once and upload files as the AI requests them.

Just like in all my walkthrough videos, you have a master prompt that you can simply copy and paste directly into the AI tool of your choice, and it will walk you through doing this step by step. We copy the prompt, paste it, and send.

First thing it tells us: it understands the role. It's supposed to diagnose margin leakage across jobs. Then it asks for the job cost summary. It knows to keep it to twenty-five jobs. Next, the original estimates. We have to upload them in batches of ten because AI chats generally don't allow uploading more than ten files at a time. It knows it should wait for all batches before moving forward. After all twenty-five estimates are uploaded, it asks for the change order log, then the project notes.

It asks two quick questions: what's your company name, and should it use the default leakage threshold. You can just say yes. Then the analysis starts. It usually takes a few minutes.

Understanding the Root Cause Output

The output table ranks each job by variance and assigns a root cause drawn from a fixed taxonomy: labor overrun, material price escalation, scope creep without change order, subcontractor cost overrun, schedule delay, or estimating error. Each diagnosis includes supporting evidence cited from the source files and a confidence level based on signal consistency.

It gave us a list of the jobs in ranking order of the variance. Starting with $28,000, which is the highest. Now, the ranking itself isn't insightful. We knew this already from our sort. But where it gets interesting is the root cause. The AI is inferring, based on the notes, the estimate, and the change order file, what is most likely the leakage cause.

Some root causes might not be obvious, things like scope creep without a change order, or material price escalation. Finding the root cause at scale for 25 jobs in a couple of minutes is pretty amazing, especially when you compare it to somebody having to do this manually.

What's also interesting is the confidence level. If the confidence is high, it means there are a lot of overlapping signals across the different files. For jobs with low or medium confidence, maybe the change orders don't have notes listed in them, so the evidence is thinner. That's typical. Not every single change order will have notes.

The supporting evidence column gives you specifics. For a scope creep diagnosis, it might say "actual labor was $24,000, field tech note found about 28 linear feet of corroded main behind the wall on floor six." For a schedule delay, it might reference "residents can't be moved easily, working room by room with 48-hour notice." It also estimates what amount is recoverable and provides a suggested next action, usually specific to the PM who ran the job.

The Pattern View

The pattern view prompt groups the same results by project manager, branch, customer, job type, and service line, surfacing which patterns are systemic and which are isolated. This is the layer that turns individual job diagnoses into organizational insight a COO or CFO can act on.

Now we paste the second prompt, the pattern view. What this does is show us patterns that AI is seeing based on the analysis and all the data we gave it.

Broken out by project manager, we can see the total dollars leaked per PM and the most common root cause for each. With Brian, it's scheduling delays. With Andrea, it's estimating error. But most of them, it's scheduling delays. That's an interesting insight already. It might be something you know, it might not, but at least this puts it into concrete terms for the 25 worst offenders.

By branch and region, we can see the most leaked dollars are from South Florida, although they're all pretty close. What's interesting is the root cause is different by branch. South Florida's most common root cause is scheduling delays. Charlotte is scope creep. Atlanta is estimating error. Each region has a different root cause.

By customer, we can see particular tendencies. Novant Health has scope creep as the most common issue, with the most leakage out of anybody.

Then we get the root cause breakdown itself. Scheduling delays and estimating errors are by far creating the most leaked dollars. And it explains why, with coaching insights on what might be done with specific team members to help plug the leakage. It also highlights what's recoverable this week.

Going Deeper: Building an Action Plan

We know that scheduling delays are the biggest issue. There may not be that much that can always be done about that because a lot of it is on the customer side. But estimating errors are the second biggest reason, eight jobs, $74,000 just in the last quarter. If we want to dig in, we can ask AI to give us more insights.

I asked: "Can you tell us a bit more about the estimating errors? I want to address this and build a concrete plan."

It starts pulling out more notes. This is almost where it becomes like a team member, where you would have asked somebody to write up a report about this, which could have taken a week. But here it does it instantly. It finds the pattern: conditions were too optimistic, integration system complexity was underpriced. The bids were not wrong because material or labor rates were off. They were wrong because the assumptions behind the scope were too thin.

Then it writes a concrete plan. It recommends creating a bid assumption risk checklist. It recommends adding conditional scope language to the estimates. It suggests requiring a PM-plus-estimator pre-mortem for high-risk jobs. It proposes building a small estimating error feedback loop and changing approval authority for risky fixed-price bids.

I was curious about that feedback loop. Could we leverage AI to do it for us? It created an AI-assisted workflow: add job closeout data, feed AI these files, and AI drafts the estimation lesson record.

Why It Matters to Keep Going

We started with a helpful analysis of root causes with cited evidence and confidence labels. But we went way deeper. We found patterns using the second prompt, and then we went even deeper by asking about action plans and extrapolating more details about a specific root cause.

It never has to stop with just AI giving you an answer or an analysis. You can always go deeper. Whatever you come up with in your mind, any questions, thoughts, or theories, you can put it into AI and run with it and see what happens.

The last part was really important: not just getting information, but figuring out how to use AI moving forward to solve a certain problem. We saw that it created a tool that's easy to use, where all you need is a few pieces of data and AI will do something with it. As always, I encourage everyone to keep pushing, keep asking questions, and keep being curious, because the value of using AI just based on what you're thinking can be incredibly powerful.