6–9 Jul 2026
Europe/Warsaw timezone

SweEpiAI: An LLM-Powered R Shiny Application for Natural Language Exploration of Swedish Epidemiological Data APIs

7 Jul 2026, 11:55
5m
Lightning Talk (5 minutes) Lightning Talks

Speaker

Dr Máté Szilcz (Viti Science)

Description

Background: Public health databases often present barriers to non-technical users through complex query interfaces requiring knowledge of variable codes and API structures. The Swedish National Board of Health and Welfare maintains a comprehensive statistical database on disease prevalence and hospital care, yet exploring these data programmatically demands substantial technical expertise.
Objectives: To develop SweEpiAI (https://sweepiai.vitiscience.se/), an interactive R Shiny application that enables natural language querying and visualization of Swedish epidemiological data APIs through integration with large language models (LLMs).
Methods: SweEpiAI is built with the Rhino framework for R Shiny, using the ellmer package to interface with GPT-4.1. A multi-step LLM orchestration pipeline processes user queries: (1) query decomposition parses natural language into structured dimensions (diagnosis, region, age group, sex, time period); (2) metadata lookup retrieves available variables from the API; (3) API URI generation constructs valid requests; and (4) validation ensures query correctness before execution. Data are fetched in parallel using the furrr package and visualized interactively with echarts4r. The application includes Auth0 authentication, a PostgreSQL backend via Supabase, and is deployed using Docker and ShinyProxy.
Results: SweEpiAI allows users to ask plain-language questions, such as "How many patients with breast cancer were recorded in Sweden in the last five years?", and receive interactive charts and downloadable tables with customizable grouping and faceting. Pilot testing with researchers demonstrated the application's effectiveness in lowering barriers to epidemiological data exploration. Participants expressed interest in the integration of additional databases such as the Prescribed Drug Register
Conclusion: SweEpiAI demonstrates how LLM integration with R Shiny can democratize access to public health data, reducing technical barriers while maintaining data fidelity. Planned developments include expanding the range of supported data sources and enhancing query capabilities based on user feedback.

If you used AI tools or services to support the preparation of this submission, please state the name and reason for using each of them.

AI tool (Claude) was used to review the application.

Keywords: Please list up to 5 keywords to help us find the right session for your contribution. R Shiny, large language models, epidemiology, natural language interface, interactive visualization
Virtual Option This submission is for onsite presentation primarily, but I would also like it to be considered for pre-recorded virtual presentation if I don't get an onsite slot
Video Recording Video sharing is fine
The author(s) agree(s) to take responsibility and be accountable for the contents of the submission and is/are authorized to present it. Confirm

Author

Dr Máté Szilcz (Viti Science)

Co-authors

Presentation materials

There are no materials yet.