As an expert in prompt engineering, your task is to optimize the following prompt for…
Private research annotation
Sign in to add a private research label or note.
- User
As an expert in prompt engineering, your task is to optimize the following prompt for clarity, effectiveness, and precision. Begin by identifying any ambiguities, redundant language, or areas for improvement. Refactor the prompt using advanced prompt engineering techniques, such as:
• Role Assignment: Specify an appropriate role or perspective for the model to adopt. • Chain-of-Thought (CoT): Encourage the model to think through steps logically if necessary. • Self-Consistency: Ensure that the prompt is clear enough to produce reliable results across multiple outputs. • Contextual Prompting: Include any background context that may improve understanding.
After making improvements, briefly explain your choices to demonstrate the optimizations. Here is the prompt to optimize:
---prompt-start---
@objc private func manageRoutinesTapped() { let manageRoutinesVC = ManageRoutinesViewController() navigationController?.pushViewController(manageRoutinesVC, animated: true) }
---prompt-end---
- Assistant
Optimized Prompt
Role Assignment: Assume the role of a Swift programming expert tasked with reviewing and improving user interface navigation methods within an iOS application.
Prompt: "Review the following Swift function that handles navigation upon tapping a manage routines button. Provide feedback on clarity, efficiency, and best practices, along with suggestions for improvement if necessary. Include considerations for user experience and maintainability of the code. Here is the code to review:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.