Rule-First, Agent-Second: Design and Evaluation of a Hybrid Java Framework Integrating Deterministic Business Rules and Spring AI Agents for Explainable Banking Exception Handling
DOI:
https://doi.org/10.63665/IJAICE.0204.11Keywords:
Banking Operations, Spring AI, Business Rules, Exception Handling, Explainable AI, Hybrid Architecture, Policy Guardrails, Decision Traceability, Human Oversight, Intelligent AutomationAbstract
Banking exception handling must be automated, transparent, and have good governance. This work consists of a hybrid java framework with the deterministic business rules, spring AI agents and independent policy guards. Four resolution strategies are compared through controlled experiments with 960 fictional banking cases in the framework of Design Science Research. The proposed framework has 96.8% accuracy, 71.9% straight-through processing and reduces the number of agent invocations by 50% compared to agent only processing. Policy guards clear up bad executions with made-up evidence and have proved out to be not very effective for more likely false recommendations. Results show architectural feasibility and reproducibility and traceability of design choices under controlled simulation, as well as the need for semantic verification and additional real banking validation.
References
[1]. Kalyani, S. and Gupta, N., 2023. Is artificial intelligence and machine learning changing the ways of banking: a systematic literature review and meta analysis. Discover Artificial Intelligence, 3(1), p.41.
[2]. Farinha, D., Pereira, R. and Almeida, R., 2024. A framework to support robotic process automation. Journal of Information Technology, 39(1), pp.149-166.
[3]. Van der Aalst, W.M., 2022. Process mining: a 360 degree overview. In Process mining handbook (pp. 3-34). Cham: Springer International Publishing.
[4]. Bédard, M., Leshob, A., Benzarti, I., Mili, H., Rab, R. and Hussain, O., 2024. A rule‐based method to effectively adopt robotic process automation. Journal of Software: Evolution and Process, 36(11), p.e2709.
[5]. Lameijer, B., de Vries, E.S., Antony, J., Garza-Reyes, J.A. and Sony, M., 2024. The implementation of Lean Six Sigma for the optimization of robotic process automation systems in financial service operations. Business Process Management Journal, 30(8), pp.232-259.
[6]. Wang, L., Ma, C., Feng, X., Zhang, Z., Yang, H., Zhang, J., Chen, Z., Tang, J., Chen, X., Lin, Y. and Zhao, W.X., 2024. A survey on large language model based autonomous agents. Frontiers of computer science, 18(6), p.186345.
[7]. Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K. and Cao, Y., 2022. React: Synergizing reasoning and acting in language models. arXiv preprint arXiv:2210.03629.
[8]. Schick, T., Dwivedi-Yu, J., Dessì, R., Raileanu, R., Lomeli, M., Hambro, E., Zettlemoyer, L., Cancedda, N. and Scialom, T., 2023. Toolformer: Language models can teach themselves to use tools. Advances in neural information processing systems, 36, pp.68539-68551.
[9]. Li, M., Zhao, Y., Yu, B., Song, F., Li, H., Yu, H., Li, Z., Huang, F. and Li, Y., 2023, December. Api-bank: A comprehensive benchmark for tool-augmented llms. In Proceedings of the 2023 conference on empirical methods in natural language processing (pp. 3102-3116).
[10]. Patil, S.G., Zhang, T., Wang, X. and Gonzalez, J.E., 2024. Gorilla: Large language model connected with massive apis. Advances in Neural Information Processing Systems, 37, pp.126544-126565.
[11]. Černevičienė, J. and Kabašinskas, A., 2024. Explainable artificial intelligence (XAI) in finance: a systematic literature review: J. Černevičienė, A. Kabašinskas. Artificial Intelligence Review, 57(8), p.216.
[12]. Weber, P., Carl, K.V. and Hinz, O., 2024. Applications of Explainable Artificial Intelligence in Finance—a systematic review of Finance, Information Systems, and Computer Science literature: P. Weber et al. Management Review Quarterly, 74(2), pp.867-907.
[13]. Gurram, A. 2024. Data pipeline engineering framework for reducing hallucinations and improving reliability in large language model applications. European Journal of Advances in Engineering and Technology, 11(3), 176-187.
[14]. Arrieta, A.B., Díaz-Rodríguez, N., Del Ser, J., Bennetot, A., Tabik, S., Barbado, A., García, S., Gil-López, S., Molina, D., Benjamins, R. and Chatila, R., 2020. Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI. Information fusion, 58, pp.82-115.
[15]. Turpin, M., Michael, J., Perez, E. and Bowman, S., 2023. Language models don't always say what they think: Unfaithful explanations in chain-of-thought prompting. Advances in Neural Information Processing Systems, 36, pp.74952-74965.
[16]. Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y.J., Madotto, A. and Fung, P., 2023. Survey of hallucination in natural language generation. ACM computing surveys, 55(12), pp.1-38.
[17]. Farquhar, S., Kossen, J., Kuhn, L. and Gal, Y., 2024. Detecting hallucinations in large language models using semantic entropy. Nature, 630(8017), pp.625-630.
[18]. Huang, X., Ruan, W., Huang, W., Jin, G., Dong, Y., Wu, C., Bensalem, S., Mu, R., Qi, Y., Zhao, X. and Cai, K., 2024. A survey of safety and trustworthiness of large language models through the lens of verification and validation. Artificial Intelligence Review, 57(7), p.175.
[19]. Arumilli, S. V. T. 2023. Improving enterprise pricing reliability through automated decision-system approaches for discount management. European Journal of Advances in Engineering and Technology, 10(10), 179-195.
[20]. Lin, Z., Guan, S., Zhang, W., Zhang, H., Li, Y. and Zhang, H., 2024. Towards trustworthy LLMs: a review on debiasing and dehallucinating in large language models: Z. Lin et al. Artificial Intelligence Review, 57(9), p.243.
[21]. Renkhoff, J., Feng, K., Meier-Doernberg, M., Velasquez, A. and Song, H.H., 2024. A survey on verification and validation, testing and evaluations of neurosymbolic artificial intelligence. IEEE Transactions on Artificial Intelligence, 5(8), pp.3765-3779.
[22]. Pan, L., Albalak, A., Wang, X. and Wang, W., 2023, December. Logic-lm: Empowering large language models with symbolic solvers for faithful logical reasoning. In Findings of the Association for Computational Linguistics: EMNLP 2023 (pp. 3806-3824).
[23]. Ye, X., Chen, Q., Dillig, I. and Durrett, G., 2023. Satlm: Satisfiability-aided language models using declarative prompting. Advances in Neural Information Processing Systems, 36, pp.45548-45580.
[24]. Olausson, T., Gu, A., Lipkin, B., Zhang, C., Solar-Lezama, A., Tenenbaum, J. and Levy, R., 2023, December. LINC: A neurosymbolic approach for logical reasoning by combining language models with first-order logic provers. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (pp. 5153-5176).
[25]. Kambhampati, S., Valmeekam, K., Guan, L., Verma, M., Stechly, K., Bhambri, S., Saldyt, L. and Murthy, A., 2024. Llms can't plan, but can help planning in llm-modulo frameworks. arXiv preprint arXiv:2402.01817.
[26]. Arumilli, S. V. T. 2024. Human-guided agentic AI workflows for enterprise operational decision-making. International Journal of Intelligent Systems and Applications in Engineering, 12(22s), 2513-.
[27]. Berkenkamp, F., 2023. Advanced Generative AI Frameworks for Cryptocurrency Fraud Detection and Volatility Prediction in Cloud-Based Systems. International Journal of Engineering & Extended Technologies Research (IJEETR), 5(6), pp.7715-7724.
[28]. Dave, M., 2023. Generative AI-Driven Cryptocurrency Analytics: Fraud Detection, Volatility Prediction, and Cloud-Native Java Architectures. International Journal of Research and Applied Innovations, 6(5), pp.9552-9561.
[29]. A. R. Khatoon, M. W. Ali Khan, H. M. H. Tariq, and T. Khan, "A lightweight block cipher based on combinatorial substitution structures," Journal of Discrete Mathematical Sciences and Cryptography, vol. 29, no. 10-A, pp. 3997–4007, 2026, doi: 10.47974/JDMSC-3026.
[30]. Zhao, H., Chen, H., Yang, F., Liu, N., Deng, H., Cai, H., Wang, S., Yin, D. and Du, M., 2024. Explainability for large language models: A survey. ACM Transactions on Intelligent Systems and Technology, 15(2), pp.1-38.
[31]. T. Khan, H. M. H. Tariq, M. W. Ali Khan, and A. R. Khatoon, "Homomorphic encryption based on modular arithmetic structures," Journal of Discrete Mathematical Sciences and Cryptography, vol. 29, no. 10-B, pp. 4087–4096, 2026, doi: 10.47974/JDMSC-3034.
[32]. Cloete, F., 2024. Governing artificial intelligence (AI) and other technologies in the digital era. Administratio Publica, 32(1), pp.1-30.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Authors

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.


