Chain of Prompts and Memories for Accessible Symbolic Applications in the Legal Domain
Abstract
This article introduces a novel hybrid approach that enhances the accessibility and explainability of symbolic legal systems by integrating them with large language models (LLMs). While symbolic systems provide transparency and justifiability, they suffer from communicability issues and limitations in knowledge representation. Conversely, LLMs offer natural language fluency but struggle with reliability and justifiability in legal reasoning. The article bridges this gap by structuring legal tasks into a modular, interconnected sequence of prompts, supported by contextually relevant memory retrieval, thus creating a chain of prompts and memories. The methodology is validated through two case studies. The first applies it to computable contracts, demonstrating its ability to map code to contractual provisions, thereby making them more accessible. The second case study involves an expert legal system, where the hybrid approach generates accessible explanations of Prolog-based legal reasoning. The findings show that the hybrid approach enhances the clarity and interpretability of legal applications while preserving justifiability, using a modular structure that allows for adaptability across different legal tasks.

