KEMBAR78
Prompt Engineering Guide | PDF | Artificial Intelligence | Intelligence (AI) & Semantics
0% found this document useful (0 votes)
11 views19 pages

Prompt Engineering Guide

Uploaded by

rr580022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views19 pages

Prompt Engineering Guide

Uploaded by

rr580022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Prompt Engineering

Ready Reckoner
Techniques, Examples & Visuals to Unlock AI's Power
Transform your AI conversations from good to exceptional

Author: Manish Shrivastava


Why Prompts Matter

 The Power of Words in AI


• Your translator to AI language
• The steering wheel for AI responses
• The key to unlocking AI's full potential
• Vague prompt = Vague response
• Clear prompt = Precise, useful output

Example:
The Difference: Weak: "Write about marketing" Strong: "Act as a digital marketing
expert. Write a 5-step social media strategy for a tech startup targeting
millennials"

Author: Manish Shrivastava


Role-Based Prompting
 Give Your AI a Job Title
 Magic Phrase → Magic Phrase: "Act as a [ROLE]" or "You
are a [PROFESSION]"
 Why It Works::
 → Activates relevant knowledge domains
 → Sets appropriate tone and expertise level
 → Focuses responses on role-specific insights
 → Business: consultant, CEO, marketing manager
 → Education: teacher, tutor, professor
 → Health: fitness coach, nutritionist
 → Tech: developer, data analyst, cybersecurity
expert
"Act as a personal finance advisor. I have $10,000 to invest and want moderate
risk.
Provide 3 specific investment options with pros and cons for each."

Author: Manish Shrivastava


Step-by-Step (Chain of
Thought) Prompting
 Show Your AI How to Think
 Magic Phrase → Magic Phrase: "Let's think step-by-step" or "Walk me
through this process"
 Why It Works::
 → Reduces calculation errors
 → Makes reasoning transparent
 → Helps you verify the logic
 → Better handles complex problems
 Perfect For::
 → Mathematical calculations
 → Data analysis
 → Problem-solving
 → Multi-step processes

"I need to calculate ROI for a marketing campaign that cost $5,000 and generated
$15,000 in sales. Walk me through the calculation step-by-step and explain what
this ROI means for future decisions."
Author: Manish Shrivastava
Context + Goal Clarity
Prompting
 Set the Stage for Success
 Formula → Context + Specific Goal + Format
Requirements
 Essential Elements::
 → Who: Your audience or situation
 → What: Specific task or outcome needed
 → How: Format, length, style requirements
 → When: Deadlines or timing constraints

"Context: I'm launching a SaaS product for small businesses next month.
Goal: Create a launch announcement email.
Requirements: Keep it under 150 words, include a clear call-to-action,
and use an enthusiastic but professional tone."

Author: Manish Shrivastava


Output Formatting Prompts

 Get Exactly What You Need


 Format Options::
 → Lists: Numbered, bulleted, prioritized
 → Tables: Comparison charts, data grids
 → Documents: Reports, emails, summaries
 → Conversations: Dialogues, Q&A format
 → Creative: Stories, scripts, social posts
"Create a comparison of iPhone vs. Android phones. Present as:
- Table format with 5 key features as rows
- Pros/cons for each in bullet points
- Final recommendation in one sentence
- Keep technical jargon to minimum"
Author: Manish Shrivastava
Few-Shot Prompting (Examples-Based)
 Show, Don't Just Tell
 Formula → Example 1 → Example 2 → Your actual
request
 When to Use::
 → Specific formatting requirements
 → Consistent style/tone needed
 → Complex transformation tasks
 → Brand voice matching
"Convert these product descriptions to social media posts:

Input: 'Professional wireless headphones with noise cancellation'


Output: ' Block out distractions and dive deep into your work! New wireless
headphones with crystal-clear sound. #ProductivityBoost'

Input: 'Organic coffee beans from Colombia'


Output: ' Start your morning right with authentic Colombian coffee beans.
100% organic, 100% delicious! #MorningMotivation'
Author: Manish Shrivastava

Now convert: 'Ergonomic office chair with lumbar support'"


Iterative Prompting (Refining)
 Perfect Through Conversation
 Formula → Draft → Feedback → Refine → Perfect
 Refinement Techniques::
 → "Make it more specific to..."
 → "Adjust the length to..."
 → "Change the tone to be more..."
 → "Add details about..."
 → "Remove the section on..."

First prompt: "Write a LinkedIn post about AI in business"

After reviewing response: "Good start! Now make it more specific to small
businesses,
add 2 practical examples, and end with a question to encourage comments.
Keep the professional but approachable tone."

Author: ManishNow
Follow-up: "Perfect! Shrivastava
create 3 alternative versions with different hooks."
Domain-Specific Prompts -
Productivity
 Supercharge Your Daily Tasks

 Step 1 → Email Management: "Transform this meeting summary into a professional follow-up email:

 - Thank participants for their time

 - Summarize 3 key decisions made

 - List action items with owners

 - Set expectation for next steps

 Keep it concise and actionable."

 Step 2 → Meeting Prep: "I'm meeting with a potential client in the fintech industry tomorrow.

 Create 8 thoughtful questions that show I understand their challenges

 and can position our services effectively. Mix strategic and tactical questions."

 Step 3 → Task Planning: "Break down 'Launch product marketing campaign' into a detailed project plan:

 - 15-20 specific tasks

 - Estimated time for each

 - Logical sequencing

 - Key milestones

 - Present as a table with columns: Task, Duration, Dependencies, Owner"

Author: Manish Shrivastava


Example: 1

"Transform this meeting summary into a professional follow-up email:


- Thank participants for their time
- Summarize 3 key decisions made
- List action items with owners
- Set expectation for next steps
Keep it concise and actionable."

Example: 2

"I'm meeting with a potential client in the fintech industry tomorrow.


Create 8 thoughtful questions that show I understand their challenges
and can position our services effectively. Mix strategic and tactical questions."

Author: Manish Shrivastava


Domain-Specific Prompts -
Investing & Finance
 Smart Money Decisions
 Step 1 → Stock Comparison: "Act as a financial analyst. Compare Tesla (TSLA) vs Ford (F) stocks:
 - Create table with: P/E ratio, market cap, recent performance
 - List 3 key risks for each
 - Provide neutral analysis of growth prospects
 - No investment advice, just factual comparison"
 Step 2 → Portfolio Review: "I'm 32 years old with moderate risk tolerance. Review this portfolio
allocation:
 60% stocks, 25% bonds, 10% REITs, 5% crypto
 - Assess if appropriate for my age/risk level
 - Suggest adjustments with reasoning
 - Include emergency fund guidance"
 Step 3 → Market Analysis: "Explain the recent tech stock volatility in simple terms:
 - What's driving the changes
 - How it affects different types of investors
 - 3 practical takeaways for long-term investors
 - Use analogies to make concepts clear"

Author: Manish Shrivastava


Example: 1

"Act as a financial analyst. Compare Tesla (TSLA) vs Ford (F) stocks:


- Create table with: P/E ratio, market cap, recent performance
- List 3 key risks for each
- Provide neutral analysis of growth prospects
- No investment advice, just factual comparison"

Example: 2

"I'm 32 years old with moderate risk tolerance. Review this portfolio allocation:
60% stocks, 25% bonds, 10% REITs, 5% crypto
- Assess if appropriate for my age/risk level
- Suggest adjustments with reasoning
- Include emergency fund guidance"

Author: Manish Shrivastava


Domain-Specific Prompts -
Learning/Education
 Accelerate Your Knowledge

 Step 1 → Concept Explanation: "Explain blockchain technology as if I'm a smart 12-year-old:

 - Use simple analogies and examples

 - Cover what it is, how it works, why it matters

 - Include 2-3 real-world applications

 - Avoid technical jargon

 - Make it engaging and memorable"

 Step 2 → Study Planning: "I need to learn Python programming in 3 months for a career change.

 Create a week-by-week study plan:

 - Progressive skill building

 - Practical projects to reinforce learning

 - Time commitment per week

 - Milestone checkpoints

 - Resource recommendations"

 Step 3 → Quiz Generation: "Create 10 multiple-choice questions on digital marketing fundamentals:

 - Mix difficulty levels (6 medium, 4 challenging)

 - Include practical scenario-based questions

 - Provide correct answers with brief explanations

 - Focus on actionable knowledge, not just theory"

Author: Manish Shrivastava


Example: 1

"Explain blockchain technology as if I'm a smart 12-year-old:


- Use simple analogies and examples
- Cover what it is, how it works, why it matters
- Include 2-3 real-world applications
- Avoid technical jargon
- Make it engaging and memorable"

Example: 2

"I need to learn Python programming in 3 months for a career change.


Create a week-by-week study plan:
- Progressive skill building
- Practical projects to reinforce learning
- Time commitment per week
- Milestone checkpoints
- Resource recommendations"

Author: Manish Shrivastava


Domain-Specific Prompts -
Coding
 Developer's AI Assistant

 Step 1 → Code Generation: "Write a Python function that:

 - Takes a list of dictionaries (employee records)

 - Filters employees by department and experience level

 - Returns sorted list by salary (highest first)

 - Include error handling and clear comments

 - Make it readable and efficient"

 Step 2 → Debugging Help: "I'm getting a 'KeyError' in this Python code: [paste code]

 - Identify the likely cause of the error

 - Explain why it's happening in simple terms

 - Provide 2 different solutions

 - Show the corrected code with comments explaining the fix"

 Step 3 → Code Review: "Review this JavaScript function for best practices:

 [paste code]

 - Check for performance issues

 - Identify security concerns

 - Suggest improvements for readability

 - Point out any potential bugs

 - Provide refactored version if needed"

Author: Manish Shrivastava


Example: 1

"Write a Python function that:


- Takes a list of dictionaries (employee records)
- Filters employees by department and experience level
- Returns sorted list by salary (highest first)
- Include error handling and clear comments
- Make it readable and efficient"

Example: 2

"I'm getting a 'KeyError' in this Python code: [paste code]


- Identify the likely cause of the error
- Explain why it's happening in simple terms
- Provide 2 different solutions
- Show the corrected code with comments explaining the fix"

Author: Manish Shrivastava


Prompt Refinement
Framework
 Your 4-Step Improvement Process
 Formula → Basic Need → Add Context → Get Output → Evaluate →
Refine Request → Perfect Output
 Step 1 → DRAFT: Start with a basic prompt stating your need
Example: "Help me with social media marketing"
 Step 2 → SPECIFY: Add role, context, and format requirements
Example: "Act as a social media manager. Create a content
calendar for a fitness brand targeting young professionals.
Include post types and timing."
 Step 3 → REFINE: Based on initial output, add specific adjustments
Example: "Great! Now focus on Instagram and LinkedIn only. Add
hashtag suggestions and include video content ideas for 30% of
posts."
 Step 4 → PERFECT: Fine-tune tone, style, and missing elements
Example: "Perfect structure! Adjust tone to be more motivational,
add engagement tactics for each post type, and include
monthly theme suggestions."

Author: Manish Shrivastava


Key Takeaways
 Master These 4 Golden Rules
 Formula → Role + Context + Specific Goal + Format + Examples (if
needed) = AI Excellence
 Rule: Be Specific, Not Generic
 → Replace "Help me write" with "Act as [role]. Create a
[format] for [audience] that [specific goal]."
 Rule: Iterate and Improve
 → Don't expect perfection on the first try. Refine through
conversation to get exactly what you need.
 Rule: Show Examples
 → When you need consistent formatting or style, provide 2-3
examples to train the AI on your preferences.
 Rule: Use Roles Strategically
 → Assign relevant expertise roles to get specialized
knowledge and appropriate tone for your context.

Author: Manish Shrivastava


Your Next Steps & Quick
Reference
 Transform Your AI Conversations Today
 Formula → Your Prompt Engineering Journey Starts
Now. Make every AI conversation count.
 • Pick one technique from this guide
 • Apply it to a task you're working on today
 • Compare results with your usual prompting style
 • Notice the difference in quality and usefulness
Technique Use When Key Phrase
Role-Based Need expertise "Act as a..."
Chain of Thought Complex problems "Step-by-step..."
Context + Goal Specific outcomes Context + Goal + Format
Output Formatting Structured results "Present as..."
Few-Shot Author: Manish Shrivastava Consistent style Show 2-3 examples
Iterative Perfect results "Now refine..."

You might also like