Verifiable Legal Contract Question Answering Using Natural Language Inference Grounding and Knowledge Graphs
Abstract
Legal contract analysis is a critical yet labor-intensive process in the legal and business domains where precise interpretation of complex contractual language is required. Existing approaches to automated legal question answering (QA) suffer from hallucination, lack of verifiability, and inability to provide traceable reasoning. This work provides a hybrid neural and structured-verification pipeline that combines retrieval-augmented generation with multi-signal verification to produce accurate, verifiable answers from legal contracts. This system integrates a FAISS-based semantic retrieval engine using Sentence Transformers for clause-level retrieval, a Qwen 2.5-7B language model fine-tuned with Supervised Fine-Tuning (SFT) for structured legal tool-calling reasoning and fine-tuned DeBERTa-v3 Natural Language Inference (NLI) model for verification. The pipeline concludes with confidence gating that flags low-confidence answers, preventing silent hallucination.