AI Prompts: How they Work, Key Techniques, Best Examples and Easy Tips

AI prompts are the instructions, questions, descriptions or requests that users give to AI systems to tell them what to do. They are the interface between human intention and machine output. A vague, poorly constructed AI prompt produces vague, generic and often disappointing results. A precise, well-structured AI prompt produces output that is specific, useful, creative and frequently remarkable.

This page is the complete pillar guide to AI prompts. It covers what AI prompts are, how they work, every major type of prompt, the universal principles that make any prompt more effective and the key techniques that advanced users rely on. 

 

Table of Contents

 

What are AI Prompts?

AI prompts are the inputs that users provide to artificial intelligence systems to direct their behaviour and output. They are the instructions, questions, descriptions or requests that tell an AI what to do, how to do it and what the desired output should look like.

AI Prompts in Context

  • When you type a question into a language model like Claude, ChatGPT or Gemini, that question is a prompt. 
  • When you describe a scene to an image generator like Midjourney, DALL-E or Stable Diffusion, that description is a prompt. 
  • When you give an instruction to a coding assistant, a summarisation tool or a translation engine, that instruction is a prompt.

Every AI interaction begins with a prompt, and every AI output is shaped by the prompt that produced it.

 

Types of AI Prompts: Overview

AI prompts are most usefully categorised by the type of AI system they address. Each category has its own conventions, its own best practices and its own dedicated concept page for deeper coverage.

 

Type

Primary AI Tools

What It Produces

Text prompts

Claude, ChatGPT, Gemini

Writing, analysis, summaries, essays

Image prompts

Midjourney, DALL-E, Stable Diffusion

Generated images and artwork

Code prompts

GitHub Copilot, Claude, Cursor

Code, debugging, documentation

Video prompts

Sora, Runway, Pika

Generated video clips and scenes

Audio prompts

ElevenLabs, Suno, Udio

Voice, music, sound effects

Chat prompts

Claude, ChatGPT, Gemini

Conversation, Q&A, tutoring, roleplay

 

Elements of an Effective AI Prompt

 

Element

What it Does

Example

Task

States what to do

Write a 500-word persuasive essay

Context

Provides background

For a general audience with no scientific background

Format

Specifies structure

Use three paragraphs with no bullet points

Tone

Sets style and register

Warm and conversational, not academic

Constraints

Sets limits

Under 200 words, no jargon

Examples

Shows desired output

Similar in style to this: [example]

Role

Assigns expertise

You are an experienced marketing strategist

 

Best AI Prompts: Universal Principles

The best AI prompts across every category and every tool share a set of universal principles. These principles apply whether you are writing a text prompt, an AI image prompt, a code prompt or any other type.

 

Principle 1: Specificity over Vagueness

The more specific a prompt, the more targeted the output. Vagueness invites the AI to make assumptions and those assumptions are rarely exactly what the user wants.

  • Vague: Write a story.
  • Specific: Write a 600-word short story about a retired astronaut who discovers an old message on their home answering machine that they cannot explain. The tone should be quietly unsettling rather than overtly frightening.

Principle 2: One Clear Goal per Prompt

Prompts that contain multiple competing goals tend to produce output that partially satisfies each and fully satisfies none. If you need multiple outputs, use multiple prompts.

  • Overloaded: Write a blog post about climate change, a product description for solar panels and slogans on Earth Day.
  • Focused: Write a 600-word blog post about the three most actionable things individuals can do to reduce their personal carbon footprint.

Principle 3: Provide Sufficient Context

Context transforms generic output into targeted output. Who is the audience? What is the purpose? What format is needed? What has already been tried? The more context provided, the more relevant the output.

Principle 4: Specify Format Explicitly

Unless told otherwise, AI models make their own decisions about format. These decisions are often reasonable but not always what the user wants. When format matters, specify it.

Principle 5: Use Role Assignments for Specialised Tasks

Assigning the AI a specific role, expertise, or perspective produces more specialised and appropriate output for tasks that benefit from domain knowledge or a particular point of view.

Principle 6: Show rather than Tell

Providing examples is more effective than describing style in the abstract. If you want the AI to write in a particular style, show it an example of that style rather than trying to describe what the style looks like.

Principle 7: Iterate Deliberately

The first output is rarely the final output. The best use of AI prompts is iterative: generate an initial output, identify specifically what is working and what is not, and refine the prompt or follow up with targeted adjustments.

 

Key Prompt Engineering Techniques

Prompt engineering is the practice of designing AI prompts to produce optimal results. The following are the most important and most widely used techniques.

 

1. Chain of Thought Prompting

Instructing the AI to think through a problem step by step before providing its final answer. This technique is particularly effective for mathematical problems, logical puzzles and complex analytical tasks.

  • Before answering, think through this problem step by step. Show your reasoning at each stage before reaching a conclusion.

2. Few-Shot Prompting

Providing two or three examples of the desired output before asking for a new one. Examples communicate style, format and quality more efficiently than any description.

  • Here are three examples of product descriptions in the style I want: [Example 1]. [Example 2]. [Example 3]. Now write a product description for [new product] in the same style.

3. Zero-Shot Prompting

Giving the AI a task with no examples, relying on the model's general training. This works well for straightforward tasks where the desired output is clear from the instruction alone.

  • Translate the following paragraph into formal Hindi.

4. Role Prompting

Assigning the AI a specific expertise, identity, or perspective to activate more specialised responses.

  • You are a world-class negotiation coach with twenty years of experience training corporate executives.

5. System Prompting

Establishing the overall context, role and constraints for an entire conversation rather than a single exchange. System prompts set the parameters for everything that follows.

  • You are a precise, formal academic writing assistant. All responses should use formal language, cite evidence where possible and avoid colloquial expressions.

6. Self-Critique Prompting

Asking the AI to evaluate and improve its own output before delivering a final version.

  • Review what you have written. Identify the three weakest parts and improve each one before presenting the final version.

7. Perspective Shifting

Asking the AI to approach a topic from multiple perspectives to produce a more nuanced and complete analysis.

  • Present this argument from three perspectives: a conservative economist, a progressive social scientist and a pragmatic policymaker.

8. Constraint-Based Prompting

Using specific constraints to focus and improve output quality.

  • Answer in exactly three sentences.
  • Use no jargon.
  • Present as a table with four columns.
  • Write only in simple present tense.

9. Negative Prompting

Specifying what the AI should not include, particularly useful for image generation tools.

  • No text overlays, no watermarks, no distorted faces, no extra fingers. (for image prompts)
  • Do not use bullet points. Do not include any caveats or disclaimers. (for text prompts)

 

AI Prompt Examples: Quick Reference

The following is a quick reference collection of AI prompt examples across the major categories. 

 

A. Text Prompt Examples

  • Writing: Write a 700-word blog post for working professionals about the three most evidence-based strategies for improving sleep quality. Warm but authoritative tone. Include one practical tip per strategy.
  • Analysis: Analyse the following paragraph for logical fallacies. Identify each by name, quote the relevant section and explain why it constitutes that fallacy.
  • Professional: Write a professional email declining a meeting invitation while leaving the door open for a future conversation. Polite, direct, under 100 words.

B. AI Image Prompt Examples

  • Realistic: A Bengal tiger emerging from a jungle stream at golden hour, water droplets catching the light, intense eye contact with the camera, shallow depth of field, wildlife photography style, 500 mm telephoto.
  • Artistic: A bowl of tropical fruits painted in the style of Dutch Golden Age still life, dramatic chiaroscuro lighting, rich jewel-toned colours, oil on canvas texture, highly detailed.
  • Portrait: A close-up portrait of an elderly woman with deeply lined face and warm eyes, natural light from a window to the left, documentary photography style, shot on 85mm lens.

C. Code Prompt Examples

  • Generation: Write a Python function that takes a list of email addresses as input, validates each one using a regular expression, and returns two lists: valid addresses and invalid addresses. Include a docstring and error handling.
  • Debugging: The following Python code is supposed to return the most common element in a list but it is returning incorrect results. Identify the bug, explain why it is occurring, and provide a corrected version: [code].

D. Chat Prompt Examples

  • Learning: I want to understand Bayesian probability. I have a basic understanding of statistics. Explain it using a concrete everyday example, then give me one practice problem to check my understanding.
  • Role-play: Act as a strict but encouraging creative writing teacher. I will share a paragraph of my writing and you will give specific, direct feedback on what is working and what needs improvement.

 

Practice Exercises

A. Evaluate each of the following AI prompts. Identify what is strong and what is weak, then rewrite each as a stronger prompt.

  1. Write about AI.
  2. Generate an image of a person.
  3. Help me with my code.
  4. Explain history.
  5. Make a music track.

B. Each of the following prompts is missing one or more of the seven elements (task, context, format, tone, constraints, examples, role). Identify what is missing and add it to improve the prompt.

  1. Write an essay about social media. (Missing: audience, length, tone, argument)
  2. You are an expert chef. Help me. (Missing: specific task, constraints, context)
  3. Generate a portrait photograph. (Missing: subject description, lighting, style, technical parameters)

C. Starting with just the task, build a complete prompt for each of the following by adding each element progressively.

  1. Task: Write a product description for a sustainable water bottle. Add: Target audience → Format → Tone → Length → Specific features to mention
  2. Task: Generate an image of a street market. Add: Location and cultural context → Time of day → Lighting → Mood → Style → Camera angle

D. Write a prompt for each of the following tasks using the specified technique.

  1. Chain of thought: Solve a complex business problem.
  2. Few-shot: Write in a specific writing style.
  3. Role prompting: Get expert advice on a specialist topic.
  4. Self-critique: Improve a piece of writing.
  5. Perspective shifting: Analyse a controversial issue.

E. Write one complete, well-structured prompt for each of the following categories.

  1. A text prompt for a professional writing task.
  2. An AI image prompt for a realistic landscape photograph.
  3. A code prompt for a specific programming task.
  4. A chat prompt for a learning and tutoring conversation.

Frequently Asked Questions about AI Prompts

1. What are the best AI prompts for beginners?

The best AI prompts for beginners are those that specify at minimum the task, the desired length, the audience, and the tone. A beginner starting with ‘Write a 300-word blog post introduction for a general audience about the benefits of daily exercise in a warm and encouraging tone’ will get far better results than one using ‘Write about exercise’.

2. How are AI image prompts different from text prompts?

AI image prompts use descriptive visual language (what things look like, how they are lit, what style they are rendered in) rather than instruction language. They describe a scene that the AI should generate rather than telling the AI what to do. Effective AI image prompts include subject description, setting, lighting, mood, artistic style and technical parameters.

3. What is prompt engineering?

Prompt engineering is the practice of designing AI prompts systematically to produce optimal results. Key techniques include chain of thought prompting, few-shot prompting, role prompting, system prompting, self-critique prompting, negative prompting and constraint-based prompting. Each technique is suited to different types of tasks and AI systems.

4. How do I improve my AI prompts?

Improve AI prompts by being more specific about every element: the task, the context, the format, the tone and the constraints. Provide examples of the desired style where possible. Assign a relevant expert role. Evaluate the first output critically, diagnose specifically what is not working, and write targeted follow-up prompts. Save prompts that produce excellent results and adapt them for future tasks.

5. Do different AI tools need different prompts?

Yes. Different AI tools have different strengths, training and conventions. Claude responds particularly well to detailed, explicit instructions and format requirements. Midjourney benefits from rich descriptive language and specific parameter flags for AI image prompts. GitHub Copilot responds best to clear functional descriptions with explicit language and framework context. Understanding each tool's conventions significantly improves results.

ShareFacebookXLinkedInEmailTelegramPinterestWhatsApp

Admissions Open for 2026-27

Admissions Open for 2026-27

We are also listed in