Artificial Intelligence and Justice – Brazilian Supreme Court
I highlight here three significant fragments of the General Report Public Call 01/2023 (report on Artificial Intelligence presented by companies to the Supreme Court of Brazil) published in full on the internet that deserve attention.
“Prototypes should not generate “hallucinations”, that is, present incorrect or false data.” P. 8
“As a parameter, companies that opted for open source tools presented an average cost of US$44.50 (forty-four dollars and fifty cents) to evaluate the 310 processes, while solutions in market cloud environments indicated expenses ranging from US$99 (ninety-nine dollars) to US$200 (two hundred dollars) for evaluating the data set in question. Solutions that used only proprietary tools showed average costs of US$533 (five hundred and thirty-three dollars), considering monthly usage proportional to the volume of call data.” P. 22
“After the legal evaluation of the summaries produced, it was found that no solution was able to fully meet the requirements presented. In all cases, at least one of the items was not indicated satisfactorily. That is, all the reports failed to present information necessary for an adequate understanding of the judicial process in question, whether indicating it partially, indicating it in error or failing to indicate it at all.” P. 23
The requirement explained in the first fragment indicates that the authorities at the top of the Brazilian Judiciary seem to have become easy prey to what could here be called “magical thinking”. Artificial Intelligences are incapable of not producing hallucinations, in fact they cannot even detect when they are or are not doing so. The risk of producing incoherent, incorrect, inadequate results and contaminated by some type of bias is inevitable, especially when talking about text-generating AI.
In 2023 I developed an ancient philosophy test to apply to ChatGPT and obtained an extremely inadequate result. A year later, this same test was applied to Gemini AI and the result provided produced the same inadequacy. The problem appears to have the same origin. AIs assign specific values to words present in a prompt to calculate probabilities and provide the best answer based on the databases they have access to. But they are not able to understand contexts that can be associated with the prompt in the same way as a human being.
“… in the artificial analysis of legal texts, it is necessary to transform a textual corpus (a set of documents, such as a court's case collection) into a multidimensional vector space, in which an algorithm can work. The first step is to collect and process unprocessed (or ‘raw’) data, that is, legal texts in natural language. Then, it is necessary to ‘treat’ or ‘normalize’ such data through different processes. This is done by transforming all letters to lowercase (thus, ‘Direito becomes 'direito’) and reducing the words to their inflected roots (‘pagaram’ and ‘pagou’ becomes ‘pag’ ou ‘pagar’). Tokenization removes special characters from the text, such as accents, hyphens, punctuation, as well as certain words that are very repetitive and have little or no meaning, such as 'and', 'do', 'a, 'who', so-called 'stop words'.
This process also concerns the treatment of neighboring terms, which can be grouped into tokens of 'n' terms (n-grams), that is, the phrase 'car traveling at high speed' can be presented in trigrams as 'car traveling at high speed' in', 'traveling at high speed', 'at high speed'. Annotation helps to disambiguate similar terms, inserting useful information to define the sense in which a word was used in the text, such as its morphological classification (verbs, nouns, adjectives or adverbs) or syntactic classification (subject, direct object, indirect object, etc. .).” (Ensinando um robô a julgar, Daniel Henrique Arruda Boeing e Alexandre Morais da Rosa, editora Emais, Florianópolis, 2020, p. 32)
Law as it exists today is the product of a long evolution. Simple concepts were refined, unfolded and gave rise to new concepts applicable to historical phenomena that were emerging in society. Legal language is extremely sophisticated and specialized. In my area of knowledge (I say this with the experience of 34 years of practicing law), the so-called 'stop words' play or can play an extremely important role. Ultimately, the conjunctions ‘and’ and ‘or’ present in a contractual clause may or may not define the outcome of a legal case.
Just as someone can lead AI to provide inadequate responses (as in the test I developed), hallucinatory results can be produced unintentionally even if the prompt has been formulated carefully. Hallucinations are inevitable. The risk of using this technology to automate the production of complex judicial decisions is evident and can never be ruled out.
The second fragment of the Brazilian Supreme Court report concerns the cost of AI. It seems low if only the relationship between the price and the number of processes analyzed is taken into account. However, this cost explodes if we take into account the damage that the automation of decisions can cause to the image of the judiciary. The modern State depends a lot on its credibility. Failed states that are incapable of distributing justice do not attract foreign investment and discourage economic development with local resources. The credibility of a modern State is largely based on the legal security provided by its Justice System.
The use of text-generating AIs is not without risk. But this risk cannot be measured taking into account only the cost/benefit between the price and the number of processes analyzed. There are economic and macroeconomic factors relating to the functioning of the Justice System that cannot be ignored when deciding whether or not to adopt AI technology to automate the delivery of judicial decisions. Not to mention the danger of mass violation of individual rights and guarantees granted by the constitution to the citizens under its jurisdiction.
The last fragment of the report is extremely important. It demonstrates that all companies that presented their AI products to the Brazilian Supreme Court were not able to meet the initial requirement. The report concluded that “...no solution was able to fully meet the requirements presented.” This could be considered predictable, as the initial requirement mentioned at the beginning of the aforementioned (Prototypes should not generate “hallucinations”...) disregards or ignores reality in favor of the belief that it is possible to create an AI that does not produce results containing errors , inadequacies, hallucinations or contaminated by some type of bias.
Right here I have insisted on the danger of automating the distribution of justice. In a way, the commented Brazilian Supreme Court report confirmed what I have been saying. It is better to invest the scarce resources of the Justice System in increasing the number of judges and public servants. The use of AIs should be limited to routine tasks, such as attaching documents to case files, prioritizing processing and bringing them to completion for decisions to be made by human judges.