Policy2Code: Comparing Approaches for Generating Web Application Code from SNAP Policy
- Lisa Singh ,
- Ariel Kennan ,
- Mohamed Ahmed ,
- Alessandra Garcia Guevara ,
- Avand Lakmazaheri ,
- Sophia Dorr ,
- Ann Lian
International Conference on Electronic Government |
Published by Springer | Organized by EGOV
We are in the early days of determining how to use large language models (LLMs) effectively to translate policy into code. This paper focuses on a specific use case: translating Supplemental Nutrition Assistance Program (SNAP) eligibility rules into web pages that help people determine whether they are eligible for SNAP benefits. We focus on categorical eligibility rules for four states and develop a methodology for rapid translation from policy to code. Our findings show that rapid translation of policy documents to code for our use case is straightforward using LLMs and is generally, fairly accurate. To support both research and application development, we share our prompts, pipeline, code, and application for others to use and replicate for other states.