Complete Guide to Prompt Engineering: Myths, Types, Mistakes, and Best Practices
1 Introduction
Prompt engineering is the technique of structuring inputs to guide AI models to high-quality, predictable outputs, vastly improving their performance and consistency.
Good prompting can dramatically improve accuracy, creativity, and consistency — especially with modern LLMs like GPT-5, Claude, and Gemini.
This guide consolidates all the essential fundamentals you need: myths, types, strategies, mistakes, workflows, and real-world applications.
2 Myths & Facts
Myth: To write good prompts, you should know about the internals of AI.
Fact: Straightforward, lucid instructions are best
Myth: Prompts of longer length are always better.
Fact: Brief is superior--the AI can be confused with excess words.
Myth: AI can read your mind.
Fact: AI can only be informed of whatever you tell it. So be specific!
Myth: you have known prompt engineering, outputs are perfect.
Fact: AI can be unpredictable. Experiment and tweak.
3 Core Types of Prompt
3.1 Zero-Shot Prompting
Example:
Prompt:What is the Capital of Singapore?
Output:Singapore
3.2 Few-Shot Prompting
Example:
Prompt:Predict Next Number:
Pattern:
- 2,3.. -> 5
- 7,11,..->13
- 78,83..->?
Output:89
3.3 Chain-of-Thought Prompting
Example:
Prompt:Equation: 4x+5=13, Find x with step by step details
Output: x=2 with step by step details.
3.4 Role-Based Prompting
Example:
Prompt: As an experienced Data Analyst, I would like to hear your advice for aspiring new Data Analysts within a line
Output: Focus on becoming a powerful storyteller with data, not just a collector of metrics, by mastering SQL, a statistical programming language (Python/R), and critical thinking to drive actionable business insights.
Source: Gemini (Google)
3.5 Structured Prompts
Example:
Prompt:You are a reputed travel agent. Give only the names of 3 must-visit places in the US with bulleted list
Output: It looks something like this:
- Grand Canyon National Park (Arizona)
- New York City (New York)
- Golden Gate Bridge (San Francisco, California)
Source: Gemini(Google)
4. How AI Actually Reads Your Prompts (Behind the Scenes)
1.Tokenization
Example: “Gen AI is interesting” → ["Gen", "AI", "is", "interest","ing"].
Why it matters:- Models do not read sentences; they read tokens.
- Longer words often split into multiple tokens.
2.Embedding
Two things happen here:
Token Embeddings: meaning representation of the word/subword
Positional Embeddings: give the model a sense of order (1st, 2nd, 3rd token…)
Why it matters:
- This is how text becomes “understandable” to the model.
3.Transformer Layers (Attention + Feedforward)
- Self-Attention: Tokens focus on relevant tokens (e.g., “her” → “she”).
- Feedforward Network: Refines token representations.
- Residuals + Layer Norm: Stabilizes training.
This repeats dozens of times
4.Probability Distribution (Softmax)
Example for “Python is a popular”:
- “language”: 0.91
- “snake”: 0.03
- “tool”: 0.02
This step determines the predicted token.
5.Common Prompting Mistakes (and How to Fix Them)
- Being vague → Be specific: “Explain data analysis to a beginner with simple examples.
- Missing constraints → Add limits: Write a 200-word article with bullets.
- Multiple tasks in one sentence → Split into steps.
- No format requirement → Specify structure; otherwise, defaults to paragraphs.
- Emotional or unclear wording → Use clear, factual instructions.
- Overusing chain-of-thought → Use only when reasoning is needed.
- No iterative refinement → Revise prompts for better output.
6.Prompting Strategies That Work
- Refinement Loop: Draft → Generate → Critique → Improve → Regenerate
- Self-Critique: Ask the model to evaluate and improve its output
- Format-First: Specify output structure upfront
- Retrieval-Style: Extract key facts, then answer
- Multi-Step Prompting: Use sequential prompts for complex tasks
7.Beginner → Pro Workflow
- Start Simple: Minimal instruction
- Add Constraints: Tone, length, audience
- Add Examples: 1–3 samples for style or logic
- Add Structure: Bullets, lists, JSON
- Add Reasoning: Use chain-of-thought if needed
- Iterate: Revise based on output
- Compare Versions: Generate multiple and pick the best
8.Real-World Applications of Prompt Engineering
- Data Analysis: Exploratory analysis, data cleaning, insight extraction
- Coding: Bug fixing, writing functions, summarizing code, language conversion
- Writing & Communication: Emails, blogs, summaries, style rewriting
- Marketing: Ad copy, branding, SEO optimization
- Education: Teaching explanations, practice problems, study guides
- Productivity: Meeting summaries, notes, task breakdowns
- Creative Work: Story ideas, poetry, script outlines
- Business: Strategy drafts, reports, SOPs
9.Tools & Resources (2025 Edition)
- Prompt Tools
- ChatGPT,Gemini,Claude...
- Google PaLM
- EaseMate AI
- Feedough's AI
- Learning Resources
10.Summary
This consolidated guide brings all fundamental concepts into one place — ready for learners, professionals, and real-world application.
--Infinite Ripples | HK







Comments
Post a Comment