Sei interessato ai nostri servizi di consulenza?

1 Clicca nella sezione contatti
2 Compila il form
3 Ti ricontattiamo

Se hai bisogno urgente del nostro intervento puoi contattarci al numero 370 148 9430

RENOR & Partners

I nostri orari
Lun-Ven 9:00AM - 18:PM

“It takes AI!” – When an if() would suffice.

by Simone Renzi / June 9, 2025
Post Image

This post is also available in: Italiano (Italian)

The era of AI washing

Artificial intelligence is, without a shadow of a doubt, one of the most important technological developments and “discoveries” of our time. I use the term “breakthroughs” in quotation marks because in fact, the theory behind AI dates all the way back to 1956, the year of the famous Dartmouth conference that sanctioned its official birth.
Yet only in recent years has AI burst into the consumer and managerial universe, becoming a magic word good for every context: marketing, products, investor slides, company reports, etc.

The point is, if yesterday the fashion was the iPhone, today the fashion is artificial intelligence. Everyone wants to insert it everywhere, even where there is no need to integrate it. Sometimes, in fact, it is not only useless: it is less efficient, more fragile and more expensive to maintain than a classical finite-state algorithm. But it matters little: the important thing is to say that AI is there.

To better explain what I mean, I want to start with a glaring and absolutely real example.

AI? No, just a while is enough: the case of the intelligent PDF

A short time ago for a staffing company we have as a client, I was asked to develop something to help them send all the CUs. Speaking of thousands of employees you can imagine the time it would have taken from the poor administrative workers to manually unpack a PDF containing all the CUs of all the employees, and send them one by one manually.

Let us then imagine that we have a textual PDF, containing thousands of Single Certifications, of each employee. Thousands of multiple documents from consecutive users. Each user has his CU that can have 8, 10, 12 pages and we want to divide it into as many PDFs as there are employees.

What would a developer do?
First it would open the file to be split, analyze it, and notice that the first page of each user’s CU contains the tax code in the header. Good: there is a pattern!
What do you think then?

“Great! I write a script with a while that loops each page of the document starting from the first to the last, inside the loop I insert a regex that looks for a tax code, I validate it to make sure that what it fished for me is indeed a tax code and if the validation is successful, I mark that page as the start of a new CU of the employee. Continuing to process the other pages, as soon as I find another one, I save the whole previous block in a new PDF and send it as an attachment to an email extracting the employee’s data from the DB using as a search parameter just the tax code that I have in my nice variable and continue like that to the end.”

Elegant solution. Linear. Readable. Reliable and above all very fast!
No AI. Only structured logic, deterministic programming, and pattern analysis.

Yet they wanted AI: “But can’t we use AI to automatically identify where each document starts?”

Of course you can use AI, but using AI to figure out from which page to which page a CU starts and ends is like equipping yourself with a laser cannon to kill an ant. Also, AI has very long inference times, compared to the deterministic algorithm that processes huge masses of data in seconds.

But what about the costs?

Of course! There are also costs!
Processing a document with thousands of employee CUs and tens of thousands of pages in addition to being time-consuming has costs that can be anything but insignificant. Depending on the model, one could spend even more than 500 euros to process tens of thousands of PDF pages.

Determinism vs. AI: two approaches compared

Once it is clear that in our PDF example the simplest and most effective solution is deterministic, it is worth reflecting more generally on when it makes sense to use a logical, predictable approach and when it may make sense to introduce an artificial intelligence layer.

The deterministic approach

Logical, transparent, traceable

A deterministic algorithm is composed of explicit rules and predictable behavior. For every known input, the output is guaranteed and replicable. It does not learn, but does exactly what you tell it to do.

In the case of our PDF, the structure is clear because we have the fixed pattern of the tax code, variability is practically zero, and the target is logically definable. In these cases the deterministic approach has enormous advantages: it has a lot of computational efficiency and can therefore run successfully even on devices with minimal resources. It is reliable, easily testable, and can be debugged immediately. The whole flow is understandable even by a team not experienced in Machine Learning. And that is why going beyond this solution because we want AI is not only unwarranted but also counterproductive.

The AI-driven approach

Flexible but poorly predictable, expensive, and not always justifiable.

When we talk about AI we often mean systems capable of learning from examples (machine learning), generalizing patterns even in not perfectly defined contexts, handling ambiguity and noise in data. All of this is useful if and only if the data do not follow rigid patterns or patterns not known a priori, the context is chaotic, e.g., OCR on photos taken from smartphones that have unpredictable variability in quality, or lastly, explicit logic fails because the edge cases are infinite or otherwise unpredictable.

In our PDF example, there is no ambiguity, no noise: using a neural network to identify the tax code is wasteful, both technically and economically.

All this, however, does not stop certain companies, driven more by fashion than engineering, from coming up with solutions like, “let’s train an NLP model to recognize headers or let’s use GPT to segment documents, or let’s use a supervised classifier to figure out whether a document is the beginning or not… all to… Do what a preg_match() solves in one line of code.

Let us get our feet back on the ground and remember that AI for when impressive is only a tool. There is no such thing or at any rate, at least for a developer, there should be no war between deterministic approach and AI. They are both tools… But engineering logic teaches us to choose the simplest, most effective, and most justified tool for the problem it needs to solve. AI makes sense where determinism does not reach: computer vision on fuzzy images, speech recognition, predictions based on complex time series, deep semantic analysis. But where there is a rule, a predictable structure, a valid logic, AI is not only useless: it is noise, complication and cost.

Intelligence is not artificial, it is by design

Artificial intelligence is an extraordinary tool, but like all powerful tools, it must be wielded judiciously. It is not a magic wand to wave over every problem, nor is it a key to slip into pitches to impress investors.

There is a fundamental difference between doing innovation and pretending innovation. Today, too many solutions are thought of starting with the tool and not the problem.
The result is over-engineered systems that are expensive, fragile, often also unresponsive and ultimately useless.

Excuse me so much, but if you go into a company to solve problems for it and make it technologically efficient, the first thing you do is what? See where you can apply Artificial Intelligence? Or understand where the data comes from, how it moves, study how the company works, identify machinic processes that can be automated, and then propose solutions based on the problems found?

I would say with my eyes closed the second one!

In the real world, good engineering is that which solves the problem in the simplest, most elegant and sustainable way possible. Even if it doesn’t make the news. Even if it doesn’t say AI-powered.

The future of computing will not be dominated by those who stick neural models everywhere, but by those who know how to choose when they really need to. By those who have the courage to say, “No, an if() is enough here.”

Perhaps it is from this technical sobriety that a new idea of competence can be reborn: one that is measured not in buzzwords but in design clarity, efficiency, and accountability.

Scegli un'area

CONTATTACI

Ti risponderemo entro 24 ore

TORNA SU