Prompt Engineering

Phase Focus Area Key Concepts & Techniques Learning Objectives Practical Exercises & Projects Estimated Duration
1. Foundation Introduction & Basics What is a Prompt, LLM, Completion?
Setting up accounts (ChatGPT, Claude, Gemini)
The importance of clarity and specificity.
Understand the core concepts.
Become comfortable interacting with an AI chat interface.
Observe how input affects output.
Exercise: Ask the same simple question (e.g., “Explain gravity”) in 3 different ways and compare the answers.
Project: Have a conversation with the AI where you ask it to plan a simple event, like a birthday party.
1-2 Weeks
2. Core Principles Fundamental Techniques Specificity & Directness: Avoiding vagueness.
Providing Context: Audience, tone, goal.
Role-Playing: Assigning a persona to the AI.
Iterative Refinement: The art of the follow-up prompt.
Structured Outputs: Requesting JSON, HTML, lists, tables.
Move from simple queries to structured commands.
Learn to control the style and format of the AI’s response.
Exercise: Take a vague prompt (“Write about dogs”) and refine it 3 times using the techniques learned.
Project: Act as a specific professional (e.g., a recruiter) and generate a job description for a “Prompt Engineer” role.
2-3 Weeks
3. Advanced Methods Complex Prompting Strategies Few-Shot Learning: Providing examples to teach patterns.
Chain-of-Thought (CoT): Eliciting step-by-step reasoning.
Template Creation: Building reusable prompt frameworks. Chunking: Breaking down long-form content generation into steps.
Handle complex, multi-step tasks.
Improve accuracy on logical and arithmetic problems.
Create prompts for repeatable, consistent results.
Exercise: Use few-shot prompting to teach the AI a new text classification task (e.g., sorting feedback into Bug, Feature Request, Compliment).
Project: Use CoT to solve a logic puzzle or a word problem. Document the process.
2-3 Weeks
4. Specialization Domain-Specific Application Creative Writing: Story generation, brainstorming.
Code: Generation, debugging, documentation.
Marketing & SEO: Ad copy, social media, product descriptions.
Business: Email drafting, SWOT analysis, summarization.
Apply core techniques to a chosen field of interest.
Understand the specific nuances and best practices for that domain.
Choose a specialty from the list. – Project: Create a portfolio piece for your chosen domain (e.g., for Code: a prompt that generates a Python script from a description; for Marketing: a prompt chain that creates a full email campaign outline). 3-4 Weeks
5. Mastery Automation & Integration Prompt Chaining: Linking multiple prompts for a complex task.
Introduction to APIs: Using OpenAI, Anthropic, etc.
Autonomous Agents: Basics of AutoGPT, LangChain.
Parameters: Using temperature and top_p to control creativity and determinism.
Move from chat interfaces to programmatic control. – Automate workflows and integrate AI into other applications. Exercise: Use a no-code tool like Zapier to connect ChatGPT to a Google Sheet to summarize new data automatically.
Project: Build a simple chatbot for a specific purpose using the OpenAI API playground.
Ongoing
6. Continuous Learning Community & Trends Following research papers and industry leaders.
Participating in communities (Reddit, Discord, Twitter).
Experimenting with new models and platforms.
Stay current with the rapidly evolving landscape.
Learn from and contribute to the community.
Join r/promptengineering or similar Discords.
Share a successful prompt template you’ve created and explain why it works.
Test your best prompts on newly released models.
Ongoing
What is a Prompt?

A prompt is the set of instructions, questions, or information you give to an AI (like ChatGPT). It’s your way of guiding the AI to produce the specific output you’re looking for.

Imagine you’re giving instructions to a brilliant, super-fast, but very literal assistant. This assistant has read almost everything on the internet, but it doesn’t know what you want unless you tell it clearly.

In simple terms: A prompt is your question or command to the AI.

The quality and clarity of your prompt directly determine the quality and usefulness of the AI’s response. A vague prompt will get a vague, generic answer. A detailed, well-crafted prompt will get a detailed, specific, and useful answer.

Example 1: The Bad Prompt (Too Vague)

  • Prompt: Pizza

  • What’s wrong with it? This is just a topic. The AI has no idea what you want. Do you want a history of pizza? A recipe? A poem? It will guess, and the result will be random.

  • Likely AI Output: A generic paragraph like, “Pizza is a dish of Italian origin consisting of a usually round, flat base of leavened wheat-based dough topped with tomatoes, cheese, and often various other ingredients…”

Example 2: The Better Prompt (It has a goal)

  • Prompt: Tell me about pizza.

  • What’s improved? We’ve given a command (Tell me about). This is better than just a word.

  • What’s still wrong? It’s still incredibly vague. “About” could mean its history, how it’s made, its cultural impact, etc. The AI will still give a generic summary.

  • Likely AI Output: A broad overview covering the origin of pizza, common ingredients, and its global popularity.

Example 3: The Good Prompt (Specific and Clear)

  • Prompt: Explain the history of pizza, starting from its origins in Italy to its popularity in the United States.

  • What’s improved?

    • Command: Explain

    • Topic: the history of pizza

    • Scope: from its origins in Italy to its popularity in the United States

  • Why it works: The AI now has a clear structure to follow. It knows the subject (history), the starting point (Italy), and the ending point (US popularity).

  • Likely AI Output: A structured response covering 18th-century Naples, Margherita pizza, post-WWII soldier influences, and the rise of pizza chains in the US.

Example 4: The Excellent Prompt (Adds Context and Format)

  • Prompt: Act
    as a food historian. Write a brief, engaging summary of the history of
    pizza for a middle school audience. Focus on how it spread from Italy to
    America. Format the key events as a timeline with bullet points.

  • What’s improved?

    • Role-Playing: Act as a food historian (This puts the AI in a specific expert role)

    • Context & Audience: for a middle school audience (This dictates the language complexity)

    • Style: engaging summary (Not a dry, academic paper)

    • Focus: how it spread from Italy to America (Narrows the scope further)

    • Format: Format the key events as a timeline with bullet points (Dictates the structure of the answer)

  • Why it works: This prompt leaves almost nothing to chance. It tells the AI who to be, what to write, who it’s for, how to write it, and what it should look like. The result will be highly tailored and immediately useful.

Expected Output:

  • Late 18th Century: The modern pizza is born in Naples, Italy, as a cheap, quick meal for the working class.

  • 1889: Pizza Margherita is created, featuring the colors of the Italian flag (red tomatoes, white mozzarella, green basil) to honor Queen Margherita.

  • Early 1900s: Italian immigrants bring pizza to American cities like New York and Chicago.

  • 1945-1950s: American soldiers returning from Italy crave pizza, helping it gain popularity. The first pizza chains, like Pizza Hut (1958), are founded.

  • Today: Pizza is a global food phenomenon, with countless regional styles.


The Recipe for a Great Prompt

You can use this simple checklist to craft excellent prompts:

  1. Task: What do you want the AI to do? (Write, explain, list, translate, summarize, etc.)

  2. Context: What background information is needed? (Who is the audience? What is the goal?)

  3. Role: Who should the AI pretend to be? (An expert, a chef, a programmer, a supportive friend?)

  4. Format: How should the answer look? (Bullet points, essay, table, JSON, code?)

  5. Tone: What should the answer sound like? (Professional, casual, funny, empathetic?)

You don’t always need all five, but the more you use, the better your result will be.

Final Thought: Prompting is a conversation. If the AI’s first response isn’t perfect, refine your prompt based on what you got. Ask for more detail, a different tone, or a correction. That’s the true art of prompt engineering!

Example 1: The Bad Prompt (The Word Dump)

  • Prompt: Spanish

  • What’s wrong with it? This is just a subject. The AI has zero direction. It might give you a history of Spain, the etymology of the word “Spanish,” or a random fact.

  • Likely AI Output: “Spanish is a Romance language that originated in the Iberian Peninsula. It is the world’s second-most spoken native language…”

Example 2: The Better Prompt (The Basic Question)

  • Prompt: How do I learn Spanish?

  • What’s improved? We’ve asked a clear question (How do I). This is a great start for a beginner.

  • What’s still wrong? It’s a massive question with a million answers. The response will be a generic list of advice you could find on any blog, with no personalization.

  • Likely AI Output: “Here are some tips to learn Spanish: 1. Take a class. 2. Use a language app. 3. Practice with native speakers. 4. Watch Spanish movies…”

Example 3: The Good Prompt (Adding Personal Context)

  • Prompt: I
    am a complete beginner English speaker with a goal to travel to Mexico
    in 6 months. What is a 3-step plan to learn basic conversational
    Spanish?

  • What’s improved?

    • Context: I am a complete beginner English speaker

    • Goal/Motivation: goal to travel to Mexico in 6 months

    • Specific Ask: 3-step plan, basic conversational Spanish

  • Why it works: The AI can now filter out advice for advanced learners (like reading novels) and irrelevant languages (Castilian Spanish vs. Mexican Spanish nuances). It can create a time-bound, actionable plan.

  • Likely AI Output: A focused plan like: “Step 1: Foundation (Months 1-2): Focus on a app like Duolingo for basics… Step 2: Practical Phrases (Month 3-4): Learn travel-specific vocabulary… Step 3: Practice (Month 5-6): Use a platform like iTalki to practice conversations with a tutor from Mexico…”

Example 4: The Excellent Prompt (The Personalized Tutor)

  • Prompt: Act
    as a friendly but expert language coach. Your student is a busy nurse
    who only has 20 minutes to practice on their days off. They need to
    learn key medical Spanish phrases to better communicate with patients
    (e.g., "Where does it hurt?", "Are you allergic to any medication?").
    Create a structured 5-minute daily practice routine for a week,
    formatted as a table. The phrases should use Mexican Spanish.

  • Let’s break down why this is excellent:

    • Role: Act as a friendly but expert language coach (Sets the tone and expertise)

    • Audience/Context: a busy nurse, only has 20 minutes to practice on their days off (Extremely specific constraints)

    • Goal: learn key medical Spanish phrases to better communicate with patients

    • Examples: "Where does it hurt?", "Are you allergic to any medication?" (Provides clear examples of the desired output style)

    • Format: Create a structured... routine... formatted as a table (Dictates a clean, easy-to-follow structure)

    • Dialect: The phrases should use Mexican Spanish (Crucial specificity)

Expected AI Output:

DayFocusPhrase (English)Phrase (Spanish – MX)Pronunciation Tip
1Greetings“Good morning, my name is [Name]. I’m your nurse today.”“Buenos días, me llamo [Nombre]. Soy su enfermera hoy.”“BWAY-nos DEE-as, may YAH-mo…”
2Asking Symptoms“Where does it hurt?”“¿Dónde le duele?”“DON-day lay DWEH-lay?”
3Asking Symptoms“On a scale of 1 to 10, what is your pain level?”“Del uno al diez, ¿cuál es su nivel de dolor?”“Del OO-no al dee-ES, kwal es soo nee-VEL day doh-LOR?”
4Medical History“Are you allergic to any medication?”“¿Es alérgico/a a algún medicamento?”“Es ah-LAIR-hee-koh/kah ah ahl-GOON meh-dee-kah-MEN-toh?”
5Instructions“You need to take this with food.”“Tiene que tomar esto con comida.”“Tee-EH-nay kay toh-MAR ES-toh con koh-MEE-dah.”

This output is no longer generic information. It’s a personalized, immediately usable tool created just for that nurse.

The Takeaway

A powerful prompt transforms the AI from a search engine (that gives you general information) into a skilled expert (who creates a custom solution for your specific problem).

Your turn! Think of something you want to know. Try to write a prompt for it using the checklist:

  1. Task (What should it do?)

  2. Context (What does it need to know about me and my situation?)

  3. Role (Who should it be?)

  4. Format (How should it look?)

  5. Tone (How should it sound?)