Ibrahim Diallo was allegedly fired by a machine. Recent news reports relayed the escalating frustration he felt as his security pass stopped working, his computer system login was disabled, and finally he was frogmarched from the building by security personnel. His managers were unable to offer an explanation, and powerless to overrule the system.

Some might think this was a taste of things to come as artificial intelligence is given more power over our lives. Personally, I drew the opposite conclusion. Diallo was sacked because a previous manager hadn’t renewed his contract on the new computer system and various automated systems then clicked into action. The problems were not caused by AI, but by its absence.

The systems displayed no knowledge-based intelligence, meaning they didn’t have a model designed to encapsulate knowledge (such as human resources expertise) in the form of rules, text and logical links. Equally, the systems showed no computational intelligence – the ability to learn from datasets – such as recognising the factors that might lead to dismissal. In fact, it seems that Diallo was fired as a result of an old-fashioned and poorly designed system triggered by a human error. AI is certainly not to blame – and it may be the solution.

The conclusion I would draw from this experience is that some human resources functions are ripe for automation by AI, especially as, in this case, dumb automation has shown itself to be so inflexible and ineffective. Most large organisations will have a personnel handbook that can be coded up as an automated, expert system with explicit rules and models. Many companies have created such systems in a range of domains that involve specialist knowledge, not just in human resources.

But a more practical AI system could use a mix of techniques to make it smarter. The way the rules should be applied to the nuances of real situations might be learned from the company’s HR records, in the same way common law legal systems like England’s use precedents set by previous cases. The system could revise its reasoning as more evidence became available in any given case using what’s known as “Bayesian updating”. An AI concept called “fuzzy logic” could interpret situations that aren’t black and white, applying evidence and conclusions in varying degrees to avoid the kind of stark decision-making that led to Diallo’s dismissal.

The need for several approaches is sometimes overlooked in the current wave of overenthusiasm for “deep learning” algorithms, complex artificial neural networks inspired by the human brain that can recognise patterns in large datasets. As that is all they can do, some experts are now arguing for a more balanced approach. Deep learning algorithms are great at pattern recognition, but they certainly do not show deep understanding.

Using AI in this way would likely reduce errors and, when they did occur, the system could develop and share the lessons with corresponding AI in other companies so that similar mistakes are avoided in the future. That is something that can’t be said for human solutions. A good human manager will learn from his or her mistakes, but the next manager is likely to repeat the same errors.

So, what are the downsides? One of the most striking aspects of Diallo’s experience is the lack of humanity shown. A decision was made, albeit in error, but not communicated or explained. An AI may make fewer mistakes, but would it be any better at communicating its decisions? I think the answer is probably not.

Losing your job and livelihood is a stressful and emotional moment for anyone but the most frivolous employees. It is a moment when sensitivity and understanding are required. So, I for one would certainly find human contact essential, no matter how convincing the AI chatbot.

A sacked employee may feel that they have been wronged and may wish to challenge the decision through a tribunal. That situation raises the question of who was responsible for the original decision and who will defend it in law. Now is surely the moment to address the legal and ethical questions posed by the rise of AI, while it is still in its infancy.