Why Is AI Giving You Bad Answers?
How to write better AI prompts using system prompts, few-shot examples, and 4 rules that fix 80% of problems
TL;DR
AI models generate text based on probability, which can lead to confidently incorrect answers. Prompt engineering solves this by providing specific, structured instructions so chatbots deliver exactly what you need.
Core Concepts:
System vs. User Prompts: Set background rules and personas first (System), then assign the immediate task (User).
Zero-Shot vs. Few-Shot: Don’t just tell the AI what to do. Provide 2-3 high-quality examples (Few-Shot) to guarantee the correct style and format.
The 4 Golden Rules:
Ordering: Place your most critical instructions at the very beginning or the very end of your prompt. AI might miss things buried in the middle.
Be Hyper-Specific: Define exact word counts, formatting (e.g., “3 bullets, under 20 words each”), and the target audience.
Chain Your Tasks: Break complex workflows (research, outline, write, edit) into separate, sequential prompts rather than one massive request.
Provide a “Golden Sample”: Give the AI a flawless example of your previous work to mimic for tone and subjective tasks.
Merhaba👋🏻
I am a Software Engineer with 10+ years of experience. My goal is to close the gap between the technical and the non-technical, making AI accessible to everyone, regardless of their background.
This is a story about prompt engineering, and why getting it wrong nearly ruined a surfboard, and a vacation.
A friend of mine is really into surfing.
He loves going to all around the world, surfing through the oceans, and getting better and better each time. And he is also stubborn: he likes to push himself to go higher level each time.
Recently, he went to a surf camp in Morocco: more of a mid/intermediate level of surfing area. Before he went there, he asked Claude to recommend a surfboard for his skill level. Claude gave him a confident suggestion. He bought the board, packed it, flew to Morocco, and paddled into the ocean.
The board was a wrong suggestion for him. It was not really appropriate for his skill level yet, and it was hard for him to control. In the end, surf instructor came to rescue him, and he survived.
When he got back to hotel, he asked Claude why it suggested this surfboard and he was almost dying!
Claude said “I am sorry, you are right”.
Although AI models are quite smart these days, it is still up to us to know how to talk to them to get what we want.
This is why I am writing this article: to talk about how to effectively communicate with AI, aka Prompt Engineering.
What Is an LLM? The AI Behind ChatGPT, Claude, and Gemini
Before we get into prompt engineering, I want to briefly talk about what LLM is. As you may heard already, chatbots like ChatGPT, Claude, Gemini are considered as LLM (Large Language Model). By definition, Language Model is a model that holds statistical information about one (or multiple) language(s). This way, it can predict how to complete a sentence based on the given context. For example;
“A bike has 2 ___” will likely be completed by Language Model (LM) with “wheels” instead of “green”. That’s why LMs considered as output generator based on probability. They can generate infinite number of new contents, that’s why we see Generative AI term everywhere.
You probably also heard of token, which is the basic unit that describe a language model. I wrote an article about what is token, and how tokenization works:
LLMs, on the other hand, mainly refer to models that trained on large datasets. It usually measured in parameters. Parameters numerically translate human language into patterns the model can understand. Here is the comparison of different GPTs:
As you see, GPT-3 is roughly 1500 larger than GPT-1. The reason we see this jump is to make model smarter to increase its capabilities. This way, you can summarize text, translate it into another language, or get help with coding.
As I described above, language models, by nature, take some text and try to complete it with a statistical approach. However, starting with ChatGPT, followed by Claude, Gemini and many more, LLMs have been trained as a chatbot. This process called fine tuning: further training a model for a specific task. That way, instead of being a completion machines, they answer questions.
Today, we will talk about how you can maximize the performance of an AI chatbot for your specific needs by using Prompt Engineering techniques.
What Is Prompt Engineering? (And Why Everyone Needs It Now)
Prompt is a text that contains instruction for AI to perform a task. It could be a simple question like “What is the height of Empire State Building?” or a more complex task like building a website.
Prompt engineering is a process to tweak AI with instructions to generate a desired response.
This sounds technical, but it actually more like briefing a new hire. You wouldn’t just say “Make a good marketing plan”, yet many people do exactly this to AI.
When you are communicating with AI, describe what you want to achieve specifically. AI chatbots are pretty good at following instructions, so instead of asking “Write a marketing brief for X product”, ask it “Write a marketing brief for X product under 5 sentences and use a formal tone”.
System Prompt vs. User Prompt: The Hidden Setup Most People Skip
Before we get into the templates, there is a foundational setup that most people are missing. When you open an AI tool, there are actually two layers of communication:
The User Prompt: What you say in the moment (the direct task).
The System Prompt: The background rules you set before the conversation even starts (the job description).
Let’s say you want to write a report with the same format every time. And you want the chatbot act in a certain way with role playing.
You can add its role to system prompt:
You are an executive communications specialist who turns
raw working notes into clear, decision-ready internal reports. Your job is to turn messy
notes into polished internal reports. My company uses this structure:
Executive Summary → Key Findings → Recommended Actions → Next Steps.
Always use this structure unless I say otherwise.
My audience is non-technical senior management. Avoid jargon.
Use bullet points for findings, full sentences for recommendations.
Tone: confident, not academic.And give its task with user prompt:
My notes from last week's quarterly review. It was a mess, help me make sense of it.
We missed our target but retention was actually up.
[paste notes]If you are using ChatGPT, you can add your system prompt as Custom Instruction under the Settings
Zero-Shot vs. Few-Shot Prompting: Why Examples Beat Instructions Every Time
You can try to explain what you want and be very specific in your prompt, but you may still not be very happy with AI’s response. Although it is still important to be specific, there is also another method called in-context learning.
In-context learning basically means giving correct examples to AI. Each example that is provided is called shot.
If there is no example in the prompt, it is called zero-shot prompting.
“Summarize this meeting transcript in three bullet points.” (Works fine for basic, low-stakes tasks).
If there are several examples, it is called few-shot prompting. You show the AI what a good output looks like before asking it to do the work.
Instead of hoping the AI guesses your style, you give it a baseline:
Here are examples of my notes vs. the update I want:
Example 1:
Notes: "fixed that annoying login bug, took forever, finally done"
Update: "Resolved a persistent authentication issue that was
blocking user onboarding. Fully deployed and tested."
Example 2:
Notes: "meeting with Sarah about Q3 roadmap, nothing decided yet,
she wants more data"
Update: "Held a roadmap alignment session with Sarah (Q3).
Next step: gather additional data to support prioritization
decisions — targeting next week."
Example 3:
Notes: "helped Mehmet debug his API thing, not my job but whatever"
Update: "Provided cross-team support on an API integration
issue. Resolved same day."
Now do this one:
Notes: "spent half the day in pointless meetings, did manage to
finish the supplier comparison doc nobody asked for"Few-shot prompting is especially useful when you want to get consistent response from AI.
The 4 Golden Rules of Prompt Engineering for Better AI Responses
Through trial, error, and testing, these four principles cover about 80% of the improvements you’ll ever need:
Ordering matters: AI models pay the most attention to the very beginning and the very end of a prompt. If you bury a crucial instruction in the middle of a long paragraph, the AI is likely to miss it. Put your most critical rules first or last.
Be embarrassingly specific about formatting: Don’t just ask for a summary. Ask for “a 3-bullet summary, each bullet under 20 words, written for a non-technical stakeholder”. Less guessing equals fewer rewrites.
Break complex tasks into steps: Don’t ask the AI to research, outline, write, and edit a document all in one go. Sequence it. Ask for the outline first. Review it. Then tell it to write section one.
Provide a “Golden Sample”: If a task requires subjective judgment or a specific creative voice, give it a high-quality example to mimic.
AI is very good at following instructions but you have to tell it exactly what you want. Make sure to give it clear instructions with examples, and provide necessary context. However, it is still a bit of a trial and error: you probably need to refine your prompts until you get you want.
Which part clicked for you? Or which part still feels fuzzy? Drop it below; your question might be the next article!
PS: If you're new here and wondering why a software engineer is writing about all this - here's why I started Becoming with AI."







