In the rapidly evolving field of machine translation, large language models (LLMs) have emerged as powerful tools that often outperform traditional translation services. At EPIC WP, we’ve chosen to leverage LLMs for our AI Automatic Translation extension plugin for Polylang, believing they offer superior results compared to services like DeepL. This article explores the reasons behind our decision and the advantages LLMs bring to the translation process.
Brief Overview of LLMs and Traditional Translation Services
Large language models are artificial intelligence systems trained on vast amounts of text data across multiple languages and domains. They use deep learning techniques, particularly transformer architectures, to understand and generate human-like text. On the other hand, traditional translation services like DeepL typically use more specialized neural machine translation (NMT) models focused specifically on the task of translation.
Key Advantages of LLMs in Translation
- Contextual Understanding: LLMs have a deeper understanding of context and nuance in language. They can better grasp idiomatic expressions, cultural references, and subtle meanings that may be lost in literal translations.
- Multilingual Capabilities: Many LLMs are trained on data from numerous languages simultaneously, allowing them to perform well across a wide range of language pairs without requiring separate models for each pair.
- Domain Adaptability: LLMs can adapt to various domains and styles of text more easily than specialized translation models, making them versatile for different types of content.
- Handling Ambiguity: With their broader language understanding, LLMs are often better at resolving ambiguities in the source text, leading to more accurate translations.
- Consistency in Long-form Content: LLMs can maintain consistency in terminology and style across longer pieces of text, which is crucial for documents like research papers or literary works.
- Creativity in Translation: When dealing with creative or literary texts, LLMs can often provide more natural and flowing translations that capture the essence of the original text.
The Power of Conversational Prompting and System Prompts
One of the most compelling reasons we believe in LLMs over traditional translation services like DeepL is the ability to use conversational prompting and system prompts. This feature is a game-changer in the field of translation, especially for websites with industry-specific content.
Tailoring Translations to Specific Industries
With LLMs, we can effectively “program” the translator to become an expert in the field of our customers’ websites. This is achieved through carefully crafted system prompts and conversational context. Here’s why this matters:
- Industry-Specific Terminology: We can instruct the LLM to use vocabulary and jargon specific to a particular industry, ensuring that translations are not just linguistically correct, but also professionally accurate.
- Contextual Nuances: By providing context about the industry or field in the system prompt, the LLM can better understand and convey subtle nuances that might be lost in a general translation.
- Tone and Style Adaptation: We can guide the LLM to adopt the appropriate tone and style for a given industry, whether it’s formal for legal content, technical for engineering websites, or casual for lifestyle blogs.
- Consistent Brand Voice: For business websites, we can instruct the LLM to maintain a consistent brand voice across all translated content, preserving the company’s unique communication style.
- Handling Specialized Content: Whether it’s medical terminology, technical specifications, or creative marketing copy, the LLM can be prompted to handle these specialized types of content appropriately.
Flexibility and Customization
This level of customization is simply not possible with traditional translation services like DeepL. With our AI Automatic Translation extension for Polylang, website owners can benefit from translations that are not just linguistically accurate, but also:
- Contextually appropriate for their specific industry
- Aligned with their brand voice and communication style
- Capable of handling specialized or technical content
- Adaptable to different sections of a website (e.g., formal for legal pages, engaging for blog posts)
By leveraging the power of conversational prompting and system prompts, we’re able to provide a translation solution that goes beyond mere word-for-word translation. Instead, it offers a sophisticated, context-aware translation service that can truly capture the intended meaning and tone of the original content, regardless of the industry or field.
Comparative Examples: DeepL vs. OpenAI-based LLM
To illustrate the advantages of LLMs in translation, let’s examine three examples where an OpenAI-based LLM (as used in our AI Automatic Translation extension for Polylang) outperforms DeepL due to its superior contextual understanding and handling of nuanced language.
Example 1: Contextual Understanding and Colloquial Language
This example comes from a Dutch website selling festival products. The product description uses colloquial language and cultural references that require a nuanced understanding to translate effectively.
Original (Dutch): “De doorgewinterde festival bezoeker herkent het wel. Lekker zeuren bij de bar om een dopje voor je flesje te scoren. Ook een heel arsenaal aan dopjes smokkelen is met de PartyDop verleden tijd! Deze blauwe universele dop past op alle waterflesjes die op festivals worden verkocht.”
DeepL Translation: “The seasoned festival visitor will recognise it. Nagging at the bar to score a cap for your bottle. Smuggling a whole arsenal of caps is also a thing of the past with the PartyDop! This blue universal cap fits all water bottles sold at festivals.”
OpenAI LLM Translation: “The seasoned festival-goer knows this well: the hassle of begging for a cap for your bottle at the bar. Smuggling in a whole arsenal of bottle caps is a thing of the past with the PartyCap! This blue universal cap fits all water bottles sold at festivals.”
Analysis: While both translations are generally accurate, the OpenAI LLM translation shows a better grasp of context and colloquial language:
- “Festival-goer” vs. “festival visitor”: The LLM chooses a more natural term in English.
- “Knows this well” captures the implied familiarity better than “will recognise it.”
- “The hassle of begging” conveys the frustration implied in “Lekker zeuren” more effectively than “Nagging.”
This example demonstrates how the LLM better captures the tone and implied meanings in the original text, producing a translation that feels more natural and engaging to the target audience.
Example 2: Literary Translation and Cultural Nuances
This example is a paragraph from a famous Chinese story, which requires not just linguistic accuracy but also an understanding of cultural context and literary style.
Original (Chinese): 我从十二岁起,便在镇口的咸亨酒店里当伙计,掌柜说,样子太傻,怕侍候不了长衫主顾,就在外面做点事罢。外面的短衫主顾,虽然容易说话,但唠唠叨叨缠夹不清的也很不少。他们往往要亲眼看着黄酒从坛子里舀出,看还如何舀法,然后各种指摘:酒色太深,是旧酒;酒色太浅,是水酒;喝了一口,烧喉咙,哪里是好酒?……我早就知道这种顾客的话不足深信,但谁叫他们是顾客呢?顾客自然可以随意饶舌。只有一种顾客,叫作孔乙己的,总是匿在柜台的角落里,才是值得只配外面的短衫主顾的。
DeepL Translation (English): “Since I was twelve years old, I have been working as a waiter in the Xian Heng Hotel at the entrance of the town. The shopkeeper said that I was too stupid to serve the long-shirted customers, so I had to do some work outside. The short-shirted customers outside were easy to talk to, but there were also many nagging and pestering customers. They often have to watch the yellow wine from the altar scooped out, see how to scoop method, and then all kinds of accusations: wine colour is too dark, is the old wine; wine colour is too light, is the water wine; drink a mouthful, burning throat, where is the good wine? …… I have long known that this kind of customer’s words are not convinced, but who asked them to be customers? Customers are naturally free to speak their minds. There is only one kind of customer, the one called Kong Yi Ji, who always stays in the corner of the counter, and is worthy of the short-shirted patrons who are only worthy of the outside.”
OpenAI LLM Translation (English): “Since I was twelve, I have worked as a servant at the Xianheng Tavern by the town’s entrance. The shopkeeper said I looked too foolish and might not be able to serve the long-robed customers properly, so he had me work outside instead. Although the short-robed customers outside were easier to talk to, there were still quite a few who were incessantly picky and unclear in their demands. They often insisted on watching the yellow wine being ladled from the jar, scrutinizing how it was done, and then complaining in various ways: the wine is too dark, it’s old wine; the wine is too light, it’s watered down; after a sip, it burns the throat—how can this be good wine? … I knew long ago that such customers’ words were not to be fully trusted, but since they were customers, they were naturally allowed to speak freely. There was only one type of customer, named Kong Yiji, who always hid in the corner of the counter, and was truly only worthy of being with the short-robed customers outside.”
Analysis: The LLM translation demonstrates a superior understanding of the cultural context and literary style:
- “Xianheng Tavern” vs. “Xian Heng Hotel”: The LLM correctly identifies this as a tavern, not a modern hotel, preserving the historical context.
- “Long-robed customers” vs. “long-shirted customers”: The LLM’s choice better conveys the social status implied by the clothing.
- “Ladled from the jar” vs. “scooped out from the altar”: The LLM accurately describes the action without the confusion introduced by mistranslating “坛子” (jar) as “altar.”
- “Watered down” vs. “water wine”: The LLM uses a more natural English expression to convey the meaning.
- Overall, the LLM’s translation has a more cohesive narrative flow, capturing the literary style of the original text better than the DeepL version.
This example showcases how the LLM can handle complex literary texts, preserving not just the literal meaning but also the tone, cultural nuances, and narrative style of the original work.
Example 3: Technical Jargon and Idiomatic Expressions
This example features a product description for a fictional software tool, combining technical terminology with idiomatic expressions and creative language.
Original (English): “TechWizPro is not your run-of-the-mill coding assistant. It’s a game-changer that kills two birds with one stone – boosting productivity while squashing bugs like nobody’s business. Our AI-powered syntax predictor is so smart, it’ll make you feel like it’s reading your mind! Say goodbye to hair-pulling debugging sessions and hello to silky-smooth code deployments. With its quantum-inspired algorithms, TechWizPro doesn’t just think outside the box – it shatters the box entirely. Whether you’re a coding newbie or a seasoned pro, this tool will be your secret weapon in the digital arms race. Don’t let your projects become a bull in a china shop – let TechWizPro be your coding rodeo clown, keeping those wild bugs at bay!”
DeepL Translation (Spanish): “TechWizPro no es el típico asistente de programación. Es un cambio de juego que mata dos pájaros de un tiro – aumentar la productividad mientras aplasta errores como nadie. Nuestro predictor de sintaxis basado en IA es tan inteligente que te hará sentir como si leyera tu mente. Despídete de las sesiones de depuración que te tiran de los pelos y da la bienvenida a despliegues de código suaves como la seda. Con sus algoritmos de inspiración cuántica, TechWizPro no sólo piensa fuera de la caja, sino que la rompe por completo. Tanto si eres un novato en codificación como un profesional experimentado, esta herramienta será tu arma secreta en la carrera armamentística digital. No deje que sus proyectos se conviertan en un toro en una cacharrería: ¡deje que TechWizPro sea su payaso de rodeo de codificación, manteniendo a raya a esos bichos salvajes!”
OpenAI LLM Translation (Spanish): “TechWizPro no es tu asistente de codificación común y corriente. Es un cambio de juego que mata dos pájaros de un tiro: aumenta la productividad mientras elimina errores como nadie. Nuestro predictor de sintaxis impulsado por IA es tan inteligente que te hará sentir como si leyera tu mente. ¡Di adiós a las sesiones de depuración frustrantes y hola a implementaciones de código sin problemas! Con sus algoritmos inspirados en la computación cuántica, TechWizPro no solo piensa fuera de la caja, ¡la destruye por completo! Ya seas un principiante en programación o un profesional experimentado, esta herramienta será tu arma secreta en la carrera digital. No dejes que tus proyectos se conviertan en un toro en una tienda de porcelana: deja que TechWizPro sea tu payaso de rodeo de codificación, manteniendo a raya esos errores salvajes.”
Analysis: Both translations are generally accurate, but the LLM translation shows some subtle improvements in handling idiomatic expressions and maintaining the overall tone:
- “Run-of-the-mill”: The LLM’s “común y corriente” captures the idiom better than DeepL’s more literal “típico.”
- “Squashing bugs”: The LLM’s “elimina errores” is more natural than DeepL’s literal “aplasta errores.”
- “Hair-pulling debugging sessions”: The LLM conveys the frustration with “sesiones de depuración frustrantes,” while DeepL’s “sesiones de depuración que te tiran de los pelos” is more literal.
- “Silky-smooth code deployments”: The LLM’s “implementaciones de código sin problemas” conveys the meaning more naturally than DeepL’s literal “despliegues de código suaves como la seda.”
- “Quantum-inspired algorithms”: The LLM’s “algoritmos inspirados en la computación cuántica” is more precise than DeepL’s “algoritmos de inspiración cuántica.”
- Consistency in informal tone: The LLM maintains a consistent informal tone (using “tu” form), while DeepL switches between formal and informal (“tu” and “usted”).
- “Bull in a china shop”: Both translations adapt this idiom well, but the LLM’s “tienda de porcelana” is more commonly used than DeepL’s “cacharrería.”
This example demonstrates how the LLM translation provides a more nuanced handling of idiomatic expressions and maintains a more consistent tone, while also showing a slight edge in translating technical terminology. The differences are subtle, but they add up to a more natural-sounding and engaging translation that better captures the spirit of the original text.
Challenges and Considerations
While LLMs offer significant advantages, there are some challenges to consider:
- Computational Resources: LLMs require significant computational power, which can make them less practical for real-time translation tasks compared to more lightweight models.
- Token Limits: LLMs often have a maximum number of tokens they can process at once, which can be a limitation when translating very long documents.
- Speed: Translations using LLMs typically take longer compared to specialized translation services. However, we believe this trade-off is worthwhile for the improved quality and contextual accuracy of the translations.
Conclusion
While traditional translation services like DeepL have made significant strides in machine translation, we believe that large language models offer a superior approach due to their contextual understanding, multilingual capabilities, and adaptability. Despite challenges such as computational requirements and processing speed, the quality of translations produced by LLMs often justifies these trade-offs.
The ability to use conversational prompting and system prompts sets LLMs apart in the field of translation. By allowing us to tailor the translation process to specific industries and contexts, LLMs offer a level of customization and accuracy that traditional services simply cannot match.
Our comparative examples demonstrate how LLMs excel in handling colloquial language, preserving cultural nuances in literary texts, and navigating the complexities of technical jargon mixed with idiomatic expressions. These capabilities result in translations that are not just linguistically accurate, but also culturally appropriate and contextually rich.
By leveraging LLMs in our AI Automatic Translation extension for Polylang, aim to provide WordPress users with translations that not only convey the literal meaning of the text but also capture its nuances, style, and cultural context. As LLM technology continues to advance rapidly, we’re excited about the future possibilities and remain committed to harnessing these advancements to deliver the best possible translation solutions for Polylang users.
In an increasingly interconnected world, where effective communication across language barriers is more crucial than ever, we believe that LLM-powered translation tools will play a pivotal role in fostering understanding and collaboration on a global scale. By choosing LLMs over traditional translation services, we’re not just keeping pace with technological advancements – we’re actively shaping the future of multilingual content on the web.