PROMPT ENGINEERING

Prompt Engineering Basics: 5 Techniques That Work on Any AI in 2026

By PromptCraftAsia Editorial Team ·

The difference between a bad prompt and a great one is not creativity. It is specificity. Here are 5 techniques that make any AI produce significantly better output, regardless of which model you use.

May 2026·9 min read·Last reviewed: June 2026

Quick Answer

Prompt engineering is the practice of designing clear inputs that make AI models produce specific, high quality outputs. Five core techniques work across all major models: role prompting, few-shot examples, chain of thought reasoning, format specification, and constraints. It is structured communication, not tricks, giving AI enough context to answer reliably.

What Is Prompt Engineering?

The five prompt engineering techniques that work on any AI are role prompting, few-shot examples, chain of thought, format specification, and constraint setting (arXiv; OpenAI). Prompt engineering is not a technical skill reserved for developers. It is the practice of communicating clearly and precisely with AI systems to get reliably useful output.

Think of it this way: when you give a colleague a task, you do not just say "write something about marketing." You say who it is for, what format you need, what length, what tone, and what the goal is. Prompt engineering applies the same principle to AI. The model is not thinking; it is pattern-matching your input to produce an output. The quality of your input determines the quality of the output.

The 5 techniques below work across ChatGPT, Claude, and Gemini. They are all available for free in the PromptCraft Asia library with ready-to-use templates.

Technique 1: Role Prompting

What it is: Opening your prompt by assigning the AI a specific role, expertise level, and relevant experience before giving the task.

Formula: You are a [ROLE] with [X] years of experience in [FIELD/DOMAIN].

Why it works: Role prompting activates relevant patterns in the model's training. An AI told it is a "senior copywriter with 12 years of direct response experience" will weight different vocabulary, sentence structures, and persuasion techniques than an AI given no role context. The role narrows the possibility space from "all possible responses" to "responses appropriate to this expert."

Without role prompting: "Write a subject line for a promotional email."

With role prompting: "You are a direct response copywriter with 10 years of experience writing email campaigns for B2C e-commerce brands. Write 5 subject line options for a promotional email offering 25% off [PRODUCT] to existing customers. Focus on curiosity and urgency, not discounts."

The second prompt reliably produces more specific, higher-performing output.

Technique 2: Few-Shot Examples

What it is: Providing 2-3 examples of the output you want before making your actual request. The AI learns the pattern from the examples and applies it.

Formula: "Here are 2 examples of [OUTPUT_TYPE] I want: [EXAMPLE_1], [EXAMPLE_2]. Now write [N] more in the same style for [TOPIC]."

Why it works: Examples communicate tone, style, length, and structure more precisely than any description. Instead of trying to articulate "witty but not sarcastic, punchy, under 10 words," you just show two examples that embody it. The AI pattern-matches to your examples rather than to a generic average.

Example in use:

"Here are 2 newsletter subject lines I like: 'The 8-minute meeting that changed everything' and '3 things I stopped doing after Singapore'. Write 5 more in this style for a newsletter about [TOPIC]."

Few-shot prompting is especially powerful for: subject lines, social captions, taglines, code comments, and any task where style consistency matters. For a deeper look at zero-shot vs few-shot prompting and when each one wins, see our dedicated comparison guide.

Technique 3: Chain of Thought

What it is: Instructing the AI to reason through a problem step by step before producing its final answer.

Trigger phrases: "Think step by step before giving your answer." / "Show your reasoning." / "Work through this systematically."

Why it works: For complex tasks, forcing the AI to produce intermediate reasoning before its conclusion significantly improves output accuracy. Without chain of thought, the model jumps to a likely-looking answer. With it, the model builds toward a conclusion, catching errors in its own reasoning as it goes.

Best for: Math and calculations, logical analysis, strategy recommendations, diagnosing a problem, evaluating trade-offs, and any task where the right answer depends on a sequence of reasoning steps.

Example: "A company's revenue grew from $800K to $1.2M over 3 years. Think step by step: calculate the total growth, then the CAGR, then tell me whether this rate is above or below the typical SaaS industry benchmark of 25% annual growth."

Technique 4: Format Specification

What it is: Explicitly stating the structure and format of the output you want.

Common formats to specify: Numbered list, bullet points, table, JSON, markdown with headers, plain prose, Q&A pairs, SWOT matrix, before/after comparison, step-by-step instructions.

Why it works: Without a format specification, the AI chooses a format based on what looks appropriate to it. This leads to inconsistent output that requires reformatting. Specifying the format upfront eliminates the reformatting step entirely.

Weak prompt: "Summarize this article."

Strong prompt: "Summarize this article in the following format: (1) One-sentence headline, (2) 3 key points as bullet points, (3) One thing I should do with this information. Article: [ARTICLE]"

You can also specify what NOT to use: "Output as a table. No introductory paragraph. No bullet points."

Technique 5: Constraint Setting

What it is: Adding explicit guardrails that tell the AI what to avoid, what limits to stay within, and what assumptions to reject.

Common constraints:

Why it works: Constraints shape the possibility space. Without constraints, the AI optimizes for the average acceptable output. With constraints, it is forced to find the best output within your specific requirements. Counterintuitively, adding constraints often produces more creative output because the AI has to work harder to meet all conditions simultaneously.

Adding even 2-3 constraints to any prompt consistently improves output quality.

What Are the Model-Specific Tips for 2026?

How Do You Apply These Techniques with Ready-Made Prompts?

All 5 techniques above are built into the prompts in the PromptCraft Asia library. Every prompt is engineered using these principles, tagged by model, and available with fill-in-the-blank variables. Browse by category or search for your use case. No signup required.

Start with the full prompt writing guide for a deeper dive into each technique, or go directly to the library to find prompts for your specific task.

Related Articles

Advertisement

More AI Guides

SpotFreeAI
Find free AI tools to practise prompt engineering on →
WhichAIBest
See how different AI models respond to the same prompt →

Share this article

Facebook X WhatsApp