'shiny' App for TRAPD/ISPOR Survey Translation with LLMs
Overview
A 'shiny' application to automate forward and back survey translation with optional reconciliation using large language models (LLMs). Supports both item-by-item and batch translation modes for optimal performance and context-aware translations. Handles multi-sheet Excel files and supports OpenAI (GPT), Google Gemini, and Anthropic Claude models. Follows the TRAPD (Translation, Review, Adjudication, Pretesting, Documentation) framework and ISPOR (International Society for Pharmacoeconomics and Outcomes Research) recommendations. See Harkness et al. (2010) doi:10.1002/9780470609927.ch7 and Wild et al. (2005) doi:10.1111/j.1524-4733.2005.04054.x.
Bug Fixes
- Fixed a crash during translation when a prompt referenced an unresolved placeholder (e.g.
{items_text}in item-by-item mode) or when survey text contained literal curly braces. Prompt interpolation now leaves unknown placeholders untouched instead of aborting the run. - Fixed GPT-5 / o-series ("reasoning") models: requests previously failed and silently fell back to a chat model. The 'responses' endpoint payload and the output extraction are corrected, and the output token budget was raised so large batch responses are no longer truncated.
New Features and Improvements
- API calls now automatically retry transient failures (HTTP 429 rate limits and 5xx server errors) with exponential backoff, and surface the provider's error message (e.g. quota details) instead of a bare status code.
Show all changes in 0.4.0Hide the rest of the changes in 0.4.0
- Custom (user-typed) model names that are not in the built-in list now work end to end: the provider is inferred from the model name, so newly released OpenAI, Gemini, and Anthropic models can be used without an app update.
- Updated the built-in model list to current models (e.g. Claude Opus 4.8, Sonnet 4.6, Haiku 4.5). Anthropic models that do not accept a temperature parameter are handled automatically.
- Model selection fields are now freely editable text boxes with a suggestion dropdown, so a custom model name can be typed or edited directly without first clearing the current selection.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 2includes a package overview page
- Examples that run
- 50%1 run in a plain check (under a condition) · 1 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- not tracked
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Dependencies
Code & Tests
People & History
Package metadata
- First published
- 2025-09-05
- Total releases
- 4 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1
- Download size
- 27 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("LLMTranslate")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.