Summarizing Legal Documents For Different Personas Using Ai21 Studio
Captured source
source ↗Summarizing Legal Documents for Different Personas Using AI21 Studio | AI21
Skip to Main Menu
Skip to Main Content
Skip to Footer
Back to Blog
-->
Back to Blog
We’ve all experienced reading long, tedious, and boring pieces of text – financial reports, legal documents, or terms and conditions (though, who actually reads those terms and conditions to be honest?).
Imagine a company that employs hundreds of thousands of employees. In today’s information overload age, nearly 30% of the workday is spent dealing with documents. There’s no surprise here, given that some of these documents are long and convoluted on purpose (did you know that reading through all your privacy policies would take almost a quarter of a year ?). Aside from inefficiency, workers may simply refrain from reading some documents (for example, Only 16% of Employees Read Their Employment Contracts Entirely Before Signing !).
This is where AI-driven summarization tools can be helpful: instead of reading entire documents, which is tedious and time-consuming, users can (ideally) quickly extract relevant information from a text. With large language models, the development of those tools is easier than ever, and you can offer your users a summary that is specifically tailored to their preferences.
Let’s take legal documents, for example. Though they are written in English, many people find legal documents to be difficult to comprehend, as if they were actually written in a foreign language. Moreover, the interesting parts of each document may differ depending on the person who reads it, so off-the-shelf summarization tools may be too general or too specific. As an example, let’s look at the involved personas:
Lawyers . They are interested in several key points, but legal language and terms are especially relevant to them.
Your average Joe. Doesn’t understand all the legal terms, and really wants to get the gist in simple words.
Using the IRS as our example, we will demonstrate here how to build a simple summarizer for those 2 personas, and discuss which future directions one should consider.
Working with large language models
Large language models naturally follow patterns in input (prompt), and provide coherent completion that follows the same patterns. For that, we want to feed them with several examples in the input (“ few-shot prompt” ), so they can follow through. The process of creating the correct prompt for your problem is called prompt engineering, and you can read more about it here .
Collecting data
Ideally, you should have a variety of examples to draw from. It is important that those examples represent the actual documents that your summarizer should work on. This means they should be written in the same way as real world documents, and they should be as varied as possible.
Don’t have it? No need to worry – large language models generalize exceptionally well, so the results will still be good. In the end, optimal results can always be achieved with proper data – but you can revisit this at a later date.
Summarize for lawyers
If you are summarizing legal documents for lawyers, you should definitely maintain all legal terms from the original document. In this demonstration, we will work on the opening paragraphs of legal letters.
Here is an example of a few-shot prompt:
You will now be presented with a part of a legal letter. Read it and summarize it. Make sure the summary maintains formal terms. Letter: Dear [Name], This letter responds to your authorized representatives’ letter of May 19, 2022, and subsequent correspondence, requesting rulings regarding the income, estate, gift, and generation-skipping transfer (GST) tax consequences of the proposed division of Trust 1. The facts and representations submitted are as follows: Grandparent died on Date 1, leaving the residue of Grandparent’s probate estate in equal shares to Trust 1 and Trust 2, testamentary trusts established under Will. Trust 1 is held for the benefit of Grandchild 1 and Grandchild 1’s descendants, and Trust 2 is held for the benefit of Grandchild 2 and Grandchild 2’s descendants. Grandchild 1 has five children, Great-Grandchild 1, Great-Grandchild 2, Great-Grandchild 3, GreatGrandchild 4, and Great-Grandchild 5. Grandchild 2 has one child, Great-Grandchild 6. Neither Grandchild 1 nor Grandchild 2 has any deceased children. Trustees serve as trustees of Trust 1. Trust 1 is the subject of this ruling request. Section 9(a) of Trust 1 provides that Trustees may distribute the net income of Trust 1 to or for the benefit of Grandchild 1 and Grandchild 1’s descendants in such proportions and at such times as Trustees determine is desirable or necessary, considering their needs, best interests, and other sources of income, or may annually accumulate and add all or part of the net income to the principal of Trust 1. Section 9(b) of Trust 1 provides that Trustees may distribute the principal of Trust 1 to or for the benefit of Grandchild 1 and Grandchild 1’s descendants in such proportions PLR-110419-22 3 and at such times as Trustees determine is desirable or necessary for their medical care, comfortable maintenance, education, or general support and welfare, considering their other resources. Section 9(c) of Trust 1 provides that Trust 1 will terminate 21 years after the death of the survivor of Grandchild 1 and Grandchild 2, and the principal of Trust 1 will be distributed to Grandchild 1’s descendants, per stirpes. If, however, Grandchild 1 and Grandchild 1’s descendants all die before that date, Trust 1 will terminate early, and the principal of Trust 1 will be distributed to Trust 2. Summary: – Grandparent died and left the residue of his estate to Trust 1 and Trust 2, testamentary trusts established under Will. The trustees of Trust 1 want to divide the estate equally between Grandchild 1 and Grandchild 2. – Section 9(a) of Trust 1 provides that Trustees may distribute the net income to Grandchild 1 and Grandchild 1’s descendants in any proportion they determine is desirable. – Section 9(b) of Trust 1 provides that Trustees may distribute principal to Grandchild 1 and Grandchild 1’s descendants as they determine is desirable. – Section 9(c) of Trust 1 provides that if Grandchild 1 and Grandchild 1’s descendants all die before 21 years, Trust 1 will terminate early. ## You will now be presented with a part of a legal letter. Read it and summarize it. Make sure...
Excerpt shown — open the source for the full document.
Notability
notability 4.0/10Educational post showcasing existing product, no major release or traction noted.