In recent years, the dissemination of artificial intelligence (“AI”) into society, the economy and everyday life has proven to be as transformative as mechanisation, electrification, and computerisation – which is why many conclude that we are entering yet another unparalleled moment in history.

The world of labour relations has not been a stranger to this transformation. The use of AI in the management of labour relations – from the recruitment phase to the termination of the employment relationship – is now an increasing reality.

Despite the benefits achieved with the use of algorithms and AI in human resources management, starting with the simplification of procedures, which have become faster and seemingly less subjective, the use of AI also presents numerous practical difficulties for organisations, considering the risks it inevitably entails, especially with regard to the opacity of systems.

According to Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024 laying down harmonised rules on artificial intelligence, “AI systems intended to be used to make decisions affecting terms of work-related relationships, the promotion or termination of work-related contractual relationships, to allocate tasks based on individual behaviour or personal traits or characteristics, or to monitor and evaluate the performance and behaviour of persons in such relationships” are classified as high-risk AI systems, which highlights the care that must be taken when using them.

In the Portuguese Labour Code, the use of algorithms and AI is regulated by Law no. 13/2023 of 3 April, which establishes that the right to equal opportunities and equal treatment in matters of access to employment, training and promotion or career progression, and working conditions cannot be undermined by decision-making based on algorithms or other AI systems. The information duties to be complied with by employers towards employees and representative structures have also been reinforced, with the introduction of the need to provide information (and for union representatives to be consulted) on the parameters, criteria, rules and instructions on which algorithms, or other artificial intelligence systems that affect decision-making on access to and retention of employment as well as working conditions, base their decisions.

Focusing on the termination of employment contracts, we have been witnessing a global “algorithmisation” of the process of selection of employees to be dismissed.

There are plenty of examples in specialised publications, especially from the United States, of the use of algorithms in dismissal procedures. For instance, ample coverage was given to the case of the online sales giant that, using a standardised algorithm (which ignored the variables applicable to each employee), measured the time taken by employees to perform their tasks and dismissed those identified by the algorithm as being slower than average, often targeting pregnant employees.

In Portugal, in 2021, an algorithm-based collective redundancy process involving employees of an airline was widely reported. With the support of a consultancy firm, the airline developed an algorithm to select the employees to be made redundant as part of this process. The algorithm was based on a set of selection criteria, including absenteeism, seniority, qualifications, and the cost of the employees. At the time, the trade unions accused the company of resorting to a discretionary method, while the company claimed that the algorithm applied objective criteria to select the employees, which led to a dispute over the legality of the redundancies that was only settled in court.

In the end, the Lisbon Court of Appeal considered that “such criteria, due to the way they are conceived or the type of (unknown) variables on which they are based, do not allow the employee to know why he was given the classification referred by the Defendant and which implied his inclusion in the collective redundancy”, and that “(...) the criteria chosen to select the employees to be dismissed are not realised”because “(...) although the Defendant has set out the criteria and weighting factors to be taken into account – it has done so in purely generic and abstract terms – not allowing the Claimant to ascertain, with precision and clarity, in concrete terms, how the position (classification) 11 attributed to him and which implied his selection for dismissal was determined”.

In short, the Court found that the matter at issue was the (lack of) transparency of the algorithm applied by the company in the collective redundancy process. In fact, Article 360 of the Portuguese Labour Code states that an employer intending to carry out a collective redundancy must give written notice of this intention, mandatorily including in the notice certain information such as “the criteria for selecting the employees to be made redundant”, which, in the context of a collective redundancy, are not set forth and typified by law. However, the criteria used to select the employees included in collective redundancy procedures must allow those affected to clearly identify the reason that led to their selection, and must also be linked to the market, structural or technological reasons justifying recourse to collective redundancy.

The use of algorithms and AI systems in the process of selection of employees to be dismissed as part of a collective redundancy must ensure not only compliance with the aforementioned labour law requirements for collective redundancies, but also with the personal data regulations applicable to automated individual decisions.

Strictly speaking, the concatenation of the various sources of legislation on the subject and the extent of intervention of AI systems in the dismissal process can determine different solutions regarding the legality of the dismissal under the national legal framework.   

In view of the above, the use of AI systems in dismissals, while an unavoidable trend, should, due to its technical and legal implications, be duly considered in order to ensure that the legality of the dismissal is not brought into question.