mlsanityData to 13 Oct 2026

Using Large Language Models for Generating Smart Contracts for Health Insurance from Textual Policies

arXiv 2407.07019 ↗First posted 9 Jul 2024cs.CLcited by 5

Not on the map. Why?

Abstract (arXiv)

We explore using Large Language Models (LLMs) to generate application code that automates health insurance processes from text-based policies. We target blockchain-based smart contracts as they offer immutability, verifiability, scalability, and a trustless setting: any number of parties can use the smart contracts, and they need not have previously established trust relationships with each other. Our methodology generates outputs at increasing levels of technical detail: (1) textual summaries, (2) declarative decision logic, and (3) smart contract code with unit tests. We ascertain LLMs are good at the task (1), and the structured output is useful to validate tasks (2) and (3). Declarative languages (task 2) are often used to formalize healthcare policies, but their execution on blockchain is non-trivial. Hence, task (3) attempts to directly automate the process using smart contracts. To assess the LLM output, we propose completeness, soundness, clarity, syntax, and functioning code as metrics. Our evaluation employs three health insurance policies (scenarios) with increasing difficulty from Medicare's official booklet. Our evaluation uses GPT-3.5 Turbo, GPT-3.5 Turbo 16K, GPT-4, GPT-4 Turbo and CodeLLaMA. Our findings confirm that LLMs perform quite well in generating textual summaries. Although outputs from tasks (2)-(3) are useful starting points, they require human oversight: in multiple cases, even "runnable" code will not yield sound results; the popularity of the target language affects the output quality; and more complex scenarios still seem a bridge too far. Nevertheless, our experiments demonstrate the promise of LLMs for translating textual process descriptions into smart contracts.

Key facts. Cited by 5 papers in the map (data through 13 Oct 2026). Builds on 6 of its 28 references that are in the map. First posted on arXiv 9 Jul 2024.

Builds on

6 of 28 references.

References · 6

  1. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,072
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,205
  3. 2023Code Llama: Open Foundation Models for Codecited by 2,130
  4. 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 616
  5. 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 235
  6. 2022ChatGPT Makes Medicine Easy to Swallow: An Exploratory Case Study on Simplified Radiology Reportscited by 101

Built on by

Cited by year (2026 to 13 Oct)

Citing papers per year: 2024: 1; 2025: 3; 2026: 1.

5 papers.