Proceedings

AI4Contracts: LLM & RAG-Powered Encoding of Financial Derivative Contracts

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. AI4Tech: AI Enabling Technologies. Pages 9305-9312.

https://doi.org/10.24963/ijcai.2025/1034

© 2025 International Joint Conferences on Artificial Intelligence

Abstract

Large Language Models (LLMs) and Retrieval Augmented Generation (RAG) are reshaping how AI systems extract and organize information from unstructured text. A key challenge is designing AI methods that can incrementally extract, structure, and validate information while preserving hierarchical and contextual relationships. We introduce CDMizer, a template driven, LLM, and RAG-based framework for structured text transformation. By leveraging depth-based retrieval and hierarchical generation, CDMizer ensures a controlled, modular process that aligns generated outputs with predefined schemas. Its template-driven approach guarantees syntactic correctness, schema adherence, and improved scalability, addressing key limitations of direct generation methods. Additionally, we propose an LLM-powered evaluation framework to assess the completeness and accuracy of structured representations. Demonstrated in the transformation of Over-the-Counter (OTC) financial derivative contracts into the Common Domain Model (CDM), CDMizer establishes a scalable foundation for AI-driven document understanding, structured synthesis, and automated validation in broader contexts.

  1. [Agreement, 2002] ISDA Master Agreement. 2002 isda master agreement. https://www.isda.org/book/2002-isda-master-agr eement-mylibrary/, 2002. Link
  2. [Allamanis et al., 2024] Miltiadis Allamanis, Sheena Panthap- lackel, and Pengcheng Yin. Unsupervised evaluation of code llms with round-trip correctness. arXiv preprint arXiv:2402.08699, 2024.
  3. [Allouche et al., 2021] Mohamed Allouche, Mihai Mitrea, Alexan- dre Moreaux, and Sang-Kyun Kim. Automatic smart contract generation for internet of media things. ICT Express, 7(3):274- 277, 2021.
  4. [Armitage, 2022] Matthew Armitage. Trust, confidence, and au- tomation: The isda master agreement as a smart contract. Busi- ness Law Review, 43(2), 2022.
  5. [Choudhury et al., 2018] Olivia Choudhury, Nolan Rudolph, Issa Sylla, Noor Fairoza, and Amar Das. Auto-generation of smart contracts from domain-specific ontologies and semantic rules. In 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), pages 963-970. IEEE, 2018.
  6. [Clack and Vanca, 2018] Christopher D Clack and Gabriel Vanca. Temporal aspects of smart contracts for financial derivatives. In Leveraging Applications of Formal Methods, Verification and Validation. Industrial Practice: 8th International Symposium, ISoLA 2018, Limassol, Cyprus, November 5-9, 2018, Proceed- ings, Part IV 8, pages 339-355. Springer, 2018.
  7. [FINOS, 2024a] FINOS. Common domain model. https://github.c om/finos/common-domain-model, 2024. Accessed: 2025-05-09. Link
  8. [FINOS, 2024b] FINOS. Overview of the finos cdm. https://cdm. finos.org/docs/cdm-overview/#purpose, 2024. Link
  9. [FINOS, 2025] FINOS. common-domain-model. https://cdm.finos .org/, 2025. Link
  10. [Frantz and Nowostawski, 2016] Christopher K Frantz and Mariusz Nowostawski. From institutions to code: Towards automated generation of smart contracts. In 2016 IEEE 1st International Workshops on Foundations and Applications of Self* Systems (FAS* W), pages 210-215. IEEE, 2016.
  11. [Fries and Kohl-Landgraf, 2018] Christian P Fries and Peter Kohl- Landgraf. Smart derivative contracts (detaching transactions from counterparty credit risk: Specification, parametrisation, val- uation). Available at SSRN 3163074, 2018.
  12. [ISDA, 2023] ISDA. Key trends in the size and composition of otc derivatives markets in the first half of 2023. https://www.isda.o rg/2023/12/07/key-trends-in-the-size-and-composition-of-otc-d erivatives-markets-in-the-first-half-of-2023, 2023. Link
  13. [J.P. Morgan, 2024] J.P. Morgan. Usd/inr irs disclosure. https://ww w.jpmorgan.com/content/dam/jpm/global/disclosures/IN/usd-inr -irs.pdf, 2024. Accessed: 2025-05-09. Link
  14. [Kang et al., 2024] Inwon Kang, William Van Woensel, and Oshani Seneviratne. Using large language models for generating smart contracts for health insurance from textual policies. In AI for Health Equity and Fairness: Leveraging AI to Address Social Determinants of Health, pages 129-146. Springer, 2024.
  15. [Karanjai et al., 2024] Rabimba Karanjai, Lei Xudagger, and Wei- dong Shi. Solmover: Feasibility of using llms for translating smart contracts. In 2024 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), pages 1-3. IEEE, 2024.
  16. [Li et al., 2022] Yujia Li, David Choi, Junyoung Chung, Nate Kushman, Julian Schrittwieser, Rémi Leblond, Tom Eccles, James Keeling, Felix Gimeno, Agustin Dal Lago, et al. Competition-level code generation with alphacode. Science, 378(6624):1092-1097, 2022.
  17. [Liu et al., 2024] Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation. Advances in Neural Information Processing Systems, 36, 2024.
  18. [Marchesi et al., 2022] Lodovica Marchesi, Katiuscia Mannaro, Michele Marchesi, and Roberto Tonelli. Automatic generation of ethereum-based smart contracts for agri-food traceability sys- tem. Ieee Access, 10:50363-50383, 2022.
  19. [Oluwajebe et al., 2020] Olusegun Oluwajebe, Mary Duah, and Polina Golnikova. Smart derivatives contracting: Automating in- terest rate swaps in the over-the-counter (otc) market with the daml. Available at SSRN 3750089, 2020.
  20. [Parvez et al., 2021] Md Rizwan Parvez, Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. Re- trieval augmented code generation and summarization. arXiv preprint arXiv:2108.11601, 2021.
  21. [RBC Capital Markets, 2024] RBC Capital Markets. Structured rates presentation or document. https://www.rbccm.com/stru cturedrates/file-566984.pdf, 2024. Accessed: 2025-05-09. Link
  22. [Singh et al., 2024] Srisht Fateh Singh, Panagiotis Michalopoulos, and Andreas Veneris. Option contracts in the defi ecosys- tem: Motivation, solutions, & technical challenges. In 2024 IEEE International Conference on Blockchain and Cryptocur- rency (ICBC), pages 1-7. IEEE, 2024.
  23. [Sorensen, 2024] Derek Sorensen. (in) correct smart contract spec- ifications. In 2024 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), pages 567-575. IEEE, 2024.
  24. [Tateishi et al., 2019] Takaaki Tateishi, Sachiko Yoshihama, Naoto Sato, and Shin Saito. Automatic smart contract generation us- ing controlled natural language and template. IBM Journal of Research and Development, 63(2/3):6-1, 2019.
  25. [Vaithilingam et al., 2022] Priyan Vaithilingam, Tianyi Zhang, and Elena L Glassman. Expectation vs. experience: Evaluating the usability of code generation tools powered by large language models. In Chi conference on human factors in computing sys- tems extended abstracts, pages 1-7, 2022.
  26. [Van Woensel et al., 2023] William Van Woensel, Manan Shukla, and Oshani Seneviratne. Translating clinical decision logic within knowledge graphs to smart contracts. In SeWeBMeDA@ ESWC, 2023.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards