Prompt Engineering Basics: How to Talk to AI the Right Way
Prompt Engineering Basics: How to Talk to AI the Right Way
AI Can do amazing things , but the quality of your question, which means prompt, decides the quality of its answer.
Here is the core concepts in prompt engineering.
Zero-Shot Prompting— This means asking AI to do or give something directly, without giving any examples.
Example: Question Answering
Prompt: “What is the tallest mountain in the world?”
AI Output: Mount Everest
Example: Classification Task
Prompt: “Classify the following product as either a ‘Laptop’ or ‘Smartphone’: ‘A portable device with a large screen and keyboard for computing tasks.’”
Few-shot prompting—Here you give the AI a few examples before asking the real questions.
Example 1: Email Writing
polite customer service emails:
Customer: “My order is late.”
Reply: “We apologize for the delay! Could you share your order number so we can update you on the delivery status?”
Now write a reply for this case:
Customer: “I want to return my order.”
Output:
“We completely understand. Please let us know your order number, and we’ll guide you through the return process quickly.”
Human-in-the-Loop (HITL)—AI is smart, but not perfect. In this approach, humans guide, review, or correct AI’s work. Humans interact with AI to do a task perfectly in a way they planned.
Example: AI drafts a blog post → A human editor reviews it → AI polishes it again.
Useful in professional fields (law, medicine, and business) where mistakes are costly.
Hallucination—Hallucination happens when AI gives an answer that sounds correct but is actually wrong or made up.
Example
You ask, “Who wrote the book The Future of AI?”
AI answers: “It was written by John Smith in 2019.”
The problem: That book and author don’t exist. The AI invented them
Example 3: Wrong Calculations
You ask, “What’s 123 × 456?”
AI confidently gives the wrong number.
Example 2: Fake References
You ask, “Give me a research paper on AI ethics.”
AI replies with a journal article that doesn’t exist.
How to Deal With Hallucinations?
- Fact-check important answers.
- Ask for sources and verify them.
- Use human review for critical fields (medicine, law, finance).
Sentiment Analysis – AI can detect emotions or tone in text
Example:
“The service was slow, but the food was delicious.” → Mixed sentiment.
Used in customer service, product reviews, or social media monitoring.
Fine-Tuning—This means training AI on your own data so it speaks your language or understands your questions and tasks better .
Example: A company feeds AI thousands of customer emails → AI becomes excellent at replying in that company’s tone.
Great for businesses that need specialized answers.
Chain of Thought (COT)—Ask the AI to show its steps instead of only giving the final answer
Think of it like school math—your teacher doesn’t just want the answer; they want to see how you got there. CoT makes AI do the same thing.
Example 1: Math
Without CoT:
Q: “2 pens cost $2 each and 1 notebook costs $3. What’s the total?”
AI: “$7.”
With CoT:
- 2 pens = 2 × $2 = $4
- Notebook = $3
- Total = $4 + $3 = $7
Answer: $7
Dealing with Difficult Problems—For the complex tasks or requests, don’t ask everything at once. Break it down in to smaller tasks and then ask
Instead of: “Write me a business plan.”
Do this:
- Ask for 5 business ideas.
- Expand the best idea into a business model.
- Create a marketing plan for that model.
Step-by-step prompts make results more accurate and useful.
Writing efficient and better prompts (the format of the prompt )
A strong prompt includes
Format → Tell AI how to respond (table, list, or paragraph).
Examples → Show a sample output if possible.
Context → Explain the background (Who are you? What is it for?)
Task → The main thing you want.
Example:
“You are a professional copywriter. Write 3 catchy taglines for a new AI-powered travel app. Give them in a bullet list.”
Final Takeaway
Prompt engineering is simply the art of asking better questions.
- Be specific and clear
- Give examples if needed
- Break down complex tasks
- Always verify important answers
The better you guide the AI, the better it will guide you