I have been using the Gemini series models for novel translation tasks. In recent tests, I divided the novel into segments of about 250 tokens for batch translation, but the Gemini 2.0-2.5 flash models all encountered a rather serious problem of original text residue.
Specifically, in the translation, some words remain in their original form and are not translated, and some are annotated in parentheses later.
I have tried to prohibit this output in the prompts, but the probability of occurrence is still very high. For a novel of 600 segments, it may occur 15-30 times, making the entire result unusable.
I’ve observed that some translations use “original text residue + (comment)” to translate concepts that are difficult to translate from the original text; and some should be bugs, for example, the following test cases often have original text residue problems(gemini-2.5-flash):
[SYSTEM_INSTRUCTION]
Role
You are a professional translator, fluent in Chinese and English.
Core Task
Translate the provided Chinese text into natural, fluent English.
[USER]
The output I got is:
It’s my mother’s遗物 (relic/keepsake).
It seems to occur more frequently in cases related to 's and possessive pronouns.
Here’s another real prompt for my translation task and some residual output. Note that the prompt includes a reference to the previous text and is quite long overall:
[SYSTEM_INSTRUCTION]
Role
You are a professional translator, fluent in {source_language} and {target_language}, with expertise in literary translation. You understand cultural contexts and linguistic nuances of both languages.
Core Task
Translate the provided {source_language} text into natural, fluent {target_language}. The input will be formatted with tags.
Translation Requirements
- Complete Translation: Every word must be translated. No {source_language} text should remain in the output.
- Target Language Consistency: Ensure your entire translation is in {target_language}. If you notice mixed languages in context, focus only on translating to {target_language}.
- Natural Expression: Use natural, idiomatic {target_language} while preserving the original meaning and tone.
- Format Preservation: Maintain all formatting elements (numbers, markers, placeholders, line breaks) in their exact positions.
- Paragraph Structure: Keep the original paragraph breaks and structure intact.
- Consistency: Use context and glossary (if provided) to maintain consistent terminology.
- Style Fidelity: Preserve the original style, including emotional tone and register.
Output Format
Respond with the translation inside tags, exactly as shown in the example:
Input example:
1.这是中文文本 2.另一段中文Output example:
1.This is Chinese text 2.Another Chinese paragraphImportant: Start your response directly with and end with . Do not add any other text outside these tags.
[CONTENTS]
[USER]
###Previous chunk reference content
<chunk_previous>
Source: “好险好险。”一名跌坐于地的守卫嘶嘶吸着凉气,撑住推车车板站起身来,忽然失声喊道:“喝!这是——!”
Translation: “That was close, that was close.” A guard, who had fallen to the ground, hissed, sucking in a cold breath, and propped himself up by the cart’s side panel. Suddenly, he cried out, “Hah! This is—!”
Source: 车上覆盖的白布已被掀开,原是一具尸体,身量瘦小,面皮枯瘪,穿着宫人服色。
Translation: The white cloth covering the cart had been thrown off, revealing a corpse. It was small and thin, with a shriveled face, dressed in palace servant’s attire.
Source: “这不是那伺候绣师的婆婆?清早儿好好地进了宫,怎么过午就死了?”
Translation: “Isn’t this the old woman who served the embroiderer? She came into the palace perfectly fine this morning, how did she die by noon?”
</chunk_previous>
###This is your next translation task, the original text is as follows
1.推车的小黄门哭丧着脸答道:“谁晓得啊,在长祺亭底下那十来级台阶上居然就摔折了脖子,连声儿都没有,等咱们发觉的时候早就断气儿了。” 2.濯缨将风骏送进马厩,拍开坛口泥封,取了地图放进怀里,便拔足向织造坊方向飞奔。海市喊他,他亦不及答应—— 3.柘榴。The output obtained is:
1.The young eunuch pushing the cart answered with a mournful face, "Who knows? She fell and broke her neck on those ten-odd steps under Changqi Pavilion, without even a sound. By the time we noticed, she had already stopped breathing." 2.Zhuoying led Fengjun into the stable, broke the mud seal on the jar, took out the map and put it in his怀里, then sprinted towards the weaving workshop. Haishi called out to him, but he didn't even have time to answer— 3.Pomegranate.Note that the remaining original text “怀里” (huái lǐ, meaning “in one’s arms” or “bosom”) is not a difficult concept to translate, but it is closely related to “his,” possibly due to the pronoun .
Here’s other examples of residual source text:
INPUT:
[SYSTEM_INSTRUCTION]
Role
You are a professional translator, fluent in {source_language} and {target_language}, with expertise in literary translation. You understand cultural contexts and linguistic nuances of both languages.
Core Task
Translate the provided {source_language} text into natural, fluent {target_language}. The input will be formatted with tags.
Translation Requirements
- Complete Translation: Every word must be translated. No {source_language} text should remain in the output.
- Target Language Consistency: Ensure your entire translation is in {target_language}. If you notice mixed languages in context, focus only on translating to {target_language}.
- Natural Expression: Use natural, idiomatic {target_language} while preserving the original meaning and tone.
- Format Preservation: Maintain all formatting elements (numbers, markers, placeholders, line breaks) in their exact positions.
- Paragraph Structure: Keep the original paragraph breaks and structure intact.
- Consistency: Use context and glossary (if provided) to maintain consistent terminology.
- Style Fidelity: Preserve the original style, including emotional tone and register.
Output Format
Respond with the translation inside tags, exactly as shown in the example:
Input example:
1.这是中文文本 2.另一段中文Output example:
1.This is Chinese text 2.Another Chinese paragraphImportant: Start your response directly with and end with . Do not add any other text outside these tags.
[CONTENTS]
[USER]
###Previous chunk reference content
<chunk_previous>
Source: 海市长呼出一口气,仿佛想要吐尽了胸臆中沉沉的块垒。
Translation: Haishi let out a long breath, as if wanting to expel all the heavy burdens from her chest.
Source: 小院内静寂欲死,乱红飞渡,任性零乱得像是也知道它们从此便无人收管似的。
Translation: The small courtyard was deathly silent, with fallen petals flying about, scattered wantonly as if they knew they would no longer be cared for.
Source: 自正午至日暮。天色层层染染,一笔笔添重靛蓝,著上艳橙,又晕散了绯紫,终于黑透了。
Translation: From noon until dusk. The sky was dyed in layers, stroke by stroke adding deep indigo, then bright orange, then blending into crimson, finally turning completely black.
</chunk_previous>
###This is your next translation task, the original text is as follows
1.门闩终于响动,背靠门板坐着的海市跳起身,转头,门便在她面前敞开了。濯缨一身武官衣装依然整齐,连个褶皱也不见,只有那一对乌中含金的眼睛,蒙了尘灰。海市将怀里抱着的剑递上去,道:“戌时的更子响过了,该去当值了。” 2.濯缨默然接过,拇指轻轻推剑出鞘,只一寸,举到眼前,似乎要从如水剑刃上照见自己的眼睛。 3.星子如满盘银砂,然而没有月——今夜是朔日之夜。OUTPUT:
1.The door latch finally clicked, and Haishi, who had been sitting with her back against the door, sprang up. She turned, and the door opened before her. Zhuo Ying’s military uniform was still neat, without a single wrinkle, only her dark, gold-flecked eyes were clouded with dust. Haishi handed her the sword she was holding, saying, "The戌时 drum has sounded; it's time for your duty." 2.Zhuo Ying silently took the sword, her thumb gently pushing it an inch out of its scabbard. She held it up to her eyes, as if to see her own reflection in the water-like blade. 3.The stars were like a盘 of silver sand, but there was no moon—tonight was the night of the new moon.another case:
INPUT(This one also relates to "her”):
[SYSTEM_INSTRUCTION]
Role
You are a professional translator, fluent in {source_language} and {target_language}, with expertise in literary translation. You understand cultural contexts and linguistic nuances of both languages.
Core Task
Translate the provided {source_language} text into natural, fluent {target_language}. The input will be formatted with tags.
Translation Requirements
- Complete Translation: Every word must be translated. No {source_language} text should remain in the output.
- Target Language Consistency: Ensure your entire translation is in {target_language}. If you notice mixed languages in context, focus only on translating to {target_language}.
- Natural Expression: Use natural, idiomatic {target_language} while preserving the original meaning and tone.
- Format Preservation: Maintain all formatting elements (numbers, markers, placeholders, line breaks) in their exact positions.
- Paragraph Structure: Keep the original paragraph breaks and structure intact.
- Consistency: Use context and glossary (if provided) to maintain consistent terminology.
- Style Fidelity: Preserve the original style, including emotional tone and register.
Output Format
Respond with the translation inside tags, exactly as shown in the example:
Input example:
1.这是中文文本 2.另一段中文Output example:
1.This is Chinese text 2.Another Chinese paragraph#Correct output example (target format): It’s my mother’s relic. or It’s my mother’s keepsake.
#Incorrect output example (avoid this format): It’s my mother’s遗物 (relic/keepsake).
Important: Start your response directly with and end with . Do not add any other text outside these tags.
[CONTENTS]
[USER]
###Previous chunk reference content
<chunk_previous>
Source: 西南角门外有车马声,那是掌管御用冰藏的凌人们自柱天山脉下的冰藏取出冰块,趁夜间凉爽运送进宫来了。海市轻身提纵,沿着宁泰门顶脊飞奔而去,继而一跃而起,在殿顶与殿顶间无声穿梭,很快隐身于未央宫重檐之中,正俯瞰着西南角门往御膳房方向的道路。运冰的骡车由数名羽林押运,凌人们一边随行。到岔路口处,凌人中的一名自顾拐过一边,向西北方向走去,奇的是那数名羽林皆如视而不见,其余凌人亦不动声色直向御膳房去。
Translation: There was the sound of carriages and horses outside the southwest corner gate; that was the ice-keepers, in charge of the imperial ice storage, bringing ice blocks from the ice storage beneath Zhutian Mountain Range, transporting them into the palace while the night was cool. Haishi lightly leaped and sprinted along the ridge of Ningtai Gate, then soared up, silently shuttling between palace roofs, quickly disappearing into the double eaves of Weiyang Palace. She was looking down at the road from the southwest corner gate towards the Imperial Kitchen. The ice-carrying mule carts were escorted by several Feathered Forest Guards, with the ice-keepers accompanying them. At the crossroads, one of the ice-keepers turned off on his own, heading northwest. Strangely, the Feathered Forest Guards all seemed to ignore him, and the other ice-keepers continued straight towards the Imperial Kitchen without a change in expression.
</chunk_previous>
###This is your next translation task, the original text is as follows
1.海市转动点漆般的眸子,看着那名凌人的去向。那条路走下去,只能抵达凤梧宫与愈安宫。凤梧宫自鄢陵帝姬事发后便始终空置,愈安宫则为注辇公主,淑容妃缇兰的居所。 2.愈安宫还亮着灯,风中翻飞的绯紫轻纱窗帷是注辇样式。 3.海市自檐下脱身出来,跃上未央宫顶,一路向愈安宫疾行。OUTPUT:
1.Haishi turned her漆-black eyes, watching the direction that ice-keeper took. That path led only to Fengwu Palace and Yu'an Palace. Fengwu Palace had been empty since the incident with Princess Yanling, while Yu'an Palace was the residence of Princess Zhunian, Consort Shurong Tilan. 2.Yu'an Palace was still lit, and the crimson-purple sheer window curtains fluttering in the wind were in the Zhunian style. 3.Haishi slipped out from under the eaves, leaped onto the roof of Weiyang Palace, and hurried towards Yu'an Palace.INPUT:
[SYSTEM_INSTRUCTION]
Role
You are a professional translator, fluent in {source_language} and {target_language}, with expertise in literary translation. You understand cultural contexts and linguistic nuances of both languages.
Core Task
Translate the provided {source_language} text into natural, fluent {target_language}. The input will be formatted with tags.
Translation Requirements
- Complete Translation: Every word must be translated. No {source_language} text should remain in the output.
- Target Language Consistency: Ensure your entire translation is in {target_language}. If you notice mixed languages in context, focus only on translating to {target_language}.
- Natural Expression: Use natural, idiomatic {target_language} while preserving the original meaning and tone.
- Format Preservation: Maintain all formatting elements (numbers, markers, placeholders, line breaks) in their exact positions.
- Paragraph Structure: Keep the original paragraph breaks and structure intact.
- Consistency: Use context and glossary (if provided) to maintain consistent terminology.
- Style Fidelity: Preserve the original style, including emotional tone and register.
Output Format
Respond with the translation inside tags, exactly as shown in the example:
Input example:
1.这是中文文本 2.另一段中文Output example:
1.This is Chinese text 2.Another Chinese paragraphImportant: Start your response directly with and end with . Do not add any other text outside these tags.
[CONTENTS]
[USER]
###Previous chunk reference content
<chunk_previous>
Source: 如此过了一个多时辰,距岸还有三五里,水浅了,鲛鲨不能再向前。那女子打身后取出一个包袱,替海市缚在身上。包袱皮浅蓝轻碧,说不上究竟是什么颜色,却是绝薄,包袱里累累明珠约有七八捧之数,白昼中依然透出夺人华光。女子牵过海市的手,以手指在海市手心上书写,指尖所触之处白光漫起,写成“琅缳”二字,在海市手心隐隐发亮。原来这女子,名叫琅缳?
Translation: After more than an hour, they were still three to five li from the shore, where the water became too shallow for the shark to proceed. The woman took a bundle from behind her and tied it to Haishi. The bundle’s wrapping was a light blue-green, an indescribable color, yet incredibly thin. Inside were seven or eight handfuls of luminous pearls, still radiating dazzling brilliance even in daylight. The woman took Haishi’s hand and wrote on her palm with her finger. Where her fingertip touched, a white light welled up, forming the characters “琅缳” (Langhuan), which glowed faintly in Haishi’s palm. So, this woman’s name was Langhuan?
</chunk_previous>
###This is your next translation task, the original text is as follows
1.琅缳轻轻一推,将海市推落鲨背,手指海岸,似是要她回家去。一入水,海市发觉手心的“琅缳”二字光芒大盛,潜游片刻,毫不气闷,索性又游了半里路途,竟不需换气。海市露出水面,回首张望。琅缳骑在鲛鲨背上,碧波中衣袂飞扬,无有言语,想来亦不能言语,只是湛青的眼睛静静望着海市。 2.海市握紧胸前横捆的包袱带子,向陆地游去,再也没有回头。