<andres />

Andres dos Santos

When AI fails

AI looks like a silver bullet—but it isn’t. A quick breakdown of when AI fails, why it happens, and what you need to watch out for to avoid costly mistakes.

The topic of the moment — AI — is the solution to many problems, from programming to financial, education, medical, legal fields, and more…it really seems like a silver bullet. But as not everything that glitters is gold, I did some research and wanted to share with you “When AI fails”. So, let’s get into it — no fluf (I’m not charging you by the world).

When context is missing (the biggest failure point of AI)

AI doesn’t understand what you want if you don’t know how to explain it. It completes patterns based on what you wrote — and that’s the key point. If you don’t provide everything needed for a full understanding of the problem, it fills in the gaps “by guessing”, and the problem is that it does this with full confidence.

What does lack of context look like in pratice? It’s when you don’t specify: the real objective, technical constraints, environment (stack, version, architeture), bussiness rules, and important trade-offs.

For example, a bad prompt: “Create an authentication function in PHP”. Now a better example: “Create a function in PHP 7.4 using JWT, without a framework, following a service pattern and separation of concerns”. In others words, the second sentence aligns with your project and is much closer to reality.

The pattern is always the same: less content → more assumptions → more errors. AI doesn’t fail because it’s dumb; it fails because you left empty space for it to fill.

When you need absolute precision

AI doesn’t guarantee truth — it guarantees statistical coherence. In other words, it builds an answer that looks correct, but isn’t necessarily correct. In scenarios where errors are unacceptable, this breaks everything.

So, in situations where even a small mistake creates real impact, there’s no room for “almost right”. And if manual validation is expensive or ignored, you’ve got a serious problem.

For example, if you use prompt “How to convert a date in PHP?”, the AI might respond with:

formatDate($date)

The problem is that this function doesn’t exist natively. It looks plausible and can easily slip by unnoticed, resulting in wasted time debugging. That’s just a simple example — now imagine something more sensitive like a process, financial calculations, or applications in healthcare.

The key point is: the more critical the decision, the less you can trust AI without validation. If the cost being wrong is high, don’t trust — verify.

When the problem is truly complex

This is where you separate those who use AI from those who actually understand how to use AI. It’s excellent with know patterns, repetitive tasks, and well-defined problems, but it struggles when real complexity comes into play. But why?

Because complex problems aren’t just about code. They involve accumulated context, historical decisions, trade-offs, and system-wide impact and that doesn’t fit into a prompt.

Real complexity is when you have to deal with multiple bussiness rules, different system states, external integrations, scalability concerns, and decisions that affect the future of the codebase.

For example, when you need to decide on a system architeture, asking a prompt like “What’s the best architeture for my system?” isn’t ideal. The AI might suggest microservices, clean architeture, event-driven approaches and all of that sounds correct. But it ignores team size, technical maturity, maintenance cost and actual needs. The result? Overengineering.

And here we fall back to point one again: lack of context. The key idea is this — AI handles simple problems well, but when things get complex, it tends to oversimplify.

When it depends on up-to-date data

AI doesn’t operate in real time. Without access to external sources, it relies on knowledge up to a certain point in time, doesn’t see recent changes, and fills in gaps with assumptions and as a reminders, those assumptions are made with full confidence.

In pratice, whenever you need recent data, frequently changing rules, updated technology versions, or dynamic external information, AI is likely to fail.

When you don’t know how to validate

This is critical point, especially in programming. AI doesn’t need to be right to look right. If you don’t have the knowledge to validate something, any well-written answer can become “truth” and that’s where the worst scenario begins: the invisible error.

AI can reduce the friction of producing answers, but it doesn’t reduce the risk of logical, technical, or business errors. If you can’t identify those, you’re just outsourcing decisions.

So that’s it—my first post. In the next ones, I want to talk more about AI and how it can impact your day-to-day, maybe even help you solve problems.