Mastering Code refactoring
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
Optimized Version
Engineering Rationale
The optimized prompt works by providing a highly structured, role-playing instruction to Gemini. It sets a clear persona ('expert software engineer'), defines specific and prioritized goals for refactoring, outlines constraints to prevent unintended alterations, and crucially, includes a 'Thought Process' section. This 'Thought Process' section acts as a chain-of-thought instruction, guiding Gemini through a methodical approach to analyzing, planning, and executing the refactoring, thereby leading to more comprehensive and relevant improvements. The explicit breakdown of refactoring areas ensures all common aspects are considered.
Ready to stop burning tokens?
Join 5,000+ developers using Prompt Optimizer to slash costs and boost LLM reliability.
Optimize My Prompts