As an expert in prompt engineering, your task is to optimize the following prompt for…
- 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---
Create a simple profit calculator with Svelte. There should be one input for the amount and another input where I can enter the profit rate as a percentage. As soon as I make changes in the inputs, it should automatically show how much profit I would make at that rate. For example, if it's 100 and the profit is 15%, it would become 115. ---prompt-end---
- Assistant
Refactored Prompt
Role Assignment: Assume the role of a Svelte development expert tasked with building a profit calculator.
Prompt:
"As a Svelte development expert, your task is to create a simple profit calculator with the following functionality: