Can Large Language Models Handle Long-Text Translation? A Deep Dive with Engineering Insights
Large language models (LLMs) are increasingly used for translation, but their performance on long-form content—such as books and technical documents—remains poorly understood beyond superficial user impressions. Drawing on hands-on experience designing translation systems and running million-word-scale LLM translation tests, this article explains the fundamental differences between generative translation and traditional machine translation, highlights the core challenges of randomness, mistranslation, and hallucinated additions in long-text processing, and presents a practical engineering workflow. The proposed solution combines chunked scheduling, constrained prompts with terminology injection, and cloud-native orchestration to stabilize output and produce publication-ready translations.
Generative Translation vs. Traditional Machine Translation
To evaluate LLM-based translation, it is essential to understand how its underlying mechanism differs from conventional machine translation (MT).
Traditional MT algorithms rely on a deterministic mapping. In statistical or rule-based systems, the model seeks an optimal alignment between source and target segments—for example, mapping “石头” to “stone.” The resulting output may sound rigid and lack contextual fluidity, but it is inherently stable: the mapping between input and output is highly controllable, and the system rarely produces wildly unexpected results.
In contrast, LLM translation is essentially a content generation operation. The model treats the prompt (which includes the source text) as context and predicts the next token based on probability distributions. During this process, the model has no intrinsic, hard constraint of “fidelity” or “accuracy.” For instance, if you instruct the model to “translate the following Chinese into English” versus “translate the following Chinese into English in Mark Twain’s humorous style,” both are equally valid generation instructions from the model’s perspective—it will produce two very different “translations.”
This means LLMs do not truly understand translation in the human linguistic sense; they simply execute text-generation instructions. Because the pre-training phase does not optimize exclusively for professional-grade translation quality, the generated output is essentially a “draft” produced under a relatively coarse standard, accompanied by significant randomness.
Core Pain Points in Long-Text Translation: Randomness and Accuracy Loss
In real-world engineering tests, the randomness of LLM translation scales exponentially with output length, making it particularly problematic for long documents and book-length translations.
In professional translation review workflows, the two most critical metrics are mistranslation and omission—the leading causes of translation incidents. When LLMs process long texts, the autoregressive generation process inevitably suffers from attention decay as the context window grows. This leads to a sharp increase in the probability of mistranslation and omission.
Even more concerning is the phenomenon of addition (or hallucinated content)—the model generates text that does not exist in the source. This occurs because generative models tend to “fill in the blanks” to maintain fluency when they encounter missing information or logical gaps.
Based on empirical testing, even with a large, high-performance frontier LLM, the probability of mistranslation and omission rises significantly when a single request exceeds approximately 2,000 Chinese characters. For lighter, faster models with fewer parameters, noticeable accuracy degradation begins after only a few hundred characters. This instability makes one-shot “translate the whole book” attempts unreliable.
Engineering Practice: Building a Stable Intelligent Translation Workflow
Given these inherent limitations, can we still leverage LLMs for book-length translation? The answer is yes—but we must treat the LLM as a powerful engine, not as a finished vehicle. The key is to apply engineering constraints and orchestration.
1. Chunking: Borrowing from Traditional MT
Since long inputs amplify randomness, the most direct solution is to reduce the input size per call. Traditional MT often splits text into sentence-level or even punctuation-level units, which increases the number of API calls but ensures stable mapping. For LLMs, a practical approach is paragraph-level chunking: divide the long text into semantically complete blocks of a few hundred characters, then process them one by one.
Below is a simplified pseudo-code example for chunked scheduling:
def translate_book(book_text, llm_api, chunk_size=500):chunks = split_text_into_chunks(book_text, chunk_size)translated_chunks = []for chunk in chunks:prompt = f"As a professional translator, accurately and faithfully translate the following text into English. Do not omit or add any information:\n{chunk}"# Use a low temperature to reduce randomnessresponse = llm_api.generate(prompt, temperature=0.1, top_p=0.9)translated_chunks.append(response)return "".join(translated_chunks)
2. Prompt Engineering and Terminology Injection
To further suppress the model’s “creative freedom,” strong constraints must be embedded in the prompt. Drawing from CAT (computer-assisted translation) practices, the system can dynamically inject a terminology glossary and translation memory. Before each call, the system identifies key terms in the current chunk and appends their standard translations to the prompt, forcing the model to adhere to consistent terminology.
3. Cloud-Native Architecture for Scale
For an entire book (often hundreds of thousands of characters), a single-machine script is insufficient. A mature cloud-native pipeline can be built on platforms such as Baidu AI Cloud, or equivalent public cloud services, with the following components:
- Object storage: Holds the original document and the final translated output.
- Workflow engine and message queue: Trigger chunked translation tasks asynchronously and concurrently, significantly reducing total translation time.
- Logging and monitoring: Record each API call’s latency, token consumption, and output quality flags (e.g., detecting unusually long outputs that may indicate hallucinated additions), ensuring traceability throughout the process.
Conclusion and Outlook
Large language models have brought unprecedented efficiency gains to the translation industry. Their ability to understand context and produce polished prose far surpasses traditional MT. However, from a professional translation reviewer’s perspective, the randomness inherent in their generative mechanism, combined with omission and addition errors in long-text processing, remains a serious concern.
An ideal long-text translation system is not a single direct LLM call, but a collaborative pipeline that combines engineered chunked scheduling, terminology-constrained prompts, and human professional review. Only by properly mounting the high-performance LLM “engine” onto a chassis that includes chunking, monitoring, and proofreading components can we navigate the complex terrain of long-form translation and produce high-quality, publication-ready output.
