MyNixOS website logo
Description

'shiny' App for TRAPD/ISPOR Survey Translation with LLMs.

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>.

LLMTranslate

LLMTranslate is an R package that wraps a Shiny application for TRAPD/ISPOR-style survey translation. It automates forward translation, optional back-translation, and reconciliation using large language models from multiple providers:

  • OpenAI: GPT-4o, GPT-4.1, GPT-5 series, and o-series reasoning models
  • Google Gemini: Gemini 2.5 Pro, 2.5 Flash, 2.0 Flash
  • Anthropic Claude: Claude Sonnet 4.5, Claude Haiku 4.5, Claude Opus 4.1, and more

Key Features (v0.3.0)

  • Two Translation Modes:
    • Batch Translation: Translates all items in one LLM call for speed and context-aware consistency
    • Item-by-item Translation: Processes each item separately, ideal for very long instruments
  • Multi-Sheet Excel Support: Translate individual sheets or all sheets at once
  • Custom Model Support: Enter any model name, not just predefined ones
  • Smart Empty Row Handling: Automatically skips empty rows while maintaining alignment
  • Comprehensive Logging: Download includes Model Selection Log, Prompt Log, and translation mode used
  • Progress Tracking: Visual progress bars with sheet-specific status updates

Installation

Install from CRAN:

install.packages("LLMTranslate")

Usage

Launch the Shiny app:

library(LLMTranslate)
run_app()

Quick Start

  1. Set up API keys in the "API Keys & Models" tab (or set environment variables)
  2. Choose translation mode: Batch Translation (recommended) or Item-by-item
  3. Upload Excel file with one item per row
  4. Select sheet(s) to translate (or choose "All sheets")
  5. Choose column containing original items
  6. Adjust prompts if needed (defaults follow TRAPD/ISPOR best practices)
  7. Start translation and monitor progress
  8. Download results as Excel with all sheets and logs

Excel File Preparation

  • One survey item per row
  • Dedicated column with original text
  • No merged cells
  • Supports .xlsx and .xls formats
  • Multiple sheets supported

Translation Modes

Batch Translation (recommended for most surveys):

  • Faster processing (3 LLM calls total vs N×3 for item-by-item)
  • Better context-aware translations
  • Maintains terminology consistency across items
  • Best for instruments with <100 items

Item-by-item Translation:

  • Works with any instrument length
  • Can pause and resume translation
  • Better for 100+ items or rate limit concerns
  • Fine-grained error handling per item.
Metadata

Version

0.3.0

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows