JURISMIND: Context-Driven Retrieval for Accurate and Relevant Legal Question-Answering in Patent Filings

Pandey Shourya Prasad, Vidhish Trivedi, Madhav Rao, Srijoni Sen

2025

Abstract

Large Language Models (LLMs) have demonstrated strong performance in domain-specific conversational forums, but they often suffer from hallucinations-producing factually incorrect or contextually irrelevant responses. This issue is particularly critical in the legal domain, where accuracy is paramount. Existing solutions such as fine-tuning and static retrieval methods struggle to handle the complexities of legal language and often fail to provide sufficient contextual grounding. To address this, we propose JURISMIND, a context-driven retrieval-augmented generation (RAG) pipeline designed for the legal domain, with a focus on Patent Filing. Our approach retrieves relevant legal texts, case law, and statutes based on the input query. This retrieved context is combined with a base prompt and the user query, guiding the language model to respond using the provided legal context. This method significantly reduces hallucinations and improves the contextual accuracy of responses. Preliminary evaluation indicates that 56.32% of responses are in strong agreement and 27.59% in fair agreement with ground truth, totaling 83.91% alignment. Furthermore, JURISMIND achieves a BERTScore of 0.91, outperforming the 0.838 BERTScore of a pretrained LLaMA-based model. The code and dataset are publicly released to support adoption and further research in the developer community.

Download


Paper Citation


in Harvard Style

Prasad P., Trivedi V., Rao M. and Sen S. (2025). JURISMIND: Context-Driven Retrieval for Accurate and Relevant Legal Question-Answering in Patent Filings. In Proceedings of the 17th International Joint Conference on Knowledge Discovery, Knowledge Engineering and Knowledge Management - Volume 1: KDIR; ISBN , SciTePress, pages 323-329. DOI: 10.5220/0013716600004000


in Bibtex Style

@conference{kdir25,
author={Pandey Prasad and Vidhish Trivedi and Madhav Rao and Srijoni Sen},
title={JURISMIND: Context-Driven Retrieval for Accurate and Relevant Legal Question-Answering in Patent Filings},
booktitle={Proceedings of the 17th International Joint Conference on Knowledge Discovery, Knowledge Engineering and Knowledge Management - Volume 1: KDIR},
year={2025},
pages={323-329},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0013716600004000},
isbn={},
}


in EndNote Style

TY - CONF

JO - Proceedings of the 17th International Joint Conference on Knowledge Discovery, Knowledge Engineering and Knowledge Management - Volume 1: KDIR
TI - JURISMIND: Context-Driven Retrieval for Accurate and Relevant Legal Question-Answering in Patent Filings
SN -
AU - Prasad P.
AU - Trivedi V.
AU - Rao M.
AU - Sen S.
PY - 2025
SP - 323
EP - 329
DO - 10.5220/0013716600004000
PB - SciTePress