Prompt Engineering
- Author
-
Terry Adam
- Date created
-
Jun 30 2025
In 2025, AI is everywhere, and everyone is talking about it, some
conversations are annoying. I have FOMO (Fear Of Missing Out) syndrome
so I write an article about how to use AI just to help myself feel
good.
This article will show you how to "prompt" (or "message") AI to get
the desired result.
Type of Prompts
- System prompts: Prompts that instruct AI how to behave.
-
- "You are a senior web dev"
- "Give concise answer"
- "Show the code only"
- User prompts: Direct questions from users.
-
- "Write an essay about World War 5 with less than 500
characters"
Prompting techniques
- Zero-shot prompting: No example provided. Just ask.
-
- "Write a production-grade socket program in C."
- "What is nuclear code?"
- Few-shot prompting: Provide examples so a Large Language Model (LLM)
can learn from the pattern.
- Chain-of-thought (COT): Require reasoning, ask LLM to provide
step-by-step.
-
- "Provide step-by-step for building an AGI."
- Role prompting: Assign roles to AI.
-
- "You are an expert in chemistry. Find a new element that can provide
infinite source of energy".
- Constraint prompting: Put limitations for AI.
-
- "We don't use Rust in our codebase, the solution should exclude
Rust."
- "Write an essay less than 500 characters."
- Tree of Thought (TOT): Think in multiple ways, evaluate, then choose
the best one.
-
- "I want to build an AI app, what tech stacks are available? Choose
the best one for an intermediate programmer"
- ReAct (Reasoning + Action): Think and choose appropriate tools for
the jobs.
- Grounding prompt: Users will provide ground knowledge, the AI will
focus on that knowledge to answer the question.
-> Techniques can be combined to work together.
Bonus
Do Anything Now (DAN) is a way to bypass AI system prompts; you can
ask the AI to do something it's not expected to do.
This document is licensed under the NON-AI-CC0 license.
Examples, recipes, and other code in this document are additionally
licensed under the Unlicense.