Refining Translations with Large Language Models: A Constraint-Aware Iterative Prompting Approach
S. Chen, Xiayang Shi, Pu Li, Jingjing Liu, Yinlin Li · Data Intelligence · 2025
Large Language Models (LLMs) have shown impressive capabilities in Machine Translation (MT), even when translating languages not specifically included in their training data. However, accurately translating rare words in lowresource or domain-specific contexts remains a significant challenge for LLMs. To address this limitation, we propose a multi-step prompt engineering approach that enhances translation accuracy by prioritizing the identification and precise rendering of critical keywords essential to semantic understanding. Our method first identifies these highimportance keywords and retrieves their translations from a bilingual dictionary, which are then integrated into the model’s context via Retrieval-Augmented Generation (RAG). Additionally, we implement an iterative self-checking mechanism to mitigate potential hallucinations introduced by lengthy prompts, enabling the LLM to refine its outputs through lexical and semantic constraints. Experimental evaluations conducted using Llama and Qwen as base models on the FLORES-200 andWMTbenchmarks demonstrate substantial improvements over baseline systems, particularly in low-resource settings. These results highlight the effectiveness of our approach in improving translation accuracy and consistency, offering a promising solution for enhancing MT performance in resource-constrained environments.