Adapted from Prompting Guide: General Tips for Designing Prompts — https://www.promptingguide.ai/introduction/tips
Designing Effective Prompts
Prompt engineering is an iterative process. It requires experimentation and refinement to get optimal results. Here are the core principles to keep in mind when designing your prompts.
1. Start Simple
Begin with a basic prompt and gradually add more elements and context as you aim for better results. If you have a complex task, try to break it down into simpler subtasks and build up step-by-step.
2. The Instruction
Use clear commands to tell the model exactly what you want it to do (e.g., "Write", "Classify", "Summarize", "Translate").
Pro Tip: Place instructions at the beginning of the prompt and use clear separators like ### to distinguish between instructions and context.Example:
### Instruction ###
Translate the text below to Spanish:
Text: "hello!"3. Specificity
Be highly descriptive and detailed about the desired outcome or style. This is especially important when you need a specific format (like JSON or a comma-separated list).
Avoid Trivial Details: While specificity is good, unnecessary details can clutter the context window and confuse the model. Focus on relevance.
Example of specific extraction:
Extract the name of places in the following text.
Desired format: Place: <comma_separated_list_of_places>
Input: [Insert Text Here]4. Avoid Impreciseness
Direct communication is more effective. Instead of saying "keep it short", specify exactly how long or for what audience the output should be.
| ❌ Imprecise | ✅ Precise |
|---|---|
| "Explain prompt engineering shortly." | "Use 2-3 sentences to explain the concept of prompt engineering to a high school student." |
5. Focus on "What to Do"
Instead of telling the model what not to do, focus on what it should do. This leads to more predictable and reliable responses.
Iteration is Key: Don't expect the perfect response on your first try. Test different keywords, contexts, and instructions to find what works best for your specific case.