Skip to content

behnia137/prompt-engineering-visual

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Prompt Engineering β€” Visual Edition

Get better answers from AI β€” with prompts you can copy today.

Simple visuals + everyday analogies + copy-paste templates that turn anyone into a confident prompter β€” whether you write code or just chat with ChatGPT.

License: MIT PRs Welcome Made with Mermaid Beginner Friendly Techniques Stars Welcome

If this helps you finally write prompts that work β€” drop a ⭐. It helps more people find it.


πŸ€” Why this exists

Everyone's using AI, but most people are leaving 80% of its power on the table β€” because nobody taught them how to ask. The guides out there are either academic papers or "10 magic prompts" clickbait.

This repo sits in the middle. Every technique gets:

  • πŸ§’ An "Explain Like I'm 5" analogy β€” the one-liner you'll actually remember
  • πŸ–ΌοΈ A simple diagram β€” see how the technique works, don't just read it
  • πŸ”§ "How it actually works" β€” for when you're ready to go deeper
  • 🌍 A real-world example β€” where it actually helps

No PhD required. No prior coding needed. Just better results from the AI you already use.


🧭 Which technique should I use?

Lost? Start here. Follow the arrows to the right tool for your task.

flowchart TD
    Start(["πŸ€” What do you need?"]) --> Facts{"Needs real or<br/>current facts?"}
    Facts -->|Yes| G["πŸ“– Grounding<br/>(+ ReAct for live data)"]
    Facts -->|No| Hard{"Hard reasoning,<br/>math or logic?"}
    Hard -->|Yes| CoT["πŸ”— Chain-of-Thought<br/>(+ Self-Consistency if critical)"]
    Hard -->|No| Fmt{"Need a strict<br/>output format?"}
    Fmt -->|Yes| OF["🧾 Output Formatting<br/>(+ Output Priming)"]
    Fmt -->|No| Style{"Specific tone<br/>or expertise?"}
    Style -->|Yes| Role["🎭 Role Prompting"]
    Style -->|No| Odd{"Unusual or<br/>custom task?"}
    Odd -->|Yes| FS["πŸ“š Few-Shot<br/>(show examples)"]
    Odd -->|No| ZS["🎯 Zero-Shot<br/>(just ask clearly)"]
    style G fill:#dcfce7,stroke:#22c55e,color:#14532d
    style CoT fill:#dcfce7,stroke:#22c55e,color:#14532d
    style OF fill:#dcfce7,stroke:#22c55e,color:#14532d
    style Role fill:#dcfce7,stroke:#22c55e,color:#14532d
    style FS fill:#dcfce7,stroke:#22c55e,color:#14532d
    style ZS fill:#dcfce7,stroke:#22c55e,color:#14532d
Loading

πŸ“š The Techniques

🌱 Start here β€” the everyday essentials

# Technique One-liner
1 🎯 Zero-Shot Prompting Just ask β€” no examples needed.
2 πŸ“š Few-Shot Prompting Show 2–3 examples and let it copy the pattern.
3 🎭 Role Prompting Give the AI a job title before you ask.
4 πŸ“ Clear Instructions Vague in, vague out β€” be specific.
5 🧾 Output Formatting Tell it the shape you want: list, table, JSON.
6 🚦 Constraints & Negatives Set the boundaries it can't cross.
7 ✍️ Output Priming Start the answer for it; it finishes the pattern.
8 πŸ–ΌοΈ Multimodal Prompting Prompt with images, not just words.

βš™οΈ Level up β€” reasoning & reliability

# Technique One-liner
9 πŸ”— Chain-of-Thought Ask it to "think step by step."
10 πŸͺœ Step-Back Prompting Get the general principle first, then the answer.
11 πŸ§— Least-to-Most Solve the easy sub-problems first, then climb.
12 🌳 Tree of Thoughts Explore several branches, keep the best.
13 πŸ—³οΈ Self-Consistency Ask a few times, take the majority answer.
14 πŸ” Self-Critique & Reflection Have it grade and fix its own work.
15 πŸ”„ Iterative Refinement Treat the first answer as a draft, then steer.
16 πŸ“– Grounding (Answer from Context) Make it answer only from facts you supply.

πŸ€– Power tools β€” building with prompts

# Technique One-liner
17 🚧 Delimiters & Structure Fence off your content so it's never confused.
18 ⛓️ Prompt Chaining Break big jobs into a chain of small prompts.
19 πŸ” ReAct (Reason + Act) Think β†’ act β†’ observe β†’ repeat.
20 πŸͺͺ System Prompt The hidden rulebook behind every AI app.
21 πŸͺž Meta-Prompting Ask the AI to write your prompt for you.
22 🧱 Prompt Templates Write it once with blanks, reuse forever.

πŸ›‘οΈ Don't get burned β€” pitfalls

# Technique One-liner
23 πŸŒ€ Avoiding Hallucinations Stop the AI from confidently making things up.
24 πŸ›‘οΈ Prompt Injection The sneaky attack every prompter should know.

πŸš€ The 30-second cheat sheet

If you remember nothing else, remember this:

  1. Be specific. Say who it's for, how long, and what format. (more)
  2. Give an example when the format is unusual. (more)
  3. Assign a role. "You are a..." reshapes the whole answer. (more)
  4. For hard problems, say "think step by step." (more)
  5. Iterate. The first reply is a draft, not the final word. (more)

🧩 Sister project

This is the companion to AI for Beginners β€” Visual Edition β€” 32 core AI concepts (LLM, token, embedding, RAG…) explained the same visual way. Learn what AI is there, learn how to talk to it here.


🀝 Contributing

Got a clearer analogy or a technique we're missing? PRs are warmly welcome β€” see CONTRIBUTING.md. You don't need to be an expert; if you can explain something simply, you can contribute.


Made for everyone who's tired of mediocre AI answers.

If it helped you, a ⭐ goes a long way. πŸ§ πŸ’›

About

🧠 Prompt Engineering β€” Visual Edition: 24 prompting techniques explained with simple analogies, diagrams & copy-paste templates. No PhD required.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors