融合三段论推理和知识增强的司法问答方法Method for judicial question-answering by combining syllogistic reasoning and knowledge augmentation
肖立东,林川,黄瑞章,秦永彬,陈艳平,周裕林
摘要(Abstract):
大语言模型在深入理解法律、厘清法律条文与司法问题逻辑关联方面存在不足,导致其在司法问答领域的表现受到限制。针对该问题,提出了一种融合三段论推理和司法知识增强的问答方法。该方法首先引入法律条款作为外部知识库,以弥补大语言模型在司法领域知识的局限;其次通过司法三段论的思维逻辑构建思维链,增强大语言模型对于司法问题与法律条款之间内在逻辑联系的推理能力;最后大语言模型结合法律条款和司法三段论进行推理,生成更精准和更符合法律逻辑的回答。实验结果显示,提出的方法在司法考试选择题和司法咨询问答数据集上,相较于基线模型分别平均提高了10.1%和12.4%,进一步验证了有效性。
关键词(KeyWords): 大语言模型;知识增强;司法问答;法律推理;司法三段论
基金项目(Foundation): 国家重点研发计划(2023YFC3304500);; 贵州省科学技术基金重点资助项目(黔科合重大专项字[2024]003);; 贵州省科技支撑计划项目(黔科合支撑[2023]一般448)
作者(Author): 肖立东,林川,黄瑞章,秦永彬,陈艳平,周裕林
DOI: 10.15983/j.cnki.jsnu.2026502
参考文献(References):
- [1]李明达,邸洪波,孙媛媛,等.基于法条检索的生成式法律问答研究[J].山西大学学报(自然科学版),2025,48(4):653-665.LI M D,DI H B,SUN Y Y,et al.Research on generative legal question answering based on statutory articles retrieval[J].Journal of Shanxi University(Natural Science Edition),2025,48(4):653-665.
- [2]ABDALLAH A,PIRYANI B,JATOWT A.Exploring the state of the art in legal QA systems[J].Journal of Big Data,2023,10(1):127.
- [3]KASAI J,SAKAGUCHI K,TAKAHASHI Y,et al.RealTime QA:what's the answer right now?[EB/OL].[2025-07-16].https:∥arxiv.org/abs/2207.13332.
- [4]HIRSCHMAN L,GAIZAUSKAS R.Natural language question answering:the view from here[J].Natural Language Engineering,2001,7(4):275-300.
- [5]DUAN N,TANG D Y,CHEN P,et al.Question generation for question answering[C]∥Proceedings of the2017Conference on Empirical Methods in Natural Language Processing.Copenhagen,Denmark.Stroudsburg,PA,USA:ACL,2017:866-874.
- [6]JI Z C,LU Z D,LI H.An information retrieval approach to short text conversation[EB/OL].[2025-07-16].https:∥arxiv.org/abs/1408.6988.
- [7]PRAGER J.Open-domain question-answering[J].Foundations and Trends in Information Retrieval,2006,1(2):91-231.
- [8]CHUNG H,SONG Y I,HAN K S,et al.A practical QA system in restricted domains[EB/OL].[2025-07-16].https:∥aclanthology.org/W04-0507.pdf.
- [9]BROWN T B,MANN B,RYDER N,et al.Language models are few-shot learners[C]∥Proceedings of the34th International Conference on Neural Information Processing Systems.December 6-12,2020,Vancouver,BC,Canada.New York:ACM,2020:1877-1901.
- [10]XU Z W,JAIN S,KANKANHALLI M.Hallucination is inevitable:an innate limitation of large language models[EB/OL].[2025-07-16].https:∥arxiv.org/abs/2401.11817.
- [11]DONG G T,YUAN H Y,LU K M,et al.How abilities in large language models are affected by supervised finetuning data composition[EB/OL].[2025-07-16].https:∥arxiv.org/abs/2310.05492.
- [12]LEWIS P,PEREZ E,PIKTUS A,et al.Retrieval-augmented generation for knowledge-intensive NLP tasks[EB/OL].[2025-07-16].https:∥arxiv.org/abs/2005.11401.
- [13]WEI J,WANG X Z,SCHUURMANS D,et al.Chain-ofthought prompting elicits reasoning in large language models[C]∥Proceedings of the 36th International Conference on Neural Information Processing Systems.28November 2022,New Orleans,LA,USA.New York:ACM,2022:24824-24837.
- [14]焦宝乾.三段论推理在法律论证中的运用[J].求是学刊,2008,35(1):82-89.JIAO B Q.The use of syntactic reasoning in legal argument[J].Seeking Truth,2008,35(1):82-89.
- [15]PRAKASH T,TRIPATHY B K,SHARMILA B K.ALICE:a natural language question answering system using dynamic attention and memory[M]∥Soft Computing Systems.Singapore:Springer Singapore,2018:274-282.
- [16]HUANG X,ZHANG J Y,LI D C,et al.Knowledge graph embedding based question answering[C]∥Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining.February 11-15,2019,Melbourne VIC,Australia.New York:ACM,2019:105-113.
- [17]KIM M Y,XU Y,GOEBEL R.Applying a convolutional neural network to legal question answering[M]∥New Frontiers in Artificial Intelligence.Cham:Springer International Publishing,2017:282-294.
- [18]DO P K,NGUYEN H T,TRAN C X,et al.Legal question answering using ranking SVM and deep convolutional neural network[EB/OL].[2025-07-16].https:∥arxiv.org/abs/1703.05320.
- [19]KIM M Y,XU Y,GOEBEL R.Applying a convolutional neural network to legal question answering[C]∥New Frontiers in Artificial Intelligence.Cham:Springer,2017:282-294.
- [20]WEN J,HE W.HanFei-1.0[EB/OL].[2025-07-16].https:∥github.com/siat-nlp/HanFei.
- [21]RYU C,LEE S,PANG S,et al.Retrieval-based evaluation for LLMs:a case study in Korean legal QA[C]∥Proceedings of the Natural Legal Language Processing Workshop 2023.Singapore.Stroudsburg:ACL,2023:132-137.
- [22]LOUIS A,VAN DIJCK G,SPANAKIS G.Interpretable long-form legal question answering with retrieval-augmented large language models[C]∥Proceedings of the38th AAAI Conference on Artificial Intelligence and36th Conference on Innovative Applications of Artificial Intelligence and Fourteenth Symposium on Educational Advances in Artificial Intelligence.New York:ACM,2024:22266-22275.
- [23]CUI J,LI Z,YAN Y,et al.Chatlaw:open-source legal large language model with integrated external knowledge bases[EB/OL].[2025-07-16].https:∥arxiv.org/pdf/2306.16092v1.
- [24]ZHOU Z,SHI J X,SONG P X,et al.LawGPT:a Chinese legal knowledge-enhanced large language model[EB/OL].[2025-07-16].https:∥arxiv.org/abs/2406.04614.
- [25]LI H.LexiLaw[EB/OL].[2025-07-16].https:∥github.com/CShaitao/LexiLaw.
- [26]HUANG Q Z,TAO M X,ZHANG C,et al.Lawyer LLama technical report[EB/OL].[2025-07-16].https:∥arxiv.org/abs/2305.15062.
- [27]CHEN J L,XIAO S T,ZHANG P T,et al.BGE M3-embedding:multi-lingual,multi-functionality,multigranularity text embeddings through self-knowledge distillation[EB/OL].[2025-07-16].https:∥arxiv.org/abs/2402.03216.
- [28]YUE S B,LIU S J,ZHOU Y X,et al.LawLLM:intelligent legal system with legal reasoning and verifiable retrieval[C]∥Database Systems for Advanced Applications.Singapore.Cham:Springer,2024:304-321.