Published September 8, 2026 | Version 1.0

Code Translation using Large Language Models: What's the role of the Research Software Engineer?

  • 1. UCL

Description

Translating research code to other programming language enables researchers to reach beyond their own domain, increasing research impact whilst guarding against software obsolescence. Successful translation requires skills in both the source and target language, and the research domain; it is unlikely that any individual will be able to perform translation. Large language models (LLMs) support translation by amalgamating language and domain knowledge from many sources. RSEs play a role in this by implementing best practice and providing validation tools.

We will discuss our experiences in developing a Claude Code plugin to support domain experts in statistics in translating Stata packages to R and Python.
The plugin implements 4 skills;
  1. Analyse and plan: Is the package well documented and tested? Which target language(s)? Create a new library or contribute to an existing library?
  2. Translation to pseudocode: Translation to pseudocode supports human review without language expertise. Excludes any existing tests.
  3. Pseudocode to target language(s): Translate; add infrastructure to support ongoing opensource development (CI testing, contributing guidelines, licenses).
  4. Tests and documentation: Implement any existing Stata tests in target language; summarise test correspondence; highlight missing tests. Review documentation (examples, papers), and translate to target language (eg. Vignettes in R)

We used the plugin in workshops with statisticians to translate a selection of Stata packages. We will discuss our experiences from the workshops and compare our results with existing research in code translation. We aim to provoke informed discussion about the role of RSEs and LLMs in code translation.

Files

links.txt

Files (123.2 kB)

Name Size
md5:ee9fbc67eba4324f5f01de393c292a0d
160 Bytes Preview Download
md5:83013bb5047a891a7a6af8311c44aa62
123.0 kB Preview Download

Additional details

Additional titles

Subtitle (English)
092

Related works

Is supplement to
10.5281/zenodo.22124105 (DOI)

Dates

Submitted
2026-08-27