Public health

Prompt engineering for epidemiological surveillance: A step toward wider access to public health data analysis through natural language processing.

Gabriel S Mouta, Sarah P R Freire, Giorgio Montesi, Luis G E Souza, José D A Araújo, Vanderson S Sampaio, Donata Medaglini, Helder I Nakaya

Laboratory of Molecular Microbiology and Biotechnology, Department of Medical Biotechnology, University of Siena, Siena, 53100, Italy. · Faculdade Israelita de Ciências da Saúde Albert Einstein, Hospital Israelita Albert Einstein, São Paulo, 056529000, SP, Brazil.

Key points

From the paper's conclusion
  • Dictionary constraints restricted which data a generated script could analyze, but not how it was analyzed: reproducibility was dependent on both the prompt and dictionary, not the constraint mechanism alone. Errors within the declared set were identified by rater review, not by the framework, motivating pre-execution type checks or returning unstated choices as clarification requests. PEFES accelerates epidemiological work rather than replacing it, and it is a step toward wider access to surveillance data analysis.

Abstract

OBJECTIVES: The aim of this study was to describe and assess a framework that generates epidemiological analysis scripts from natural-language queries constrained by surveillance data dictionaries. STUDY DESIGN: Methodological framework development with internal consistency assessment. METHODS: PEFES (Prompt Engineering for Epidemiological Surveillance) restricts large language model output to dictionary-declared variables and coding schemes, validates scope before generating a script, and does not execute code. Two authors with prior programming experience ('raters') submitted identical sets of 22 in-scope and 22 scope-control queries across three case studies (respiratory syncytial virus, influenza A and dengue) using Claude Opus 4.8 and Gemini 3.7 Flash against OpenDataSUS datasets. RESULTS: The two raters agreed on the behavior for all 22 scope-control queries: the 17 queries that were expected to be declined did not produce a script, and all 5 in-scope counterparts produced a script. Every source field read was dictionary-declared. Reported values were identical for 14 of the 22 in-scope queries and divergent for 8 (all where a prompt left a choice unstated). One session compared a declared field against wrong-type values, returning empty tables under formatted headings. CONCLUSIONS: Dictionary constraints restricted which data a generated script could analyze, but not how it was analyzed: reproducibility was dependent on both the prompt and dictionary, not the constraint mechanism alone. Errors within the declared set were identified by rater review, not by the framework, motivating pre-execution type checks or returning unstated choices as clarification requests. PEFES accelerates epidemiological work rather than replacing it, and it is a step toward wider access to surveillance data analysis.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers

Prompt engineering for epidemiological surveillance: A step toward wider access to public health data analysis through natural language processing — Science Skim