[Prompts] [Methods]
Prompting 101
What are Prompts?
A prompt is a text input given to an AI system that guides its response or behavior. Think of it like giving instructions to a highly capable assistant - the clearer and more specific your instructions, the better the results.
How do Prompts work?
Prompts work by providing context, instructions, and sometimes examples that help the AI understand exactly what you want. The AI analyzes the prompt and generates a response based on its training while following the guidelines you've provided.
What makes a good prompt?
A good prompt is clear and specific about the result. Providing necessary context like examples within the prompt, breaking large prompts into sections or steps that are common. Setting clear parameters for the format and style is also helpful.
What should I avoid in prompts?
Vague or ambiguous instructions or assuming the AI knows the context you haven't provided. Overcomplicating simple requests. Providing contradictory instructions. Being too brief when detailed instructions are needed
How long should a prompt be?
A prompt should be as long as necessary to convey your requirements clearly, but no longer. This could be a single sentence for simple requests or several paragraphs for complex tasks that need detailed instructions and examples.
Can prompts be reused?
Yes, you can save and reuse effective prompts as templates, especially for recurring tasks. However, you might need to modify them slightly based on specific context or requirements.
How can I improve my prompts?
Be specific about your requirements. Including relevant context. Specifying the desired format or structure. Use examples to demonstrate what you want. Breaking complex requests into smaller parts. Iterating and refining based on the responses you get.
Prompt Types
-
Simple fact-finding
"What is the capital of France?"Complex queries
What were the main causes of World War II?"Analytical questions
"How does photosynthesis work in desert plants?"Comparative questions
"What are the key differences between Python and JavaScript?" -
Writing tasks
"Write a 500-word blog post about sustainable gardening practices"Analysis tasks
"Analyse this quarterly sales data and identify key trends"Creative tasks
"Create a character description for a wise elderly wizard"Problem-solving
"Debug this Python code and explain any issues you find" -
Teaching
"As a physics professor, explain quantum entanglement to a high school student"Professional
"As an experienced marketing strategist, review this campaign proposal"Creative
"As a Victorian-era detective, describe how you would solve this mystery"Technical
"As a senior software architect, suggest the best database structure for this application" -
Translation
Input: "The cat is black" → Output: "Le chat est noir" Input: "The dog is brown" → Output: "Le chien est marron" Input: "The bird is blue" → Now you try...Writing
Input: "Coffee" → Output: "The rich aroma of freshly ground beans wafted through the air" Input: "Rain" → Output: "Gentle droplets tapped rhythmically against the windowpane" Input: "Snow" → Now you try... -
Chain-of-Thought Prompts:
Math problem solving: "Let's solve this step by step: Problem: If a store offers a 20% discount on a $80 item with a $5 coupon, what's the final price?
Calculate 20% discount
Subtract discount from original price
Apply coupon
Show final price"
Logic puzzles: "Let's solve this murder mystery step by step:
List all suspects and their alibis
Analyze physical evidence
Identify contradictions
Draw conclusions"
-
Behavioural setting
"You are a helpful but concise technical writer. Use simple language and provide examples."Style setting
"You are a poetry critic from the Romantic era. Analyze poems in the style of that period."Expertise setting
"You are an experienced data scientist specialising in machine learning. Help debug ML models." -
Constraint Prompts:
Length constraints: "Explain quantum computing in exactly three sentences"
Style constraints: "Write a story using only words with one syllable"
Format constraints: "Create a product description in this format: Features: | Benefits: | Price: | Target Market:"
-
Role + Chain-of-thought
"As a financial advisor, analyze this investment portfolio step by step"Few-shot + Constraints
Example 1: "Coffee → 5-word description: Rich warm hug in cup"
Example 2: "Rain → 5-word description: Nature's rhythm soothes earth's soul"
Now do "Sunset" →