Table of Contents
Fetching ...

Logical Lease Litigation: Prolog and LLMs for Rental Law Compliance in New York

Sanskar Sehgal, Yanhong A. Liu

TL;DR

This paper addresses the challenge of performing reliable landlord-tenant legal analysis in New York while ensuring transparent reasoning. It proposes LogicLease, a hybrid system that uses LLMs for information extraction and a Prolog backend for legal reasoning, with a clear separation between data extraction and rule-based evaluation. The authors demonstrate $100\%$ accuracy on a dataset of $10$ cases with an average processing time of $2.572$ seconds, and show that the approach reduces hallucinations common in LLM-only systems. The work highlights the practicality and transparency of combining NLP with defeasible logic in legal analysis and suggests avenues for open-source expansion.

Abstract

Legal cases require careful logical reasoning following the laws, whereas interactions with non-technical users must be in natural language. As an application combining logical reasoning using Prolog and natural language processing using large language models (LLMs), this paper presents a novel approach and system, LogicLease, to automate the analysis of landlord-tenant legal cases in the state of New York. LogicLease determines compliance with relevant legal requirements by analyzing case descriptions and citing all relevant laws. It leverages LLMs for information extraction and Prolog for legal reasoning. By separating information extraction from legal reasoning, LogicLease achieves greater transparency and control over the legal logic applied to each case. We evaluate the accuracy, efficiency, and robustness of LogicLease through a series of tests, achieving 100% accuracy and an average processing time of 2.57 seconds. LogicLease presents advantages over state-of-the-art LLM-based legal analysis systems by providing clear, step-by-step reasoning, citing specific laws, and distinguishing itself by its ability to avoid hallucinations -- a common issue in LLMs.

Logical Lease Litigation: Prolog and LLMs for Rental Law Compliance in New York

TL;DR

This paper addresses the challenge of performing reliable landlord-tenant legal analysis in New York while ensuring transparent reasoning. It proposes LogicLease, a hybrid system that uses LLMs for information extraction and a Prolog backend for legal reasoning, with a clear separation between data extraction and rule-based evaluation. The authors demonstrate accuracy on a dataset of cases with an average processing time of seconds, and show that the approach reduces hallucinations common in LLM-only systems. The work highlights the practicality and transparency of combining NLP with defeasible logic in legal analysis and suggests avenues for open-source expansion.

Abstract

Legal cases require careful logical reasoning following the laws, whereas interactions with non-technical users must be in natural language. As an application combining logical reasoning using Prolog and natural language processing using large language models (LLMs), this paper presents a novel approach and system, LogicLease, to automate the analysis of landlord-tenant legal cases in the state of New York. LogicLease determines compliance with relevant legal requirements by analyzing case descriptions and citing all relevant laws. It leverages LLMs for information extraction and Prolog for legal reasoning. By separating information extraction from legal reasoning, LogicLease achieves greater transparency and control over the legal logic applied to each case. We evaluate the accuracy, efficiency, and robustness of LogicLease through a series of tests, achieving 100% accuracy and an average processing time of 2.57 seconds. LogicLease presents advantages over state-of-the-art LLM-based legal analysis systems by providing clear, step-by-step reasoning, citing specific laws, and distinguishing itself by its ability to avoid hallucinations -- a common issue in LLMs.

Paper Structure

This paper contains 13 sections, 1 equation, 4 figures, 1 table.

Figures (4)

  • Figure 2: Design diagram of LogicLease
  • Figure 3: Total Time Taken for Each Test Case
  • Figure 4: ChatGPT output
  • Figure 5: Gemini output