· 3 min read
When not to use an LLM: a checklist we run before every automation project
Half the AI automation requests we get would be better served by plain code. Here's the checklist we use to decide, with examples from invoice processing and lead routing.
Sandeep Kumar · Founder & Lead Engineer, Nextlink EXIM
Roughly half the "we need AI for this" conversations we have end with us recommending less AI than the client expected. That's not a sales tactic. Plain code is cheaper, faster and easier to debug, and an LLM should earn its place in a pipeline step by step.
Here is the checklist we go through.
1. Is the input actually unstructured?
If the data arrives as JSON from an API, a CSV with fixed columns, or a form with validation, you don't need a language model to read it. You need a parser.
LLMs earn their keep when the input is messy and varied: PDFs in 300 layouts, free-text emails, scanned documents, support conversations.
Example. A distributor asked us to "use AI" to process supplier invoices. The invoices were PDFs from hundreds of suppliers, so extraction genuinely needed a model. But matching the extracted lines to purchase orders, checking totals, and validating GST numbers? Plain code, every time. The final pipeline had one LLM step out of seven.
2. Is there a correct answer, and can you check it?
If a step has a verifiable right answer (does this total add up, does this PO exist), write code that checks it. Never let a model's confidence stand in for a check you could run deterministically.
This matters twice: it catches model errors, and it gives you a clean place to route exceptions to a human.
3. What happens when it's wrong?
Ask this for every step. If the answer is "a customer gets a wrong refund" or "an invoice is paid twice", the model does not get to take that action. It produces a recommendation, and a person or a deterministic rule approves it.
If the answer is "a lead gets tagged with the wrong industry and someone fixes it later", fine, let the model act.
4. How often does it run, and what does that cost?
A model call that costs a few cents is nothing for 500 invoices a month and a real budget line for 5 million events a day. We estimate cost per unit at the proposal stage and write it into the document. Clients are sometimes surprised in both directions.
5. Can you build an evaluation set?
If you can't collect 50 to 200 real examples with the correct outcome, you can't measure whether the model is doing a good job, and you can't safely change models later. Sometimes this is the step that convinces a client to delay the AI part until they've collected the data.
6. Would a simpler model do?
Classification with a handful of categories often works fine with a small fine-tuned model or even a well-built rules engine. We reach for a frontier model when the task needs reasoning over varied context, not for everything.
A worked example: lead routing
A client wanted "an AI agent to route inbound leads to the right salesperson."
- Form data (country, company size, product interest): structured. Rules.
- Free-text "tell us about your project" field: unstructured. LLM extracts intent and urgency.
- Routing decision: deterministic table based on the above.
- Draft first reply to the lead: LLM, reviewed by the salesperson before sending.
- Writing to the CRM: plain API call, idempotent.
One pipeline, two LLM steps, both low-risk, both measured. The client's original picture was a single agent "doing everything". The result is more reliable and about a fifth of the cost.
The short version
Use code for anything structured, verifiable or dangerous. Use a model for the genuinely unstructured step in the middle. Put a person on anything that touches money, deletion or a promise to a customer. Measure it.
If you want a second opinion on an automation you're planning, send us the rough outline. We'll tell you where the model belongs, and where it doesn't.