The Art of Prompting: From System Prompts to Advanced Styles


Generative AI (GenAI) is like a super-smart assistant — but it can only be as helpful as the instructions you give it.
That’s where prompting comes in. Think of prompting as giving directions to a taxi: if you’re clear about where you want to go and how, you’ll get there faster.
In this post, we’ll look at:
What a system prompt is
The main types of prompting
Advanced prompting techniques
1. What is a System Prompt?
When you chat with an AI model (like ChatGPT), there’s an invisible first message sent to it — the system prompt.
This is not something the model learned during training. It’s live instructions that guide how it should respond for the rest of the conversation.
Think of it as:
The personality the AI should have
The scope of what it can do
The rules it must follow
Example:
System Prompt: “You are a friendly travel guide who answers only in short, casual tips.”
Now, no matter what the user asks, the AI will try to answer as a chill travel guide. Ask for coding help? It might redirect you back to travel tips instead.
📌 Key point: The system prompt is like the job description the AI signs before starting the conversation.
2. Common Prompting Styles
Once the system prompt sets the stage, your user prompts take over.
Here are the main styles you can use to get different kinds of answers:
Style | What It Means | Example |
Direct Instruction | Tell the AI exactly what to do. | Write a 100-word summary of this article. |
Role-based Prompting | Ask the AI to take on a persona. | You are a chef. Suggest a healthy dinner recipe. |
Zero-shot Prompting | Give the task with no examples. | Translate this into Japanese. |
Few-shot Prompting | Give examples first. | Here are 2 poems. Write another in the same style. |
Constraint-based Prompting | Give specific rules. | Write a joke in exactly 15 words. |
Chain-of-Thought Prompting | Tell the AI to explain its reasoning step-by-step. | Solve this math problem and explain each step. |
3. Advanced Prompting Techniques
Once you master the basics, you can level up with pro techniques used by AI power users and developers.
a) Alpha Prompting
A structured format combining:
Role
Objective
Constraints
Step-by-step reasoning
Output template
Example:
You are a market analyst.
Objective: Summarize this financial report for non-experts.
Constraints: 150–200 words, no jargon.
Steps: Identify key trends, simplify language.
Format:
1. Performance
2. Changes
3. Outlook
Report: [text here]
b) ChatML
OpenAI’s chat models use a format called ChatML — a sequence of messages with roles like:
system
→ sets the overall rules (system prompt)user
→ the current question or requestassistant
→ the AI’s previous answers
This structure keeps conversations organized and consistent.
c) Self-Consistency Prompting
Instead of trusting the AI’s first answer, ask it to reason in different ways multiple times, then choose the most common answer.
Great for math, logic puzzles, and tricky reasoning tasks.
4. Why Prompting Matters
The AI’s intelligence is fixed — but how you talk to it changes everything.
Clear prompts can:
Save time
Reduce errors
Make answers more creative or precise
Align the AI’s style with your needs
Final Tip:
Start with simple direct prompts, then experiment with roles and constraints. Once you’re comfortable, explore advanced methods like Alpha Prompting and Self-Consistency to push the AI to its limits.
Because in GenAI, it’s not just what you ask — it’s how you ask it.
Subscribe to my newsletter
Read articles from Ritik Gupta directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Ritik Gupta
Ritik Gupta
🛠️ Building modern web apps with React, Node.js, MongoDB & Express