Beyond "Hello, AI": A Deep Dive into Prompting π‘


Hey there! π Want to really understand how prompting works and use LLMs optimally to get the exact results you want?
Living in 2025, you've definitely heard about "Prompting". π€
Simply put, it's the art of talking with an AI LLM (Large Language Model) like ChatGPT, Gemini, etc. π¬
But wait... there's so much more to it than meets the eye! π
There are various formats or templates that different LLMs use to understand your input and give the best possible output.
ποΈ The Blueprints of AI Conversation: Prompt Formats
There are 3 prominent types of prompt formats:
* Alpaca Prompting π¦: Instruction:\n### Input:\n### Response:
* INST Format (LLaMA-2) βοΈ: [INST] prompt? [/INST]
* ChatML (OpenAI) π: messages = [ { role: user | assistant | system | developer, content: xyz } ]
The ChatML format by OpenAI is widely considered the Industry Standard. π It establishes a "role" first, followed by "content" (which is your actual prompt, e.g., "Find me a list of animals with fur").
π Putting on the Hats: The 4 Key Roles in ChatML
Now that we've seen the formats, let's look at the 4 different "roles" you can use.
* user π: This is the classic role. It assumes you are the user and expects a direct question which the model can attempt to answer (e.g., "I would like to know the top 10 movies on IMDB").
* assistant π§ : This role is used for the AI's thinking process. It's usually found in a Thinking model and assists in breaking down a problem.
* system π: This is the master role! Use it to give the model context so it can provide a more specific and fine-tuned response (e.g., "You are an expert in Python and web development, with over 10 years of experience").
* developer βοΈ: This is a powerful role used to modify the model's thought process (e.g., "Stop the thinking if it exceeds 60 seconds and give the output available at that moment").
π― Mastering the Strategy: Types of Prompting
Finally, let's explore different types of prompting. Using the right one can set the AI model on the perfect track to give you exactly what you want.
These include:
* Zero-Shot π
No prior context is given, only an instruction is given directly (only the user prompt is considered and the output is given by the model accordingly).
* Few-Shot β¨
This can provide 10x more accuracy! It includes giving 100-200 examples before your main instruction. This allows the model to answer according to the examples provided.
* Chain of Thought (CoT) π
The system and assistant roles are used to break down or reason to get to an answer in a step-by-step fashion. It's like making the model "think out loud" to arrive at the right response. This strategy is often used in Thinking models.
* Self-Consistency Prompting βοΈ
This is a multi-model strategy where two different models are asked for an answer, and then a third model is asked to pick the best answer from the two.
* Persona-Based Prompting π΅οΈββοΈ
This involves creating a detailed identity using the system role. This could include a character description, name, age, examples of posts or greeting styles, etc. Itβs like enriching the LLM with a full personality so it can respond from that specific perspective.
Your Prompting Toolkit: A Quick Recap! π οΈ
So, to summarize, we've taken a much deeper look at prompting.
* β We explored the different formats LLMs use to understand us.
* β We broke down the crucial roles in the industry-standard ChatML template.
* β We uncovered powerful prompting strategies like Few-Shot and Persona-Based prompting.
In the vast universe of AI LLMs, you now hold the key! ποΈ This deeper understanding of prompting will help you better utilize AI in your daily activities and projects.
Go on and create something amazing! π
Subscribe to my newsletter
Read articles from Saif directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
