From ‘Do My Homework’ to ‘Act Like Shakespeare’: Prompting Gets Wild

Ever asked an AI to solve calculus, write your essay, and then help you craft a love poem that might (just might) impress your girlfriend? Welcome to the wonderfully weird world of prompting—where your input determines whether the AI becomes your personal assistant, your therapist, your dating coach, or a confused Shakespeare impersonator. In this blog, we’re diving into the chaotic brilliance of prompt engineering—covering styles like Alpaca and ChatML, and techniques like Zero-Shot, Chain-of-Thought, and yes, even “Pretend You’re Batman” prompts. Buckle up—it’s about to get wildly nerdy (and possibly romantic).

Prompting Styles: The AI's Favorite Languages
1. Alpaca Style: The Polite Waiter
At the Alpaca restaurant, the waiter is super formal and follows a strict script:
Waiter: “Good evening! Here is your menu. Please tell me exactly what you want, following this format:
Instruction: What would you like to eat?
Response: Your order goes here.”
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
[Your instruction]
### Response:
[Your output]
2. ChatML: The Friendly Chatty Waiter
At the ChatML diner, the waiter treats you like you’re having a conversation:
Waiter: “Hey! How can I help you today?”
You: “I want a cheeseburger.”
Waiter: “Got it! Anything to drink?”
You: “A cola, please.”
Waiter: “Coming right up!”
The waiter keeps track of who said what and remembers the conversation flow. ChatML works like a chat — it labels the roles (system, user, assistant) so the AI knows who’s talking and can respond naturally, just like a friendly back-and-forth.
Most modern LLMs—ChatGPT, Claude, Gemini—use ChatML. It feels like chatting with a helpful friend, but under the hood, it's structured like this:
<|system|>: You are a helpful assistant.
<|user|>: Tell me a joke.
<|assistant|>: Why did the AI cross the road...?
These roles—system, user, assistant—help the AI know who's talking and keep the conversation flowing.
How It Remembers:
Cached Input: Like a waiter remembering past orders, it stores previous tokens, saving time and processing power.
Context Window: It’s the AI’s memory span.
GPT-4o has a context window of 128,000 tokens—like reading a whole novel at once.
Context Trimming: When the conversation gets too long, older parts are summarized to free up space while keeping key info intact.
3.
At the INST kitchen, the chef is flexible and ready for almost any instruction — but you don’t have to be super formal. You just tell them what you want in plain English, like:
“Make me a gluten-free pizza with extra cheese, and don’t forget the olives.”
The chef understands the instruction and gets to work without needing a special format or labels.
INST is like instruction tuning — the AI has been trained to understand natural language commands clearly, so you can just say what you want, and it’ll handle the rest.
Types of Prompting Techniques
1. Zero-Shot Prompting
Zero-shot prompting is like walking up to a stranger and saying:
“Hey, you’re a poet now. Write me a poem about pizza.”
No examples. No warm-up. Just trust.
In this style, you tell the LLM what to do — maybe who it should act like or what task it should perform — without giving any examples to learn from. You're relying completely on the model’s general knowledge.
Example Prompt:
“You are a professional chef. Give me a recipe for mango pasta.”
The model figures it out on its own, no hints needed.
# In this example, we will create a system prompt that instructs the model to respond only to Python-related queries and roast the user for non-Python questions.
SYSTEM_PROMT = """
You are an AI expert in Coding. You only know Python and nothing else.
You only help users in solving their python doubts only and nothing else.
If the user tried to ask you anything other than python, you can roast him.
"""
response = client.chat.completions.create(
model = "gemini-2.0-flash",
messages = [
{"role":"system", "content": SYSTEM_PROMT},
{"role":"user","content":"Hey, My name is Aditya"},
{"role":"assistant","content":"Hello Aditya, If you have any python related queries, feel free to ask."},
{"role":"user","content":"How I can Make a chai?"},
{"role":"assistant","content":"I am not a chef, I am a python expert. Ask me python related queries."},
{"role":"user","content":"How to write a code in python to add two numbers?"}
]
)
print(response.choices[0].message.content)
2. Few-Shot Prompting
Few-shot prompting is like training a new team member:
“You’re a quiz master now. Here’s how we ask questions — watch a few, then try one.”
You tell the LLM who it is (e.g., a chef, teacher, assistant) and then give a few examples so it understands the format and tone.
SYSTEM_PROMT = """
You are an AI expert in Coding. You only know Python and nothing else.
You only help users in solving their python doubts only and nothing else.
If the user tried to ask you anything other than python, you can roast him.
Examples:
User: How to make a tea?
Assistant: Oh my love It seems like you dont have a girlfreind.
Examples:
User: How to write a function in python?
Assistant: def fn_name(x: int) -> int:
pass #Logic to be implemented here
"""
3. Chain-of-Thought Prompting: Let the Model Think Out Loud
This one’s like saying to the LLM:
“Don’t just give me the answer — show your work like it’s math class.”
You guide the model to think step-by-step, helping it reason through complex tasks instead of jumping straight to the answer.
Chain-of-thought prompting became popular because it boosts logical reasoning, especially in math, coding, and decision-making tasks. That’s why newer models (like GPT-4, Claude, Gemini) often default to this kind of response — it mimics human reasoning and increases accuracy.
import json
SYSTEM_PROMPT = """
You're a helpful AI assistant. For any question, follow these steps:
'analyse', 'think', 'output', 'validate', 'result'.
Output format:
{ "step": "string", "content": "string" }
"""
messages = [{"role": "system", "content": SYSTEM_PROMPT}]
query = input("> ")
messages.append({"role": "user", "content": query})
while True:
response = client.chat.completions.create(
model="gpt-4.1-mini",
response_format={"type": "json_object"},
messages=messages
)
reply = response.choices[0].message.content
messages.append({"role": "assistant", "content": reply})
step_data = json.loads(reply)
print(f"\n🤖: {step_data['content']}\n")
if step_data["step"] == "result":
break
Wrapping Up
Now you know how LLMs like ChatGPT actually think — by breaking problems into steps using smart prompting.
Whether it’s zero-shot, few-shot, or chain-of-thought, the magic is in guiding the AI how to think, not just what to answer.
So go ahead, impress your friends — or your crush — by telling them you taught AI to think like Sherlock Holmes. 😎
Keep experimenting with prompts, and let your AI skills shine!

