backtranslate_eval
Evaluate translation quality by back-translating to source language and measuring word-level gloss overlap with the original text.
Instructions
Evaluate a translation via back-translation and gloss overlap.
Translates the output back to the source language using a different model, then computes word-level gloss overlap with the original text. This is the most powerful non-circular quality metric for translation: original → translate → back-translate → overlap.
Returns the back-translation, overlap score (0.0-1.0), matching/missing/extra glosses, and the model used for back-translation.
Args: text: Original source-language text (e.g. "father, head of household") translation: The translated text to evaluate (e.g. "Vater, Haupt eines Haushalts") source_lang: Source language name (e.g. "English") target_lang: Target language name (e.g. "German") back_model_id: Specific model for back-translation (default: auto-select different model) min_tier: Minimum quality tier for auto-selection (default "A") free_only: Only use free models (default false) max_tokens: Max response tokens (default 512)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| min_tier | No | A | |
| free_only | No | ||
| max_tokens | No | ||
| source_lang | Yes | ||
| target_lang | Yes | ||
| translation | Yes | ||
| back_model_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |