Mastering Code refactoring
on Command R+
Stop guessing. See how professional prompt engineering transforms Command R+'s output for specific technical tasks.
The "Vibe" Prompt
Optimized Version
Engineering Rationale
The optimized prompt leverages chain-of-thought by breaking down the complex task of 'code refactoring' into smaller, manageable, and sequential steps. It explicitly instructs the model on what to analyze, what to propose, how to implement, and how to summarize. This structured approach guides the model's reasoning process, ensuring it covers all essential aspects of refactoring. By providing concrete examples of refactoring strategies and expected improvements, it primes the model for high-quality output. The use of clear headings and bullet points makes the instructions unambiguous. It also defines the 'persona' of an 'expert software engineer', which often elicits higher quality and more detailed responses from large language models.
Ready to stop burning tokens?
Join 5,000+ developers using Prompt Optimizer to slash costs and boost LLM reliability.
Optimize My Prompts