Bhatnagar, Mohit and Huchhanavar, Shivaraj S
(2025)
Enhancing legal assistance with AI: A comprehensive approach to intent classification and domain specific model tuning.
Artificial Intelligence and Law.
ISSN 0924-8463
(In Press)
Abstract
Our research explores the application of Large Language Models for enhancing legal advice through AI-driven conversational agents, focusing on the analysis and interpretation of user-generated content from a prominent online legal community. By leveraging BERTopic for topic modeling and GPT-3.5 for labeling of user intents, we constructed a dataset that served as the foundation for fine-tuning the Mistral 7B language model. This process involved Supervised Fine Tuning and Direct Preference Optimization, culminating in the creation of a Domain Specific Language Model for legal expertise. This model was then employed to guide GPT-3.5 responses, ensuring domain-specific relevance and contextual appropriateness. The evaluation of these responses was conducted using GPT-4, supplemented by human assessment, to gauge the quality of the models' outputs. We leverage an innovative end-to-end pipeline, building upon the framework proposed by Wang et al. (Empower large language model to perform better on industrial domain-specific question answering, 2023. arXiv:2305.11541), specifically adapted for the legal domain. This pipeline provides a foundational framework for developing sophisticated and scalable user-facing chatbots, presenting an alternative to the more common retrieval augmented generation techniques. Our contributions include providing datasets for further research on Legal Question Answering systems and advancements in human alignment of responses from chatbots. This research advances the technical frontier in AI-driven legal assistance and opens new avenues for enhancing the accessibility and quality of legal support through conversational AI technologies.
Item Type: | Article |
---|---|
Keywords: | Legal question answering | Chatbots | Direct preference optimization | Mistral 7B | GPT4 | BERTopic |
Subjects: | Physical, Life and Health Sciences > Computer Science Social Sciences and humanities > Social Sciences > Social Sciences (General) Social Sciences and humanities > Social Sciences > Law and Legal Studies |
JGU School/Centre: | Jindal Global Business School Jindal Global Law School |
Depositing User: | Dharmveer Modi |
Date Deposited: | 25 Feb 2025 13:03 |
Last Modified: | 25 Feb 2025 13:03 |
Official URL: | https://doi.org/10.1007/s10506-025-09441-1 |
URI: | https://pure.jgu.edu.in/id/eprint/9161 |
Downloads
Downloads per month over past year