Augmenting Legal Reasoning with BERT: The Second Iteration of Bekenbey AI
Abstract
In recent years, the rapid advancement of technology has necessitated the use of machine learning models and artificial intelligence systems not only in the field of engineering but also in the resolution of complex problems in social sciences. In this study, we build upon the Bekenbey AI model, which is the first study in the literature to establish a connection between the legal domain and Generative AI. While the foundational model showed significant accuracy and robustness across various legal applications, recent advancements in natural language processing (NLP)—particularly in Transformer-based approaches—present new opportunities to enhance the model’s performance and adaptability. Our primary objective in this version is to integrate Bidirectional Encoder Representations from Transformers (BERT) into the existing Bekenbey AI pipeline to refine legal text processing, improve document classification, and provide more nuanced predictive analytics. By benefiting from BERT’s self-attention mechanisms and its powerful contextual embedding capabilities, this study aims to handle the complex semantic structures inherent in legal language with greater precision. The proposed approach enhances both classification accuracy and text generation quality, demonstrating the effectiveness of integrating domain-specific attention mechanisms with transformer-based models in legal AI applications. Experimental results indicate that the proposed model consistently outperforms the baseline across multiple evaluation metrics.
Keywords
Bekenbey AI, BERT, Legal document analysis, Law
Supporting Institution
Ethical Statement
Thanks
References
- Abimbola, B., de La Cal Marin, E., & Tan, Q. (2024). Enhancing legal sentiment analysis: A convolutional neural network–long short-term memory document-level model. Machine Learning and Knowledge Extraction, 6(2), 877–897. https://doi.org/10.3390/make6020041
- Aletras, N., Tsarapatsanis, D., Preoţiuc-Pietro, D., & Lampos, V. (2016). Predicting judicial decisions of the European Court of Human Rights: A natural language processing perspective. Peerj Computer Science, 2, Article e93.
- Alhalalmeh, A. H., & Al-Tarawneh, A. (2025). Artificial intelligence and the law: The complexities of technology and legalities. In Intelligence-Driven Circular Economy: Regeneration Towards Sustainability and Social Responsibility (pp. 641–649). Springer Nature Switzerland. https://doi.org/10.1007/978-3-031-74220-0_50
- Ashford, N. A., & Hall, R. P. (2011). Technology, globalization, and sustainable development: Transforming the industrial state. Yale University Press. https://doi.org/10.12987/9780300177602
- Barbosa, T. S., de Castro, D., Singh, A. K., & Vitale, S. (2026). An experimental assessment of ai-based legal decision-making systems in contract analysis and risk detection. Qubahan Techno Journal, 5(1), 37–65. https://doi.org/10.48161/qtj.v5n1a81
- Barnett, R. E. (2014). The structure of liberty: Justice and the rule of law (2nd ed.). Oxford University Press. https://doi.org/10.1093/0198297297.001.0001
- Bhambhoria, R., Dahan, S., Li, J., & Zhu, X. (2026). Evaluating AI for law: Bridging the gap with open-source solutions. In Compliance for Artificial Intelligence Systems: Strategies, Principles and Methods (pp. 59–74). Springer Nature Switzerland. https://doi.org/10.1007/978-3-032-12795-2_5
- Binns, R. (2018). Fairness in machine learning: Lessons from political philosophy. In Conference on Fairness, Accountability and Transparency (Vol. 81, pp. 149–159). PMLR. https://proceedings.mlr.press/v81/binns18a.html
- Cheong, B. C. (2024). Transparency and accountability in AI systems: safeguarding wellbeing in the age of algorithmic decision-making. Frontiers in Human Dynamics, 6, Article 1421273. https://doi.org/10.3389/fhumd.2024.1421273
- Chen, Q., Wu, Q., Chen, J., Wu, Q., van den Hengel, A., & Tan, M. (2020). Scripted video generation with a bottom-up generative adversarial network. IEEE Transactions on Image Processing, 29, 7454–7467. https://doi.org/10.1109/TIP.2020.3003227