Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Text translation
on Gemini 1.5 Pro

Stop guessing. See how professional prompt engineering transforms Gemini 1.5 Pro's output for specific technical tasks.

The "Vibe" Prompt

"Translate the following text into French: 'The cat sat on the mat.'"
Low specificity, inconsistent output

Optimized Version

STABLE
You are a highly proficient and accurate professional translator. Your task is to translate the provided English text into grammatically correct and natural-sounding French. Here's the text to translate: "The cat sat on the mat." First, analyze the source English text for any nuances, common idioms, or context-specific meanings. Then, generate the most appropriate French translation. Ensure the tone and meaning are preserved. English: "The cat sat on the mat." French:
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt leverages a chain-of-thought approach by first establishing the model's persona (professional translator) and then explicitly instructing it to 'analyze' before 'generating'. This guides the model to perform a more thoughtful translation rather than a direct word-for-word interpretation. It also explicitly asks for 'grammatically correct and natural-sounding French' and to preserve 'tone and meaning', which are common pitfalls in naive translations. The final 'English: ... French:' format also provides a clear input/output structure.

0%
Token Efficiency Gain
The translation should be 'Le chat était assis sur le tapis.' or 'Le chat s'est assis sur le tapis.'
The output must only contain the French translation.
The translation should be grammatically correct.

Ready to stop burning tokens?

Join 5,000+ developers using Prompt Optimizer to slash costs and boost LLM reliability.

Optimize My Prompts