LegalGPT: Comprehensible access to legal knowledge through generative AI
Photo: herbinisaac / Pixabay
In an increasingly complex society, access to legal information is crucial in order to understand and fulfil one's rights and obligations. However, many people, especially laypeople, face the challenge of deciphering legal texts. The often difficult legal language and the use of numerous technical terms often lead to misunderstandings and an uneven awareness of the law. Long, complex sentences with numerous references to other laws make it difficult even for well-informed citizens to understand and enforce their rights. Studies show that a large proportion of the population is forced to deal with original legal texts when legal questions arise. This is where our LegalGPT project comes in, developing an open-source AI system that explains legal texts in an understandable way and provides answers to legal questions.
Why not just use ChatGPT?
The widely used Large Language Models (LLMs) such as ChatGPT are not suitable for legal issues as they often ‘hallucinate’. This means that they generate information that is not based on real facts. This is particularly problematic in the legal field, where precise and reliable information is essential.
The aim of the project
The aim of the project is to develop an AI system that simplifies access to legal information and promotes the comprehensibility of legal texts. An innovative approach called Retrieval Augmented Generation (RAG) is being used. This uses a vector database with publicly accessible, digitised legal texts to provide precise and contextualised answers. The database ensures that the information is based on reliable and up-to-date legal sources, so that the user does not receive ‘hallucinated’ answers, but concrete, verifiable information.
How does it work?
In contrast to conventional LLMs, which are based on internal knowledge, RAG combines the strengths of an LLM with external knowledge sources. When an enquiry is made, the AI searches the connected databases for relevant information and formulates an answer based on real, verified legal texts. This ensures the accuracy and reliability of the information provided.
The vision of the project
The aim of the project is to prepare legal information in such a way that it is understandable and accessible to all citizens. By promoting legal education and facilitating access to legal knowledge, the AI system contributes to improving society's understanding of the law. In this way, it can contribute to a fairer and more transparent society.
Further information and current updates on the project can be found on our website: legalrag.github.io.
And here is a short video presentation of the project:
Student project: LegalGPT: An open-source AI system for the transparent explanation of German legal texts
Project short title: LegalGPT
Funding period: 01.10.2024 - 30.09.2025 (12 months)
Students: Johannes Fabian Hahn; Gregor Stange
Mentors: Anton Semjonov