---
title: "Hundreds of bills and receipts, one naming rule, and no LLM - Step Toward AI"
description: "One of us renamed about ten years of bills and receipts (utilities, subscriptions, loans, and the mortgage) into one format. An LLM was too costly, slow, risky, and inexact, so we built rules and OCR instead."
url: https://www.steptoward.ai/case-studies/bill-naming-without-an-llm/
---

# Hundreds of files to rename. We left the LLM out.

One of us wanted ten years of bills and receipts named the same way. Older AI did it: simple rules and text recognition, cheaper, faster, and more private than an LLM.

[Take Your First Step](https://www.steptoward.ai/book-a-call/) ([md](https://www.steptoward.ai/book-a-call/index.md))

(Schedule a free 30-minute call to get started.)

## Where it started

This one is personal. One of us had about ten years of bills and receipts saved as PDFs: utilities, software subscriptions, car and loan payments, and the mortgage. That’s hundreds of files, all named by hand. As in most organizations, the names didn’t agree. One file used the billing cycle, another the due date, another the notice date or the invoice date. There was never one rule for which date goes in the name.

New bills and receipts bring a different problem, and they still do. Every one downloaded from a company’s website arrives named whatever the company chose: a random ID, an account number, a long string of letters and numbers, or just “bill.pdf”. Before the tool, each one meant ongoing manual work: open it, find the company and a date, and rename it by hand.

Consistent names matter because the folder then sorts itself: by company, then by date. Any bill or receipt is easy to find, and a missing month shows up as a gap in the list.

The goal was one format for every file, with one set of date rules:

`<source_name> YYYY-MM-DD - <Bill|Receipt|Invoice> - <Note>`

The note is optional, for anything worth flagging, such as “Last Payment”. For example:

```
Car Loan 2025-04-05 - Bill - Last Payment.pdf
Design Software 2025-04-01 - Receipt.pdf
Electric Company 2025-03-14 - Bill.pdf
Mortgage Lender 2025-04-15 - Bill.pdf
```

Some bills cover a billing cycle, so those needed a date range in place of the date: `YYYY-MM-DD to YYYY-MM-DD`. For example:

```
Internet Provider 2025-02-10 to 2025-03-09 - Bill.pdf
```

## Why not an LLM

The obvious move today is to hand each PDF to an LLM (large language model, the kind of AI behind ChatGPT) and ask for the name. We didn’t, for four reasons:

-   **Cost:** It costs money for every file, and there are hundreds, with more every month.
-   **Speed:** It’s slow, and a bulk run had to finish quickly.
-   **Privacy:** These are financial documents, and an LLM service is one more company holding them.
-   **Accuracy:** A file name has to be exactly right every time, and an LLM can give a different answer for the same file.

## What we built instead

A small tool watches an inbox folder. When a PDF lands there, the tool reads any text already in it and checks that text against a list of extractors, one for each company, from top to bottom. Each extractor looks for the marks that identify its company, and pulls out the date or the billing cycle. The first one that matches names the file, and the rest are skipped.

Some files are scanned images with no text to read. Only when the rules find nothing does the tool run [OCR](https://en.wikipedia.org/wiki/Optical_character_recognition) (optical character recognition, which reads the text in an image), then check the extractors again. The quick, cheap step always goes first.

Companies changed how their bills and receipts looked over the years, so some companies need more than one set of checks. This is older, classical AI: rules plus text recognition, the kind of system once called an [expert system](https://en.wikipedia.org/wiki/Expert_system).

## The trade-off

Every new company means writing a new extractor. An LLM would skip that work. But each extractor is written once, and from then on that company’s files get the same name every time.

## How it runs now

It runs on its own. A bill or receipt goes into the inbox folder and comes out named in the standard format, whatever the company called it.

> **Here is the rule:** The newest AI isn’t always the right tool. When a job has to be exact, cheap, and private, simple rules can do it better than a large model.

## Where this fits in AI

“AI” covers far more than chatbots. Here are the terms you’ll hear, from the broadest to the narrowest:

-   **AI (artificial intelligence):** any software that does work we’d call smart. That includes rules a person writes, like our extractors.
-   **Rules engines:** AI that follows logic a person writes down, such as if-then rules, decision tables, or an ordered list of checks. The classic name is expert systems. Our extractors run on one. When the logic is learned from data instead, it’s machine learning.
-   **ML (machine learning):** AI that learns patterns from examples, in place of rules a person writes. Most OCR today uses it to recognize letters.
-   **NN (neural networks):** a kind of machine learning built from layers of simple math, loosely modeled on the brain. Show one neural network thousands of photos of cats, and it learns what a cat looks like without anyone writing down the rules. It’s what unlocks your phone with your face and turns your voice into text. With many layers, it’s called deep learning.
-   **Generative AI:** AI that makes new content, such as text, images, audio, or code. Most AI before it judged what already existed: whether an email is spam, what’s in a photo, or what a customer will buy next.
-   **LLM (large language model):** generative AI that takes in text and generates text, after training on huge amounts of it. ChatGPT, Claude, and Gemini are LLMs.
-   **Decision models:** a neural network that sits beside LLMs rather than under them. It doesn’t write text. Instead, it picks one answer from a list you set, such as approve, escalate, or route, and says how sure it is. Some vendors call these System 1 models, after the fast, gut-check kind of thinking; the slower, step-by-step kind (System 2) is left to LLMs.

Our tool sits near the top of that list: a rules engine, plus OCR. An LLM sits near the end, the most capable layer and the most costly one to run. Most AI news is about generative AI and LLMs, but many tasks don’t need them.

## Why we’re telling you

Agencies have the same kind of work: invoices, receipts, and reports that arrive in a dozen formats. When we look at your team’s repeated tasks, we don’t start by picking a model. We start with what the task needs, and sometimes the answer is a rules engine.

## Not every task needs an LLM.

We'll look at your team's repeated work and tell you which tasks suit an LLM, which suit older, simpler AI, and which to leave alone.

[Take Your First Step](https://www.steptoward.ai/book-a-call/) ([md](https://www.steptoward.ai/book-a-call/index.md))

(Schedule a free 30-minute call. No obligation.)
