AI Collaboration: How to Get the Best Results with Prompting

The Power of Prompting – Mastering Communication with GPT-3/4

1.  The Prompt Paradigm Shift

  • Explanation: Unlike traditional coding, you're communicating your intent to an AI with natural language. Precision and clarity are key.
  • Example:
    • Poor Prompt: "Write me a funny story"
    • Better Prompt: "Write a funny story about a squirrel who accidentally joins a circus. Use a surprised and playful tone."

2. The Core Six: Essential Prompting Components

  • Context:
    • What: Background info for the AI. Sets the stage for everything else.
    • Why It Matters: Without context, the AI might generate irrelevant or wrong output.
    • Example: "I'm writing a sci-fi novel set in a space colony" before asking for character name ideas.
  • Task:
    • What: Explicitly tell the AI what to DO (write, translate, summarize, etc.).
    • Why It Matters: Avoids ambiguity. Model can't guess your intention.
    • Example: "Translate this paragraph from English to Spanish" vs. just pasting the paragraph.
  • Exemplars:
    • What: Examples of the desired output style/format. Guides the AI by example.
    • Why It Matters: Especially helpful for creative tasks, prevents generic output.
    • Example: Providing a few haiku poems when asking the model to write one.
  • Persona:
    • What: Instructing the AI to adopt a "voice" (formal, sarcastic, etc.). Mostly for creative tasks.
    • Why It Matters: Influences word choice for a more nuanced response.
    • Example: "Write the weather forecast as if you are a grumpy pirate."
  • Format:
    • What: Specify if you want text, code, bullet points, etc.
    • Why It Matters: Prevents misinterpretation.
    • Example: "Output a JSON object containing the product name, price, and description"
  • Tone:
    • What: Overall mood (serious, whimsical...). Least important, but it matters!
    • Why It Matters: Affects the vibe of the output, especially for creative work.

3. Mastering GPT-3/4: Creativity and Information

  • Strengths: GPT-3/4 excels at generating creative text, translating languages, writing different kinds of content, and answering your questions in an informative way.
  • Tailored Prompts:
    • Creativity: "Write a poem about the feeling of discovering a hidden waterfall"
    • Information: "Summarize the main differences between mitosis and meiosis"
    • Format-Specific "Write a Python function to calculate a user's BMI"

4.  Practice Makes Perfect (Activity)

  • Prompt Remix: Give students a weak prompt, have them improve it using the components. Run versions to see the difference!

5.  Beyond the Basics (Advanced)

  • Iterative Prompting: Breaking complex tasks into smaller prompts for better results.
  • Prompt Chaining: Using output from one prompt as input for another (e.g., summarize a text THEN write a tweet about the summary).

Daniel Shemer Israel