Mexico's Supreme Court, the Supreme Court of Justice of the Nation (SCJN), digitized millions of physical files and built a legal search engine for the public using language models created with artificial intelligence and Azure cognitive services.
“In Azure and particularly, with Databricks Machine Learning we could quickly build an architecture for data processing and model training.”
Ana Gabriela Palomeque Ortiz, Data Quality Compliance Examiner at the General Unit of the Administration of Legal Knowledge, SCJN
The Supreme Court of Justice of the Nation (SCJN) is the Highest Constitutional Court of Mexico and head of the Judiciary of the Mexican Federation. Through its judicial resolutions, the court defends the Political Constitution of the United Mexican States and maintains balance between the different powers and spheres of Mexico’s government.
The digital transformation of SCJN began in 2013, by implementing collaborative environments using Microsoft Office 365, Outlook, and Sharepoint. Under SCJN President Arturo Zaldivar in 2019, the court embarked on an ambitious project to use disruptive technologies, such as cloud computing and artificial intelligence to make the most of the court’s legal record.
Digital access for the people
One of Zaldivar’s major objectives was to provide the public with digital access to the court’s historical documents and other data to research cases, resolutions, precedents, and their legal consequences.
To carry out this project, SCJN recognized that its computing and storage capacities were neither suitable nor adequate. “We needed specialized equipment for high processing of unstructured information, according to the specific needs for natural language processing”, says Otilio Esteban Hernández Pérez, Head of SCJN’s General Unit for Legal Knowledge Administration.
After a cost-effectiveness analysis between on-premises and cloud infrastructure, SCJN decided to use Microsoft Cloud Services. "In Azure, and particularly with Databricks Machine Learning, we could quickly build an architecture for data processing and model training," says Ana Gabriela Palomeque Ortiz, Data Quality Compliance Examiner at the General Unit of the Administration of Legal Knowledge.
The technology that modernized the Mexican justice system
The project officially started in October 2021, with Databricks Machine Learning leveraged as a service that provides a comprehensive, integrated machine learning environment and manages experiment tracking, model training, feature development, and data. This tool made it possible to develop text classification models, carry out proofs of concept to develop a training cycle and put it into action.
Subsequently, the need for more information was identified. The data, located in an institutional data center, did not contain enough information to achieve a reliable language model. “Talking with Microsoft, we decided that the best alternative was to build a landing zone project, along with TEIA, a Microsoft partner,” explains Palomeque. “That permitted us to connect our institutional data center with the one on the cloud, by means of Azure Data Lake Storage and Data Factory,” she adds.
Using Data Factory, a cloud-based data integration service, SCJN moved its institutional data to Azure Data Lake Storage, the cloud data repository. An extension of the network to the Cloud was made using a VPN and establishing different subnets, which helped us provide on-demand virtual model training.
According to Palomeque, the first model trained was to understand legal language. “We used ‘machine learning’ because we had to start from existing models and incorporate information that served as a differentiator to relate the words to the legal context,” he says. This model resulted in a low-cost, flexible parallel-processing cluster. This was significant given the minimal number of hours required to tune the language model. The entire process took two weeks.
Today, the model is trained to identify the names of organizations, suggest precepts in the field of human rights, identify executory statements using common language, and to classify articles of the American Convention on Human Rights, the UN Universal System of Human Rights, the Constitutional Courts of Spain and Chile, and the Courts of different other countries.
A legal search engine for the public
What used to take days can now be resolved in a matter of minutes. The digitization of SCJN has positioned it as an innovator. Currently, anyone with no knowledge of the law or legal language can quickly access more than 93,506 judgments and 304,371 theses. In addition to being the first judicial language model in Spanish, the learnings can be transferred to different areas. “Anyone interested can reuse it to create useful tools for their daily tasks," says Aurelio Pedro Vázquez Sánchez, Director of Data Strategy and Digital Transformation of the General Unit for the Administration of Legal Knowledge. Since it was made available to the public, the legal search engine has received more than 600,000 visits.
For Hernández Pérez, having made legal knowledge available to everyone is a great achievement. "Currently, the public is more informed and also demands more information, and the way to offer it is through these disruptive technologies. The use of Microsoft technology has allowed us to enable open justice, where the pillars of transparency, innovation, public collaboration, and accountability help us be at the vanguard of Legal Tech,” concludes Vázquez Sánchez.
Find out more about the Supreme Court of Justice of the Nation on Twitter, Facebook, Instagram, and YouTube.
“The use of Microsoft technology has allowed us to enable open justice, where the pillars of transparency, innovation, citizen collaboration, and accountability help us be at the vanguard of Legal Tech.”
Aurelio Pedro Vázquez Sánchez, Director of Data Strategy and Digital Transformation of the General Unit for the Administration of Legal Knowledge, SCJN
Follow Microsoft