How to Ask the Fewest Questions When Building a Legal Algorithm

Image of author and founder of LegalEdge Innovators, Darol Tuttle

by Darol Tuttle

Darol is the founder of LegalEdge Innovators, a practicing attorney in the areas of estate planning and elder law, and the founder of BoomX Academy, home of the BoomX Show: Laws of Money

This article explores our journey of reducing legal nuances to code, the art of asking the right questions, and the technology behind our legal algorithm. Learn how we enhance practice efficiency and client satisfaction while respecting the intricacies of the law.

At LegalTech Innovators, we gave ourselves a pretty tough assignment: code a lawyer’s brain. While that may seem either scary or laughable, it was not as bad as you might think, and for one reason: legal reasoning. Remember that? You can’t really say what it is except for the law school template of “IRAC” (Issue, Rule, Application, Conclusion). We defined legal reasoning broadly and included even the techniques skilled litigators use in deposition and trial. We especially focused on the emphasis of legally significant facts and dismissal of emotionally significant facts. All of it was included in what we call the legal algorithm.

Key Points:

  • Terminology
    The legal algorithm refers to the new paradigm in which legal reasoning is mixed with algorithmic thinking in order to produce inputs that a Large Language Model can understand better, resulting in higher quality outputs.
  • Low Latency
    Effective systems reduce the time from input to output even when traveling through multiple networks. The Innovators algorithm reduces latency by fine-tuning Q and A intake to the fewest possible questions to increase client retention without sacrifcing accuracy.
  • Function Calling
    The algorithm is able to instantly include accurate results from other disciplines necessary for full service to the client but, until now, was avoided by lawyers as beyond scope.
  • Bilingual for High Quality Output
    Legal reasoning is a mental construct in which chaotic fact patterns are fine-tuned to legally significant facts and then applied to established rules of law broken down into elements. The result is called a ruling. The legal algorithm simply reduces this to code, to wit: Python, C#, JSON, and SQL.

Clients: Gotta Love Them Even If They Aren’t Low Latency

Our drafting app differs from others on the market because the client does all of the data entry work and the algorithm correctly drafts the legal documents before the attorney is hired. This gives the attorney a valuable resource: time. Our vision is to increase client satisfaction because the attorney can now do what she was meant to do: advise and counsel.

With that said, our technology operates in the context of the traditional legal services model and some habits die hard. To reach our desired future of a drafting app so accurate and so efficient that it completes all of the drafting work before the attorney is hired, we focus on the user experience when interfacing with our technology. Estate planning and elder law firms serve older Americans who are less tolerant of technology than even some lawyers. As such, we built our algorithm to not only connect questions in logical sequences but cut any extraneous data elements from the platform.

If you have experience as a lawyer, you likely have countless stories of the importance of the right question at the right time. I, myself, once asked a witness who was in a wheelchair about his disability by way of background for the Judge. I also knew the Judge was a Colonel in the Army Reserves and the witness was a veteran, having suffered his disability in service to his country. When he replied that he was shot, my algorithm blew up when I asked the next stupid question, “where were you shot?” To which he replied, “in the ass.” Ugh! No, I meant where were you located in the world when you were shot? Clearly, questions properly framed and asked in the right sequence matter.

War Story

The Date Of Marriage Question

Many lawyers still use paper intake forms. These forms often solicit irrelevant data. While the “date of marriage” question is relevant to physicians who reference patient records by DOB and wouldn’t it be nice if our Health Care Power of Attorney referenced this to make life easier, it was not worth enough to include it when we experienced one too many times the cost of asking the question. When asked to review hundreds of pages of legal documents in their draft estate plan, few fully appreciate the elegant funding formula you meticulously crafted to load balance a marital against a nonmarital trust, but at least one of your clients will notice if the date of marriage is wrong.

And here’s where it gets awkward. We noticed that if the spouse who completed the onboarding form was male, the date of marriage was most likely wrong. As data scientists describe it, “garbage in, garbage out.”

While the date of marriage data element has such high latency that we dumped it, the alpha data element is related, i.e., “are you married?” The algorithm, upon submission of the questionnaire, correctly identifies seven planning profiles. Fewer of these profiles are even available to singles due to the scarcity of opportunities in the law. If you have ever represented a single person in a Medicaid eligibility claim, you know to which I refer.

Function Calling

We are well aware that many attorneys feel threatened by the technological revolution that is upon us. That is unfortunate because, for the first time, the algorithm can instantly call a limitless number of functions that take a bit of data and return a result. I am referring to math, that complicated discipline and our fear of it is the reason we all went to law school. It also the reason most estate planning attorneys have an aversion to giving advice and counsel on topics related to financial planning even though our license allows us to do so. It also causes many to avoid tax planning. The estate tax calculation does include exemption amounts and graduated tax brackets. During initial consultations, clients often cite their net worth with a flourish, possibly to impress their spouse or, who knows, maybe to curry favor with the estate planning gods. But isn’t it funny how, later in the consultation, when the discussion turns to estate taxes for large estates (and the accompanying attorneys’ fees), that previously lofty net worth figure tends to shrink?

We took a sophisticated approach to this question in our algorithm. It points out the obvious but crucial fact: It doesn’t matter what your net worth is now. What matters is your net worth on the day you die. That’s why we prioritize questions about age to estimate life expectancy and inquire about expected rates of return. By relying on historical data from the Great Depression to today, as well as the last 20 years, we provide a realistic projection of future estate value.

State-Specific Estate Tax Unlocked

A perfect example of our approach is how we handle state-specific estate tax calculations. The algorithm begins by asking fundamental questions like “Are you married?” and “Where do you live?” These questions set the stage for a logic flow that determines the applicable estate tax rules based on the client’s domicile and marital status.

To project a possible future estate tax liability, we use a function based on the compound interest formula. This helps us calculate the future value of the estate, considering growth over time, and subsequently determine potential tax implications.

Here’s how we break it down:

Future Value Calculation

To determine the future value of an estate at a given interest rate, we use the following formula:

Future Value(FV)=Current Net Worth×(1+Rate of Return)Time\text{Future Value} (FV) = \text{Current Net Worth} \times (1 + \text{Rate of Return})^{\text{Time}}Future Value(FV)=Current Net Worth×(1+Rate of Return)Time

Where:

  • Current Net Worth: The present value or initial amount of the estate.
  • Rate of Return: The annual rate of return expected (expressed as a decimal). For example, a 5% return would be 0.05.
  • Time: The number of years into the future we want to project.

Example Calculation

Suppose a client has a current net worth of $2,000,000. They expect an annual rate of return of 4% (0.04), and we want to project the value 10 years into the future.

FV=$2,000,000×(1+0.04)10\text{FV} = \$2,000,000 \times (1 + 0.04)^{10}FV=$2,000,000×(1+0.04)10

Plugging in the values:

FV=$2,000,000×(1.04)10\text{FV} = \$2,000,000 \times (1.04)^{10}FV=$2,000,000×(1.04)10

Calculate the result:

FV=$2,000,000×1.48024\text{FV} = \$2,000,000 \times 1.48024FV=$2,000,000×1.48024 FV≈$2,960,480\text{FV} \approx \$2,960,480FV≈$2,960,480

Thus, the future value of the estate, considering a 4% annual growth over 10 years, is approximately $2,960,480.

Applying the Calculation to Estate Tax Projections

Understanding this future value is crucial in estate planning because it helps anticipate potential estate tax liabilities. Different states have varying estate tax thresholds and rates, which can significantly impact how much of an estate is subject to taxation.

By incorporating the future value calculation into our algorithm, we can project whether a client’s estate might exceed their state’s tax exemption limits in the future. For instance:

  • Identify the Client’s Marital Status: If the client is married, they may benefit from marital deductions and other spousal exemptions, which can defer or reduce estate taxes.
  • Determine the State of Residence: Different states have different estate tax thresholds. For example, New York has a higher threshold compared to Oregon.
  • Calculate Future Estate Value: Using the formula above, we estimate the estate’s growth.
  • Compare Against Tax Thresholds: We then compare the projected future estate value to the state’s tax exemption threshold to determine potential liabilities.

This entire calculation no longer needs to occur weeks or months later after the drafting attorney meets the client, intakes financial information manually, determines an estate tax issue, enters the same info into a different software program that performs tax-specific calculations, and modifies the draft plan to accommodate the new analysis.

Our approach is to call simple functions when the client asks to meet with an attorney at your firm and completes the onboarding form.

The Art of Converting Legal Reasoning to Code

Another reason we are working so hard to reduce legal reasoning to code is that large language models do not completely get it. To be fair, the bigger models are shockingly accurate. Read our testing of three of the largest models available: two commercial models by OpenAI and Google, and an open-source model from Meta. Two of the models did far better at the tough fact patterns we threw at them than most attorneys out of law school could. Why is that? Why exactly does one model avoid questions and, even, make up answers while other models are consistently spot on? There are a lot of complicated answers to that, but one thing is clear: a poorly crafted question generates a lousy output. A.I. is a computer program. Software. One language AI loves and is fluent in is the language of databases, SQL. It also likes to jabber in JSON and Python. Ok. You wouldn’t go to Ukraine and not even try to speak a little Ukrainian, would you? To the extent that language is an extension of culture and personality, understanding Python is not enough. You have to speak Python but in the construct of centuries-old legal reasoning.

Turning legal reasoning into code is no small feat, but it’s a task we’ve tackled head-on. Take the categorization of property items, for instance. In legal terms, property is not a monolithic concept but a diverse array of asset types, each with its own set of legal implications and management requirements. Our goal was to create an algorithm that could handle this diversity with the same ease and clarity as an experienced attorney.

Building the Property Items Hierarchy

We started by defining a comprehensive hierarchy of property items, ensuring that each category was detailed enough to reflect its real-world complexity. Our coding structure looks something like this:

If you know JSON, this will make sense to you.
"propertyItems": [
{
"type": "Real Estate",
"description": "Physical property such as land and buildings",
"subTypes": [
{
"name": "Residential",
"examples": [
"Single-family home",
"Condominium",
"Apartment"
]
},
{
"name": "Commercial",
"examples": [
"Office building",
"Retail store",
"Warehouse"
]
},
{
"name": "Industrial",
"examples": [
"Factory",
"Power plant",
"Industrial park"
]
},
{
"name": "Land",
"examples": [
"Vacant land",
"Agricultural land",
"Ranch"
etc

By categorizing property in this manner, we create a structured framework that mirrors the hierarchical thought process lawyers use when assessing a client’s estate. Each type of property is defined with specific subtypes and examples, ensuring that the algorithm can handle the various intricacies involved in estate planning.

For instance, under “Real Estate,” we distinguish between “Residential,” “Commercial,” “Industrial,” and “Land.” Each of these subtypes includes specific examples, allowing the algorithm to recognize and categorize a “single-family home” differently from an “office building” or a “factory.” This is not just about categorization; it also influences how the property is managed, taxed, and included in legal documents.

The Benefits of This Approach

This detailed coding of property items has several benefits:

  1. Accuracy: By providing clear definitions and examples, we ensure that the algorithm accurately reflects the client’s assets.
  2. Efficiency: The hierarchical structure allows for quick categorization and decision-making, speeding up the estate planning process.
  3. Customization: Different assets require different legal treatments. Our detailed categorization ensures that each type of property is handled in the most appropriate manner.
  4. User Experience: Clients interact with a simplified interface, but behind the scenes, the algorithm works with a detailed and precise model, ensuring that the final documents are both comprehensive and accurate.

Conclusion

Converting legal reasoning to code is like translating a complex language into another form that computers can understand and process. It requires not only a deep understanding of legal principles but also a knack for logical structuring and attention to detail. At LegalTech Innovators, we take pride in our ability to bridge the gap between law and technology, creating tools that enhance the practice of law while maintaining the rigor and depth of traditional legal analysis.

By focusing on the art of asking the right questions and building a detailed, logical framework, we ensure that our algorithm doesn’t just automate tasks but actually enhances the quality and precision of estate planning. In doing so, we help lawyers deliver better, faster, and more reliable services to their clients.

Recent

Updates

Chicago HQ for LegalEdge Innovators
Notices
Darol Tuttle

Why Chicago?

Chicago is the headquarters of LegalEdge Innovators by choice, not inertia. The vibe in the the third largest city is unique. More old school urban than LA and less intense than the Big Apple, Chicago is a legal hub of the United States in many ways. Home to over 500 law firms and five law

Read More »

Become an Innovator

If you are an estate planning attorney with at least five years of experience, help us build our app!

Stay Informed

Receive the latest legal tech news by subscribing to our Legal Tech Brief delivered weekly