* . *
  • About
  • Advertise
  • Privacy & Policy
  • Contact
Friday, November 14, 2025
Earth-News
  • Home
  • Business
  • Entertainment
    Blue Lights Season 3 Premiere Recap: An Elusive Threat Hints At A Bigger Danger In Belfast — Plus, Grade It! – Yahoo

    Blue Lights Season 3 Premiere Recap: A Shadowy Threat Reveals a Greater Danger in Belfast – Our Verdict Inside!

    Lancaster County’s 2026 quilt shows will have big changes; here’s what you need to know – LancasterOnline

    Exciting Changes Coming to Lancaster County’s 2026 Quilt Shows – Here’s What You Need to Know

    ‘The Price Is Right’ Contestant Said She ‘Manifested’ Her $100,000 Win – CBS 19 News

    ‘The Price Is Right’ Contestant Said She ‘Manifested’ Her $100,000 Win – CBS 19 News

    Billy Bob Thornton says Hollywood told him he ‘wasn’t southern enough’: ‘I am just off the turnip truck’ – Yahoo

    Billy Bob Thornton says Hollywood told him he ‘wasn’t southern enough’: ‘I am just off the turnip truck’ – Yahoo

    Nov. 13 Vallejo/Vacaville Arts/Entertainment Source: Activities – Times Herald Online

    Nov. 13 Vallejo/Vacaville Arts/Entertainment Source: Activities – Times Herald Online

    New Orleans Museum of Art director gets a French award started by Napoleon Bonaparte – NOLA.com

    New Orleans Museum of Art director gets a French award started by Napoleon Bonaparte – NOLA.com

  • General
  • Health
  • News

    Cracking the Code: Why China’s Economic Challenges Aren’t Shaking Markets, Unlike America’s” – Bloomberg

    Trump’s Narrow Window to Spread the Truth About Harris

    Trump’s Narrow Window to Spread the Truth About Harris

    Israel-Gaza war live updates: Hamas leader Ismail Haniyeh assassinated in Iran, group says

    Israel-Gaza war live updates: Hamas leader Ismail Haniyeh assassinated in Iran, group says

    PAP Boss to Niger Delta Youths, Stay Away from the Protest

    PAP Boss to Niger Delta Youths, Stay Away from the Protest

    Court Restricts Protests In Lagos To Freedom, Peace Park

    Court Restricts Protests In Lagos To Freedom, Peace Park

    Fans React to Jazz Jennings’ Inspiring Weight Loss Journey

    Fans React to Jazz Jennings’ Inspiring Weight Loss Journey

    Trending Tags

    • Trump Inauguration
    • United Stated
    • White House
    • Market Stories
    • Election Results
  • Science
  • Sports
  • Technology
    Figure Technology stock spikes after Q3 revenue surpasses consensus (FIGR:NASDAQ) – Seeking Alpha

    Figure Technology stock spikes after Q3 revenue surpasses consensus (FIGR:NASDAQ) – Seeking Alpha

    Predictive Technology Is Improving Warehouse Safety – ohsonline.com

    Predictive Technology Is Improving Warehouse Safety – ohsonline.com

    mPower Technology opens automated solar module line for space – pv magazine USA

    MPower Technology Launches Cutting-Edge Automated Solar Module Line for Space Applications

    Two Tigers land Liberty League All-Conference honors – Rochester Institute of Technology Athletics

    Two Tigers land Liberty League All-Conference honors – Rochester Institute of Technology Athletics

    Green Technology Book: Solutions for confronting climate disasters – Part 1: Water-related disasters – WIPO – World Intellectual Property Organization

    Green Technology Book: Solutions for confronting climate disasters – Part 1: Water-related disasters – WIPO – World Intellectual Property Organization

    Reimagining cybersecurity in the era of AI and quantum – MIT Technology Review

    Reimagining cybersecurity in the era of AI and quantum – MIT Technology Review

    Trending Tags

    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • Mark Zuckerberg
No Result
View All Result
  • Home
  • Business
  • Entertainment
    Blue Lights Season 3 Premiere Recap: An Elusive Threat Hints At A Bigger Danger In Belfast — Plus, Grade It! – Yahoo

    Blue Lights Season 3 Premiere Recap: A Shadowy Threat Reveals a Greater Danger in Belfast – Our Verdict Inside!

    Lancaster County’s 2026 quilt shows will have big changes; here’s what you need to know – LancasterOnline

    Exciting Changes Coming to Lancaster County’s 2026 Quilt Shows – Here’s What You Need to Know

    ‘The Price Is Right’ Contestant Said She ‘Manifested’ Her $100,000 Win – CBS 19 News

    ‘The Price Is Right’ Contestant Said She ‘Manifested’ Her $100,000 Win – CBS 19 News

    Billy Bob Thornton says Hollywood told him he ‘wasn’t southern enough’: ‘I am just off the turnip truck’ – Yahoo

    Billy Bob Thornton says Hollywood told him he ‘wasn’t southern enough’: ‘I am just off the turnip truck’ – Yahoo

    Nov. 13 Vallejo/Vacaville Arts/Entertainment Source: Activities – Times Herald Online

    Nov. 13 Vallejo/Vacaville Arts/Entertainment Source: Activities – Times Herald Online

    New Orleans Museum of Art director gets a French award started by Napoleon Bonaparte – NOLA.com

    New Orleans Museum of Art director gets a French award started by Napoleon Bonaparte – NOLA.com

  • General
  • Health
  • News

    Cracking the Code: Why China’s Economic Challenges Aren’t Shaking Markets, Unlike America’s” – Bloomberg

    Trump’s Narrow Window to Spread the Truth About Harris

    Trump’s Narrow Window to Spread the Truth About Harris

    Israel-Gaza war live updates: Hamas leader Ismail Haniyeh assassinated in Iran, group says

    Israel-Gaza war live updates: Hamas leader Ismail Haniyeh assassinated in Iran, group says

    PAP Boss to Niger Delta Youths, Stay Away from the Protest

    PAP Boss to Niger Delta Youths, Stay Away from the Protest

    Court Restricts Protests In Lagos To Freedom, Peace Park

    Court Restricts Protests In Lagos To Freedom, Peace Park

    Fans React to Jazz Jennings’ Inspiring Weight Loss Journey

    Fans React to Jazz Jennings’ Inspiring Weight Loss Journey

    Trending Tags

    • Trump Inauguration
    • United Stated
    • White House
    • Market Stories
    • Election Results
  • Science
  • Sports
  • Technology
    Figure Technology stock spikes after Q3 revenue surpasses consensus (FIGR:NASDAQ) – Seeking Alpha

    Figure Technology stock spikes after Q3 revenue surpasses consensus (FIGR:NASDAQ) – Seeking Alpha

    Predictive Technology Is Improving Warehouse Safety – ohsonline.com

    Predictive Technology Is Improving Warehouse Safety – ohsonline.com

    mPower Technology opens automated solar module line for space – pv magazine USA

    MPower Technology Launches Cutting-Edge Automated Solar Module Line for Space Applications

    Two Tigers land Liberty League All-Conference honors – Rochester Institute of Technology Athletics

    Two Tigers land Liberty League All-Conference honors – Rochester Institute of Technology Athletics

    Green Technology Book: Solutions for confronting climate disasters – Part 1: Water-related disasters – WIPO – World Intellectual Property Organization

    Green Technology Book: Solutions for confronting climate disasters – Part 1: Water-related disasters – WIPO – World Intellectual Property Organization

    Reimagining cybersecurity in the era of AI and quantum – MIT Technology Review

    Reimagining cybersecurity in the era of AI and quantum – MIT Technology Review

    Trending Tags

    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • Mark Zuckerberg
No Result
View All Result
Earth-News
No Result
View All Result
Home Technology

Answering Legal Questions with LLMs

April 29, 2024
in Technology
Share on FacebookShare on Twitter

If you asked a lawyer whether ChatGPT could do his job, he would laugh you out of the room. The tool is often useful, but can’t handle legal questions end to end. It makes up sources, its reasoning can be flawed, and it may overlook key aspects of the law.

We decided to tackle this problem at Hotseat. After iterating multiple times, implementing advanced agentic workflows, and testing with dozens of lawyer, we’re certain that the product has glaring limitations and it won’t replace any jobs soon. However, we figured out an unintuitive, LLM-only method of doing RAG, and we leveraged it to make LLMs answer complex questions about select EU regulations.

In this post, you’re going to learn how to implement a system that can perform advanced reasoning over very long documents.

The Problem

A great answer to a legal question must at least:

Be based on sound reasoning;
Quote the source text of the law to be verifiable; and
Take into account all relevant parts of the law.

To meet these requirements, we had to put the relevant documents in the prompt – we couldn’t just hope that the LLM was trained on all of the law. We also limited our scope to a single regulation. It made the problem approachable, and we could scale later.

In our first attempts, we1 fed the entire 226 pages of the EU’s AI Act into GPT-4 and asked a sample question:

Does the deployment of an LLM acting as a proxy to optimize SQL queries fall within the regulatory scope of the EU’s AI Act?

And we found that GPT-4 couldn’t give us a good answer.

A lawyer would start by asking some helper questions:

Does the proxy meet the definition of an AI system?
Can the proxy be classified as a high-risk AI system?
Will the proxy process personal or sensitive data?

But in a single response, GPT-4 couldn’t both break down the question and answer it. The former task requires a high-level analysis of the document, and the latter – low-level focus on details.

The Solution

We split answering the question into subtasks.

The rough idea is to:

Make GPT-4 figure out which subquestions it should ask; then
Answer each subquestion independently; and
Aggregate the findings into a single response.

Breaking Down the Question

To answer a legal question based on a single regulation, GPT-4 must first find the relevant sections. It requires high-level reasoning across the entire document.

We discovered that GPT-4 can complete this task well, provided you prompt it carefully. All the standard prompt engineering guidelines apply. Crucial were:

Structuring the document with Markdown. Without it, reasoning over 80,000 tokens wouldn’t work.
Roleplaying. We framed the task as a senior lawyer planning out work for a junior lawyer.
Tokens to “think.” We gave the model space to produce internal notes about the task – like how it understands the user’s question – before asking for the plan itself.

We designed the output so it corresponds to a list of subquestions required to answer the main question. Each point is self-contained; it includes specific instructions and references to sections of the document. If a lawyer looked at any single step, they could carry it out themselves.

Here’s what GPT-4 gave us:

Plan for the Junior Lawyer

Identify Relevant High-Risk Categories:

Analyze Annex III for high-risk AI systems to see if the language model fits under any listed categories.

Examine Requirements for High-Risk AI Systems:

Look at Articles 8-15 to understand general requirements for high-risk AI systems.

…

(The other 7 points truncated for brevity. Full plan here, and the prompt here.)

The quality of the plans still surprises me. When we analyzed them for questions from actual lawyers, we found that GPT-4 generally covers all necessary subquestions.

Answering Subquestions

The plan is executed by a simple AI agent. In fact, just a single conversation that GPT-4 has with itself.

GPT-4 is prompted with instructions to assume the role of a “master agent” tasked with answering a legal question based on the pre-generated plan. It can delegate subquestions to “junior lawyers” – in fact, separate GPT-4 chats – by calling functions.

Here’s an example function call:

AnnexAnalysis({
“task”: “Analyze Annex III for high-risk AI systems to see if the language model fits under any listed categories.”,
“annexes”: [“Annex III”],
“legal_question”: “Does the deployment of an LLM acting as a proxy to optimize SQL queries fall within the regulatory scope of the EU’s AI Act?”
})

We convert such calls into prompts that contain the task, the question, the specified parts of the regulation, and instructions to carry out the task. Whatever GPT-4 outputs is fed back into the master chat as the junior lawyer’s answer.

We preprocess the regulation so that when a call contains a reference to “Annex III,” we know which pages to put into the “junior lawyer’s” prompt. This is the LLM-based RAG I mentioned in the introduction.

Compared to analyzing the entire AI Act, GPT-4’s reasoning is massively boosted when it’s given a clear task and a short context. With a 5k-token-long prompt, you can even usually trust the LLM to correctly quote the source, which is useful to a user verifying the final answer.

We implemented the master AI agent as a while loop. It goes on as long as GPT-4 calls functions, going through the plan step by step. Eventually, after all subquestions are answered, it outputs the final answer in a format we can detect with a regex. We then break the loop and return the answer to the user.

You can see the final answer here, in the “Legal trace” section.

Here’s the master prompt along with function definitions, and here’s the junior lawyer’s prompt.

Results and Limitations

Answering a question this way takes 5 to 10 minutes and costs about $2 with GPT-4.

The highlight of testing the system with dozens of lawyers was when a GDPR specialist reviewed its answers. The lawyer ranked 8 out of 10 responses as excellent, and the remaining 2 as overly cautious in interpreting the law.

However, over the long term, we found that GPT-4 can identify subquestions very well but often can’t answer them correctly. In non-trivial scenarios, it makes logical errors.2

Lawyers also told us that when they answer a question, they rarely touch upon a single regulation. Not only do they analyze multiple regulations, but they also take into account supporting documents such as various guidelines, regulatory technical standards, and court rulings. In contrast, this system can only process a single document at a time.

We’ve learned that the combination of high latency, faulty reasoning, and limited document scope kills usage. No lawyer wants to expend effort to ask a detailed question, wait 10 minutes for an answer, wade through a 2-pages-long response, and find that the AI made an error.

Conclusion

Keeping all the limitations in mind, dividing complex jobs into simple tasks improves the reasoning capabilities of LLMs dramatically.

While the system isn’t directly useful for lawyers yet, the underlying architecture can be generalized to other problems. If less-than-perfect reasoning and high latency are acceptable, you could use it to answer arbitrary questions about arbitrary documents.

If solving such problems is interesting to you, we’re looking for another co-founder. We’re still early, but we’ve learned a ton about how lawyers do legal research. Our next steps will be focused on semantic search that actually works, helping law firms navigate through thousands of legal documents.3 If you’d like to build a meaningful product in the legal tech space, please check out our request for a co-founder. We’d love to hear from you.

>>> Read full article>>>
Copyright for syndicated content belongs to the linked Source : Hacker News – https://hugodutka.com/posts/answering-legal-questions-with-llms/

Tags: AnsweringLegaltechnology
Previous Post

ByteDance’s web of apps could get tangled up in TikTok ban

Next Post

Phreaking

France 4-0 Ukraine (Nov 13, 2025) Game Analysis – ESPN

France Crushes Ukraine in a Spectacular 4-0 Triumph on November 13, 2025

November 14, 2025
Fed’s December decision ‘obvious’ as something isn’t right with the economy: MetLife’s Drew Matus – CNBC

Why the Fed’s December Move Sends a Strong Warning About the Economy

November 14, 2025
Blue Lights Season 3 Premiere Recap: An Elusive Threat Hints At A Bigger Danger In Belfast — Plus, Grade It! – Yahoo

Blue Lights Season 3 Premiere Recap: A Shadowy Threat Reveals a Greater Danger in Belfast – Our Verdict Inside!

November 14, 2025
Vanderbilt Institute for Global Health marks 20 years – VUMC News

Two Decades of Transforming Global Health: The Vanderbilt Institute’s Inspiring Journey

November 14, 2025
Exclusive: Trump administration holds Situation Room meeting over House effort to force release of all of DOJ’s Epstein files – CNN

Trump Administration Holds Urgent Situation Room Meeting as House Demands Full Release of DOJ Epstein Files

November 14, 2025
Washington forest board takes 200,000 acres out of production – Capital Press

Washington Forest Board Removes 200,000 Acres from Production in Major Move

November 14, 2025
Science Hill’s Sawyer Ward (top) wrestles Montgomery Central’s Audrey Levendusky on her way to gold in the 152-pound weight class at last season’s TSSAA state tournament in Franklin. – Kingsport Times News

Science Hill’s Sawyer Ward (top) wrestles Montgomery Central’s Audrey Levendusky on her way to gold in the 152-pound weight class at last season’s TSSAA state tournament in Franklin. – Kingsport Times News

November 14, 2025
Bluestar Alliance Completes Acquisition of Iconic Workwear and Lifestyle Brand Dickies™ from VF Corporation – PR Newswire

Bluestar Alliance Takes Iconic Workwear and Lifestyle Brand Dickies™ to New Heights

November 14, 2025
Figure Technology stock spikes after Q3 revenue surpasses consensus (FIGR:NASDAQ) – Seeking Alpha

Figure Technology stock spikes after Q3 revenue surpasses consensus (FIGR:NASDAQ) – Seeking Alpha

November 14, 2025
‘He’s just impossible:’ Nikola Jokić’s 55-point game? The best player in the world is having a season like no other — ever – Yahoo Sports

‘He’s just impossible:’ Nikola Jokić’s 55-point game? The best player in the world is having a season like no other — ever – Yahoo Sports

November 13, 2025

Categories

Archives

November 2025
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
« Oct    
Earth-News.info

The Earth News is an independent English-language daily published Website from all around the World News

Browse by Category

  • Business (20,132)
  • Ecology (918)
  • Economy (939)
  • Entertainment (21,812)
  • General (18,167)
  • Health (9,978)
  • Lifestyle (948)
  • News (22,149)
  • People (940)
  • Politics (950)
  • Science (16,150)
  • Sports (21,438)
  • Technology (15,918)
  • World (924)

Recent News

France 4-0 Ukraine (Nov 13, 2025) Game Analysis – ESPN

France Crushes Ukraine in a Spectacular 4-0 Triumph on November 13, 2025

November 14, 2025
Fed’s December decision ‘obvious’ as something isn’t right with the economy: MetLife’s Drew Matus – CNBC

Why the Fed’s December Move Sends a Strong Warning About the Economy

November 14, 2025
  • About
  • Advertise
  • Privacy & Policy
  • Contact

© 2023 earth-news.info

No Result
View All Result

© 2023 earth-news.info

No Result
View All Result

© 2023 earth-news.info

Go to mobile version