Skip to main content
Back to Blog

We Put an AI Classifier Into Our Billing Review — and Gave It Almost No Power

TL;DR

  • We added an AI classifier to billing review in our internal billing app. It labels every time line before a quote becomes an invoice.
  • We did not train a custom model. We used a small, fast general-purpose AI model and made it type-safe.
  • It only suggests. It never changes hours, billing, or the invoice. A manager accepts or overrides.
  • Every label needs evidence. The AI must quote words from the line. If the quote isn't there, the label is thrown out.
  • First run: 47% of lines labeled. Now: 88%. The fix wasn't a better model. It was better categories.

What is a classifier, anyway?

A classifier takes an input and puts it in a bucket.

  • An email → spam or not spam.
  • A support ticket → billing, bug, or feature request.
  • A time line → new development, fix, meeting, or overhead.

That's it. Pick one label from a known list.

There are three common ways to build one.

1. Rules

  • Keywords and if/then logic. "If the line says meeting, label it meeting."
  • Good: cheap, fast, easy to explain.
  • Bad: brittle. People write "call w/ client" or "sync" and the rule misses it.

2. A custom-trained model

  • You collect thousands of examples with the right label.
  • You train (or fine-tune) a model on them. It learns patterns from your data.
  • Good: very accurate and very cheap per run, once trained.
  • Bad: you need lots of labeled data. And every time your categories change, you retrain.

3. A general-purpose AI model (zero-shot)

  • You give a large language model the list of labels and clear instructions.
  • It reads the text and picks a label. No training step.
  • Good: works on day one. Handles messy, human-written text well. Change a category by editing a list.
  • Bad: it can guess, drift, or invent labels — unless you fence it in.

Most of the work in option 3 is the fence. That's what this post is about.

The problem: a slow, manual billing review

Before a quote turns into an invoice, a manager reads every time line. For each one, they decide:

  • Is this new development?
  • A fix?
  • A meeting the client should pay for?
  • Project overhead we should price into support plans?

It's slow. And when you read hundreds of lines, things slip through.

What we didn't build

We did not build a custom-trained classifier.

  • No fine-tuning.
  • No training data pipeline.
  • We didn't have thousands of labeled lines.
  • Our categories were still changing week to week.

Training a model on moving targets means retraining every week. That's the wrong tool for this stage.

What we built instead

A small, fast general-purpose AI model — made type-safe.

  • 🔒 Its answer must fit a strict schema. It picks from a fixed list of labels. It can't invent new ones.
  • 🧩 The labels are typed in our code. The screen, the database, and the tests all share one definition. No mismatched spellings. No "Meeting" vs "meetings".
  • ✅ Our code checks every answer again before anyone sees it. If the answer doesn't fit the schema, it's rejected.

Changing a category means editing one list and the instructions. Not retraining a model.

Three rules that keep the AI in its lane

1️⃣ It only suggests

  • The AI never changes hours, billing, or the invoice.
  • A manager accepts or overrides each suggestion.
  • Their decision is saved. That gives us a record — and future training data, if we ever need it.

2️⃣ Show your evidence

  • Every label must quote the exact words from the time line that justify it.
  • Our code checks that the quote really exists in the line.
  • If it doesn't, the label is thrown out.

This one rule removes a whole class of AI mistakes. A model can't "hallucinate" a reason if the reason has to be copied from the text in front of it.

3️⃣ When in doubt, hand it back

These go to a human, flagged as "needs review":

  • Low-confidence answers.
  • Vague text ("worked on stuff").
  • A line that mixes billable and non-billable work.

The AI doesn't have to be right about everything. It has to know when it isn't sure.

What happened on the first run

We ran it on real work orders. It labeled only 47% of lines.

The reason wasn't the AI.

  • Our label list had no word for "normal feature work".
  • So about half our time had no category to land in.
  • The AI did the right thing: it handed those lines back instead of forcing a bad label.

The classifier exposed a gap in our thinking, not its own.

How we got to 88%

A few rounds of fixing the categories, not the model:

  • We split "fixing a reported issue" from "fixing our own mistake." Now the AI never assumes we were at fault. That matters when the label ends up in front of a client.
  • We added "coordination." This is the overhead that tells us how to price support plans.
  • We added the missing "normal feature work" bucket.

Now 88% of lines get a suggestion. The rest go to review — which is exactly where they belong.

What's next

  • Measure real accuracy. Managers will hand-label a sample. We'll compare the AI's suggestions against them before we trust the numbers.
  • Then, maybe, a custom model. If the managers' saved decisions pile up into the hundreds, a custom-trained classifier becomes an option. Cheaper per run, possibly more accurate.

Not before. You earn a custom model with data. You don't start with one.

The lesson

Getting the categories right mattered more than the model.

If you're adding AI classification to any business process, start here:

  • Write down your labels. Check that every real case has a home.
  • Make the AI pick from that list — and nothing else.
  • Make it show evidence you can check in code.
  • Let it say "I'm not sure."
  • Keep a human in charge of anything that touches money.

FAQ

Do I need training data to build an AI classifier?

No. A general-purpose model can classify text from a label list and clear instructions. Training data becomes useful later, when you want lower cost or higher accuracy at scale.

What does "type-safe" mean for an AI model?

The AI's answer must match a schema defined in code — fixed fields and a fixed list of allowed labels. Anything that doesn't match is rejected before it reaches a person or a database.

How do you stop the AI from making things up?

Two ways. First, it can only choose from allowed labels. Second, every label must quote words from the original text, and code checks that quote is really there.

When should you switch to a custom-trained classifier?

When your categories are stable and you have hundreds to thousands of verified examples. Human-approved suggestions are a great way to collect them.

Can this work with FileMaker or other existing systems?

Yes. The classifier is a small service. It reads records, returns a suggestion, and your existing app — FileMaker, a web app, or anything with an API — shows it to the person who decides.

---

Have a manual review process eating your team's week? We build AI that suggests, explains itself, and leaves the decision with your people. Schedule a free integration audit →

Ready to discuss your project?

Contact us today for a free consultation on your AI, web, or FileMaker project.

Get in Touch