AI Prompting techniques: Zero-shot, One-shot, Few-shot
After using the ChatGPT and other AI tools, I used to think prompts were just simple text inputs that AI models magically processed. But as mentioned in my Day 1 post: AI models are just next-word predictors , not thinkers. They predict based on training data (though modern ones now use real-time search and tool calling for better results).
The Basics
Simplest python code snippet for getting response from AI
response = client . responses . create ( model = " gpt-5-nano " , input = [ { " role " : " system " , " content " : SYSTEM_PROMPT }, { " role " : " user " , " content " : " How do I reverse a list in Python? " }, ] )
Enter fullscreen mode
Exit fullscreen mode
The most important point to note: role key has 3 values: system , user , assistant . The system prompt sets the behaviour.
1.…