Good vs Bad Prompting: What I Learned While Working With AI Models

Published: (February 9, 2026 at 12:49 PM EST)
6 min read
Source: Dev.to

Source: Dev.to

Sure thing! I’m happy to tidy up the markdown for you. Could you please paste the specific markdown section you’d like cleaned up? Once I have the text, I’ll make sure the formatting is clear, consistent, and properly structured.

Introduction

I didn’t start learning Prompt Engineering to become an expert. I began because I kept getting inconsistent results while using AI tools in real projects. While reading about Prompt Engineering, I discovered several prompting techniques that I found interesting and useful, and I wanted to share what I learned.

We are all very familiar with prompts. We use them almost every day while working with ChatGPT, Gemini, Claude, and other AI models. Every AI model needs some form of input to generate an output. Let’s start with the basics.

## What is a prompt?

It is an instruction given to the AI model to produce an output. It could be as simple as

> *“Which is the best smartphone of 2026?”*

or as complex as

> *“Act as a frontend engineer and create a portfolio website with these specifications.”*

---
## What is Prompt Engineering?

Prompt engineering is the process of crafting and refining prompts to get more accurate and useful outputs from generative AI models.

---

Why Prompt Engineering Is Important

AI models respond based on how clearly the task is defined. Prompt engineering bridges the gap between vague, open‑ended queries and precise, goal‑oriented instructions.

Example

PromptResult
“What are Samsung’s sales in 2026?”Vague, generic answer
“Act as a senior sales manager, analyze Samsung’s Q1 2026 performance, identify trends and shortcomings, and present the data in a table.”Contextual, role‑based, structured answer

The second prompt supplies context, a role, and an expected output, making it far more actionable.

Illustration of a computer being “destroyed” by a bad prompt

Don’t keep using a prompt that doesn’t give you the desired output. Try one of the prompting techniques below.

Good Prompting Techniques

Below are eight prompting techniques that work well for getting better results from AI models.


1. Zero‑shot Prompting

No examples are provided; the model relies on its existing knowledge.

Translate this to French: “Hello”

2. One‑shot Prompting

One example is given to set the context.

Translate English to French.

Example:
English: “Good morning” → French: “Bonjour”

Now translate:
English: “Hello”

3. Few‑shot Prompting

Multiple examples are supplied for richer context.

Translate English to French.

English: “Good morning” → French: “Bonjour”
English: “Thank you” → French: “Merci”
English: “Good night” → French: “Bonne nuit”

Now translate:
English: “Hello”

I noticed this works especially well when the model’s first response feels slightly off.


4. Chain‑of‑Thought Prompting

Encourages the model to reason step‑by‑step before answering.

Translate the following sentence to French.

Think step by step before giving the final answer.

Sentence: “Good morning”

Useful for logic‑heavy or multi‑step problems.


5. Emotion Prompting

Provides emotional or situational context so the response feels more thoughtful.

Translate the following sentence to French.

Imagine you are helping a beginner who is excited to learn a new language. This is important because I have a French exam tomorrow.

Sentence: “Good morning”

Improves tone when the default response feels too robotic.


6. Role‑based Prompting

Starts with “Act as …” or “You are a …” to control tone, style, and depth.

Act as a professional French language teacher.

Translate the following sentence to French.

Sentence: “Good morning”

I use this when I need structured or professional responses.


7. Rephrase and Respond (RaR) Prompting

The model first rephrases the task, then answers it.

First, rephrase the task in your own words.

Then, translate the sentence to French.

Sentence: “Good morning”

Helps when I’m unsure how to phrase my request clearly.


8. Chain‑of‑Dictionary (CoD) Prompting

Provides explicit word meanings before forming the final translation—useful in multilingual contexts.

Translate the sentence using a dictionary‑style breakdown.

Step 1: List key words and their French meanings.  
Step 2: Combine them into a natural French sentence.

Sentence: “Good morning”

Combining Prompting Techniques

Merging the best parts of multiple techniques can help the AI understand complex tasks better and generate more accurate outputs.

Illustration of combining prompting techniques

Example: Role‑based + Instructions

Role: You are a professional French language teacher.

Task: Translate the following sentence to French, explaining each step as you would to a beginner.

Sentence: “Good morning”

An AI is like a high‑performance engine. Prompt engineering is how you learn to drive it. Each technique works well on its own, but thoughtfully combining one or two can significantly improve results.


Sample Prompt for a Language Teacher

# Language Teacher Prompt Example

**Role:** Language teacher who specializes in clear, beginner‑friendly translations.

**Task:** Translate the sentence below into French, providing a brief explanation of each word and the overall structure.

Sentence: “Good morning”

Instruction

Translate the following English sentence into French, keeping the tone simple and natural for beginners.

Text: “Hello”

Example: Context + Instruction + Few‑shot Prompting

Prompt:

Context: You are translating short English sentences into French for a travel phrasebook. The translations should be natural, conversational, and suitable for everyday use.

Instruction: Translate the English sentence into French following the style of the examples below.

EnglishFrench
“Good morning”“Bonjour”
“Thank you”“Merci”
“Good night”“Bonne nuit”

Now translate:

  • English: “Hello”

Bad Prompting Techniques (Things I Learned to Avoid)

Avoid these as much as possible to get better results.

1. Overly Vague Prompts

Too broad and usually leads to generic output.

Prompt:

Build me a website

2. Contradictory Instructions

Confuses the model.

Prompt:

Make it minimal but add a lot of animations and details.

3. Overloading a Single Prompt

Trying to solve design, logic, deployment, and testing in one prompt often leads to messy results.

Prompt

Act as a senior full‑stack developer.

Design a portfolio website with animations, build the frontend in React, create the backend APIs, deploy it to the cloud, write tests, optimize performance, fix any errors, and make it SEO‑friendly.

I realized smaller prompts worked better.

4. Blind Trust in Output

Assuming the model is always right without reviewing or validating the result.

Prompt

Generate production‑ready React code for authentication.

Do not explain anything. Just give the final answer.

This usually required manual fixes later.


Takeaway

Prompt engineering isn’t about writing clever prompts; it’s about clear thinking. I’m still learning, and I’m sure there are better ways to do this. For now, breaking problems down, giving context, and reviewing outputs has worked best for me.

Question: What prompting techniques have worked best for you, and which ones completely failed?

0 views
Back to Blog

Related posts

Read more »