arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.07019cs.CL
收藏

利用大语言模型从文本化保单生成健康保险智能合约

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

Rensselaer Polytechnic Institute(伦斯勒理工学院);University of Ottawa(渥太华大学)

Inwon Kang, William Van Woensel, Oshani Seneviratne

AI总结:

本研究探索利用大语言模型从健康保险文本保单生成区块链智能合约,提出三层递进输出方法与多维度评估指标,实验验证其生成摘要效果较好,但复杂场景和代码可靠性仍需人工监督,展现了该方向的应用潜力。

摘要:

我们探索利用大语言模型(Large Language Models, LLMs)生成应用代码,以基于文本化保单实现健康保险流程的自动化。我们以区块链智能合约为目标载体,因为其具备不可篡改性、可验证性、可扩展性以及去信任环境:任意数量的参与方均可使用这些智能合约,且无需预先建立信任关系。我们的方法会生成技术细节逐层递进的输出:(1)文本摘要,(2)声明式决策逻辑,(3)附带单元测试的智能合约代码。我们确认LLMs擅长完成任务(1),且其结构化输出可用于验证任务(2)和(3)。声明式语言(任务2)常被用于将医疗保健政策形式化,但这类语言在区块链上的执行并非易事。因此,任务(3)尝试利用智能合约直接实现该流程的自动化。为评估LLM的输出质量,我们提出了完备性、可靠性、清晰性、语法正确性以及代码可运行性这几项评估指标。我们的评估采用了三份难度递增的健康保险保单(场景),均来自Medicare官方手册。评估使用的模型包括GPT-3.5 Turbo、GPT-3.5 Turbo 16K、GPT-4、GPT-4 Turbo和CodeLLaMA。研究结果证实,LLMs在生成文本摘要方面表现相当出色。尽管任务(2)至(3)的输出可作为有用的起点,但它们仍需人工监督:在多个案例中,即便“可运行”的代码也无法产生可靠结果;目标语言的普及程度会影响输出质量;更复杂的场景目前似乎仍难以实现。尽管如此,我们的实验证明了LLMs在将文本化流程描述转化为智能合约方面的应用潜力。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑