background

The Demystification of Legal AI

Uwais Iqbal2023-02-22

AI seems to be on the tips of everyone’s tongues. With such a complex and new technology, it’s easy to get drawn into the hype and hysteria. The sad but unfortunate reality is that not many people really understand what AI is, nor do they know how to speak about it or think about its applications in the legal sector. We want to change that. AI has already started to penetrate our personal lives and it is only a matter of time until it becomes ubiquitous in our professional lives. AI is coming and we should embrace this new technology in a posture of knowledge and transparency instead of a posture of ignorance and hype. In this article we'll do some groundwork to define what AI is, explore how to think about AI and learn how it can be applied in the legal industry. Let’s get started!

Definitions

Let’s take a moment to define our terms. There tends to be lots of buzzwords and jargon floating around with AI. You’ve probably heard terms like Machine Learning, Deep Learning, Natural Language Processing being thrown about. Let’s actually define what we mean by these terms so we’re not just throwing around empty words and adding to the hype and hysteria.

Defining Artificial Intelligence

In 1956, one of the founding fathers of AI, John McCarthy, defined artificial intelligence as “machines that can perform tasks that are characteristic of human intelligence”. What is meant by human intelligence in the definition is a bit opaque.

We can take a crack at the definition and think of artificial intelligence as a “technique that uses machines to replicate the problem-solving and decision-making capabilities of the human mind”. The artificial part means that it's pure mimicry and imitation. The intelligence part means that it captures some human ability of problem-solving or decision-making.

The natural question that arises is: How are machines leveraged to mimic the capabilities of the human mind? The answer to this question gives rise to two different ways AI can be done:

  1. Machine Learning- One way is through data. This gives us Machine Learning. It involves using data to teach machines how to perform specific tasks that a human can do.
  2. Rules-Based - Another way is through encoding expected behaviour through a series of rules alongside a system of domain knowledge. This gives us Rules-Based AI. Expert systems are an example of a Rules-Based AI system.

How AI is used in Language

There are a couple of different senses of AI that we can draw out from how AI is normally spoken about and used in everyday language:

  1. Technology: AI tends to get used to refer to the overall technology. It's used in a very general sense to capture various applications of AI. You might hear someone say: “AI will come to change how we work”. What they mean by AI here is the general technology. It's kind of like how you might speak about the internet, computers or smartphones in a general sense.
  2. Field of Academic Study: AI can be used to refer to a field of academy study and an area of research within computer science. That's the theory part in the definition. You might hear someone say: “I just completed my master's in AI”. What they mean by AI here is the field of academic study just like biology, chemistry or physics.
  3. Machine Learning: AI can also be loosely used in place of Machine Learning. For now you can think of Machine Learning as leveraging data to train a computer to perform a particular task without giving it explicit instructions. You might hear someone say: “We trained an AI model to detect dog images.” When AI is used in this sense, it's synonymous with Machine Learning and is used interchangeably. This is where it gets a bit confusing because if you’re not careful you might just think AI is just Machine Learning and nothing more. But AI is more than just Machine Learning.
  4. Superintelligence: AI also gets used in the futuristic sci-fi sense of superintelligence; A sentient being that has developed a level of intelligence superior to human intelligence. You might hear someone say: “AI will come to control our lives”. We don't have machines which are superintelligent and whether we will get there is a question of debate. When AI is used in this sense it's future looking and purely hypothetical.

The Kinds of AI

A common categorisation of the different kinds of AI is based on what the AI system is capable of doing. Researchers usually break AI down into two kinds: Strong AI and Weak AI.

  1. Strong AI - Strong AI refers to an AI system which has reached a level of human intelligence. The system can learn, perceive, understand, and function completely like a human being. At the moment, we haven’t developed such systems so Strong AI is still something purely theoretical. Strong AI is also known as General AI or Artificial General intelligence (AGI). Many researchers are still sceptical as to whether Strong AI systems are even possible.
  2. Weak AI - Weak AI refers to an AI system that can perform a specific and precise task like extracting a field from a contract or clustering a set of documents. The AI systems we have today are all examples of Weak AI. Weak AI is also known as Narrow AI.

What does Machine Learning, Natural Language Processing and Deep Learning have to do with AI?

We’ve already seen that Machine Learning (ML) is a branch of AI that uses data to enable machines to learn how to perform specific tasks as a human would do. ML uses data.

Natural Language Processing (NLP) is another branch of AI that enables computers to understand human language in both written and verbal forms. NLP looks at language. NLP is of particular relevance to legal because the underlying medium of the legal is text.

Deep learning is a branch of Machine Learning where algorithms are made up of several layers of neurons to mimic the structure of the brain to allow patterns to be learnt from data. Deep Learning uses neural networks with data.

Will AI replace lawyers?

With a newfound and long-awaited understanding of what AI means and how it is used in everyday language, we can do some hype busting!

You've probably heard the claim that “AI will replace lawyers”. It certainly grabs attention and is great for headlines. But is there any truth to that claim? As we've just seen, AI can be used in different senses and there are different kinds of AI. Which sense of AI does this claim use and which kind of AI is this claim referring to? Take a moment to review the different senses and see if you can figure it out before reading on ahead!

The claim that “AI will replace lawyers” uses AI in the sense of Superintelligence. It’s obvious that if we had AI systems that were as intelligent as humans we could replace lawyers with AI counterparts. The reality is that AI systems aren’t that smart. In effect, it's a claim about Strong AI. Strong AI systems are still a theoretical estimation - we don’t know if we’ll ever get to a point where machines are just as intelligent and capable as human beings. Lawyers are still around today despite Weak AI systems being used in the legal sector for a number of years. I don’t think we’ll ever get to Strong AI so it’s fair to say that lawyers will be sticking around and won’t be going anywhere!

AI in Industry

Now we have developed some grounding in the terms related to AI, we can take a step further to explore how AI is used in industry.

Contexts of Doing AI

It’s worth noting that there are different contexts for where AI can be done. There are two main contexts that we need to be aware of:

  1. A Research Context - AI carried out in a research context pushes forward the boundaries of what is possible and steps into the unknown. AI in a research context is usually carried out in university departments and at big tech R&D labs. Much of the work is done through experiments under ideal circumstances with colossal datasets and virtually unlimited budgets and resources.
  2. An Industry Context - AI in industry is quite different to a research context. Datasets are rarely ever clean and complete, there are stakeholders to manage and everything has to be done yesterday. Much of the AI work in industry is applied research. The goal is not to venture into the unknown and develop something completely new. Rather, the focus is on taking what has already been created in a research context and applying it to new and different problems in an industry context. It usually takes some time, on the order of years, for advances in AI research to trickle down into applications in industry.

Take the recent uproar around Chat-GPT. Chat-GPT is an AI model developed by Open AI that is currently in open beta for testing with the public. Chat-GPT is an example of AI in a research context - there are virtually no restrictions around data privacy or confidentiality and it was trained on a virtually unlimited budget. It’ll be a while before Chat-GPT makes its way into industry focused software and applications.

Thinking about Applied AI

We are interested in how AI can be used in an industry context. One intuitive way to think about applied AI in an industry context is to think of it as a way to capture and scale expertise. There are things that you as a human have to do because they require a level of learned skill or expertise. Take for example, identifying the termination clause in a contract. You can train an AI system by teaching it what a termination clause looks like so that it captures your expertise. Then, since the AI system is a machine, you can scale it to operate at volume and find the termination clause in a massive collection of contracts.

Employing AI for a Job

All this talk about AI is great. But how can I tell if AI can be used to help me in my day-to-day legal work? An easy way to answer this question is to think about AI as though it has some sort of agency. Of course, we mean this in a metaphorical sense. Literally speaking, an AI algorithm is just a bunch of numbers. Thinking about AI as though it has agency means you should behave with AI as you would with a person with a particular skill set. You wouldn’t randomly employ a complete stranger into your team just because she is popular? So why do we try and do the same with AI?

Before hiring someone into our team, we’d usually sit down and think about what skills, traits and experience the right person would have. Then we’d interview a bunch of applicants and decide who best fits our requirements. Only then we’d hire them into our team and onboard them to make sure they are as effective as possible. We have to undertake a similar process with AI. We have to define a job spec, evaluate potential algorithms and when we find one that works, we have to work to integrate it within the wider team and organisation.

Legal AI Actions

We tend to see AI as this all-encompassing technology which can solve all of our problems. This is far from the truth. We have to think about AI in the same way we think about hiring a new employee who can come into our organisation to carry out a very particular and precise job. So the question which naturally arises is what jobs can AI do? We can characterise an AI solution by what action it can perform ie the job it can do. Within Legal AI there are a small number of relevant actions that AI can perform well.

  1. Extract - Extract involves using AI to extract key pieces of information from a passage of text. A typical use case involves using AI to extract key fields such as the parties and termination date from a contract.
  2. 🔗 Compare - Compare involves using AI to compare two passages of texts to spot any differences between them. These passages of text could be sentences, clauses of even entire documents. A typical use case involves using AI to compare a drafted clause against a playbook standard to identify any risky deviations.
  3. 🗂 Organise - Organise involves using AI to organise a collection of texts (clauses or documents) so that similar texts are identified and grouped together. A typical use case involves using AI to organise documents during discovery so related documents are grouped together.
  4. 🏷 Label - Label involves using AI to provide a label to a passage of text. This passage of text could be a sentence, clause or document. A typical use case involves using AI to label a document by its document type or a clause by its clause type. Or, labelling a document against a predefined taxonomy for Knowledge Management purposes.
  5. 🔎  Find - Find involves using AI to find relevant texts among a large collection of text using a query. A typical use case involves using AI to find the most relevant cases during legal research.
  6. ✍️ Draft - Draft involves using AI to draft and generate text. A typical use case involves using AI to draft a clause in a contract.
  7. 📝 Summarise - Summarise involves using AI to create a summary from a text. A typical use case involves using AI to summarise a case judgement into a headnote.
  8. 📈 Forecast - Forecast involves using AI to forecast a numeric quantity. A typical use case involves using AI to forecast billing or spend for a matter.

Legal AI Functions

We’ve seen that AI can perform particular and precise actions e.g. to extract information or classify a document. There is also another aspect concerning the approach. In other words, how will AI be used to carry out the particular task at hand? It’s a common fallacy to conflate AI with automation. AI can be used to automate an action, but there are other functions AI can perform depending on the circumstance.

To better understand the functions AI can perform, we need to introduce two concepts:

  1. Volume – Given a particular task, volume captures the number of times the task is to be performed.
  2. Risk - Given a particular task, risk captures the potential cost of a mistake. This can either be in terms of financial cost or cost to reputation.

We can now put together a risk-volume matrix to understand the different approaches of AI. The risk/volume matrix is a framework for determining the function AI can perform under different scenarios with respect to risk and volume.

There are four different AI Functions:

  1. ⚙️ Automate - AI can be used in high-volume, low-risk scenarios to automate tasks and reduce human capital. High volume means that AI can be leveraged to scale expertise in performing a particular task where otherwise vast resources of human capital would be needed. Low risk means that the penalty or cost of the AI making a mistake is very low. In such circumstances, AI can be trained to scale expertise for a particular task and automate the task thereby reducing the dependency on human capital. A typical use case involves using AI to automate the extraction of fields from a set of contracts.
  2. 🤝 Assure - AI can be used in low-volume, high-risk scenarios to provide assurance in tasks and increase confidence. Low volume means that the human will always be relevant in such tasks. High risk means that making a mistake and getting things wrong is very costly. As a result, AI can play a role to support the human to provide assurance in such tasks. A typical example involves conducting legal research. AI can be used to ensure that no relevant cases have been missed during legal research and help provide peace of mind that all bases have been covered.
  3. 🏃‍♂️ Accelerate - AI can be used in high-volume, high-risk scenarios to accelerate jobs and improve efficiency. High volume means that AI can be leveraged to scale expertise in performing a particular task where otherwise vast resources of human capital would be needed. High risk means that making a mistake and getting things wrong is very costly. In such circumstances, the human and machine work in collaboration to reach the desired objective in a shorter time span. AI plays a role to speed up the usual workflow of a legal professional creating efficiencies and completing tasks quicker. A typical use case of acceleration is during contract review. AI can be used to highlight and surface deviations in wording that may be risky to reduce the time it takes for a lawyer to review the contract and accelerate contract negotiations.
  4. ⛑ Assist – AI can be used in low-volume, low-risk scenarios to provide assistance in performing certain tasks. Low volume means that these tasks are menial, and the human will always be relevant. Low risk means that there isn’t a big penalty if a mistake is made. In these situations, AI can provide support and assist with basic tasks. A typical example would include the use of AI chatbots, much like ChatGPT, to assist in routine administrative and editorial tasks that tend to take up lots of time.

Getting clear on the function AI should perform will inform the choice of model, the extent of user interaction as well as the data requirements for the AI model.

The AI Action can be combined with the AI Function to create an AI Job Spec that captures what the AI should do and how it should do it. The AI Job Spec should also capture what the minimum acceptable performance is so that the AI, just as every other employee, can be assessed on whether it is succeeding or failing at its job.

Closing Thoughts

We tend to fear what we don’t understand. Technology is already complex enough and AI shifts how we look at the world. We are all using the same buzzwords but are speaking entirely different languages. The first step to adopting and embracing such a radically novel and revolutionary technology like AI is to develop the language and ideas so we can think about and speak about AI in a meaningful way. Undoubtedly, there are endless applications where AI can be applied in legal but we will never be ready for that revolution if we speak different languages.

“The Revolution will be complete when the language is perfect.” - 1984, George Orwell

This article was originally published in the Modern Lawyer Journal