skip to content

How to Build Generative AI for Law

A Q&A With the Everlaw Product and Engineering Teams

by Eddie Kim

Generative AI has the potential to transform the practice of law, but using off-the-shelf tools such as ChatGPT for litigation has proven risky. The Everlaw engineering and product teams have been researching and exploring various capabilities of generative AI (GenAI) to see how Everlaw customers can benefit from the promises of this new technology in a way that is responsible, thoughtful, and defensible.

Everlaw Senior Product Lead Kevin Kraftsmith and Engineering Manager David Hirschberg share what they’ve found so far.

Kevin Kraftsmith-David Hirschberg-Webcard
Everlaw's Kevin Kraftsmith (left) and David Hirschberg (right)

Everlaw has had AI built into its platform for years. How is generative AI different from tools like Everlaw Clustering and Predictive Coding? 

David: From its name, gen AI is generative – meaning it can generate all sorts of new and exciting content. Gen AI can produce really powerful insights even from a single document, where Everlaw Clustering and Predictive Coding are about using patterns of data within sets of documents to get useful information and categorizations.

The mechanics of gen AI are different from the AI built into our platform to date, in that gen AI is a model trained on a very large external corpus from which it extracts patterns and applies them in a new place. As such, gen AI is a generalizable model that can be used for many purposes. In contrast, Clustering and Predictive Coding are built-for-purpose legal AI features that are each built to do one thing very, very well. 

Gen AI won’t replace either Clustering or Predictive Coding but rather sit on top of both and synergize. It’s complementary. 

How is the product team deciding where to integrate gen AI into the Everlaw platform? 

Kevin: To a large extent, we are continuously deciding where the Everlaw platform can benefit from gen AI. We’re taking the same approach as we do with all product development. We start with a strong understanding of our users’ problems – such as needing to spend a lot of time reading, reviewing, and summarizing an ever-growing body of documents. We stay close with customers and build tech partnerships with them, so we have a deep understanding of their issues and needs. It’s a great way to decide how to deploy new technologies in the best possible way. We’ve evaluated what will drive immediate, controlled, and impactful value to our customers, and we’re excited about unveiling these soon. 

We’ve evaluated what will drive immediate, controlled, and impactful value to our customers, and we’re excited about unveiling these soon. 

What are some of the challenges of integrating gen AI into litigation and investigation work? 

David: Top of mind are “hallucinations.” It’s the foremost issue we have to mitigate. There are also explainability issues, since lawyers have an ethical duty to understand the technology they use. Most lawyers prefer to get some justification for how things are written, and with gen AI, transparency is limited right now. One other issue is that handling longer docs – depositions that are hundreds of pages, let’s say – can be complicated and costly.

Kevin: In many ways, gen AI is like cloud computing. When cloud first came onto the scene, most organizations thought that the cloud was not secure and they wouldn’t be able to protect the privacy of their data.

Over time, rigorous guardrails were put into place to allow even the most confidential information to reside in the cloud. And now, using the cloud with a trusted technology is generally considered more responsible than maintaining a server closet. We think it’s likely gen AI will follow a path of rigorous safeguards designed for the legal industry’s specific needs. Everlaw has already outlined its legal gen AI principles. The success of gen AI in litigation and investigations will be predicated on trust.

What are some engineering techniques the team is using to create those guardrails? 

David: Prompting is important. When you click a button saying “summarize,” for example, you are prompting the AI with software instructions – written as code – for an action.

A prompt has many different purposes in gen AI, such as producing a tone or a voice. You can ask ChatGPT to use a factual voice versus an argumentative voice that would change the result.

Everlaw Tone Chart
How generative AI prompts can produce different voices in legal writing

In general, better prompting – combined with other factors – can produce fewer hallucinations. For example, you can write a prompt that asks a question and then follow it with an instruction to “find the answer within the page.” Even with chatbots powered by the latest LLMs, without careful prompting, if the answer isn’t on the page, the chatbot will still generate an answer rather than writing, “I don’t know. It’s not on the page.” 

Gen AI also might get sidetracked onto something tangentially important – for example, it might add information or text that exists outside your internal data set. For example, if, say, your data set is discussing a public figure, the chatbot might add some details that are not in your data set and are impossible to infer from your data set but might be in a public data set, like Wikipedia. To address that, we can write specific prompts.

Gen AI works better with smaller, bite-size problems, so for a really long document, gen AI is more likely to lose context. Depending on the task, we can divide it into smaller parts and then combine it together. 

David: If you use off-the-shelf services like ChatGPT, then your data may be used for training. It potentially could show back up in the answers these models produce in the future. That’s what most legal teams are concerned about.

The success of gen AI in litigation and investigations will be predicated on trust.

In contrast, the enterprise versions of these services should have tighter privacy and data retention policies and practices. We recommend that clients and users do their due diligence in understanding the terms and conditions of how, when, and where their data will be stored and utilized.

What will be the benefit of using Everlaw for gen AI versus off-the-shelf services? 

Kevin: I think a notable advantage of using the Everlaw platform is that our team of engineers is steeped in this technology and testing it every day. The changes we’re seeing in the gen AI world happen at a speed that is unprecedented in tech innovation. Keeping up with the most effective prompting, or the latest model, is challenging to do if technology isn’t your main focus. By using Everlaw, you can trust you are leveraging gen AI safely and effectively while you stay focused on litigating. 

Closing Thoughts 

Everlaw is committed to be both the most responsible and the best mover in legal generative AI. You’ll hear an update from us very soon. Sign up for Everlaw News to get the latest updates as they come out.