Skip to main content

Prompts and Outputs

Updated Jan 01, 2025 ·

Overview

A prompt is more than a question; it is carefully crafted. Effective prompts have three traits:

  • Clarity: Reduces ambiguity with relevant context.
  • Specificity: The more specific, the closer to the desired answer.
  • Open-endedness: Allows for creative and non-obvious results.

Example:

  • The context: A chef making a peanut butter sandwich.

    I'm a chef preparing a unique peanut butter sandwich.
  • Specifics:

    Create a peanut butter sandwich using whole grain bread, organic peanut butter, and additional ingredients for a gourmet twist.
  • Open-ended:

    Can you also suggest some unique ingredients or techniques to elevate the flavor and presentation of the sandwich?

Common Pitfalls

Avoid these pitfalls:

  • Overloading: Too much information dilutes the query.
  • Ambiguity: Vague prompts lead to generalized answers.
  • Over-Complication: Jargon or complex phrasing confuses the model.

Refinement is Key

Prompts are iterative. Feedback-driven refinement enhances quality, creating a continuous improvement loop.

Elements of a Prompt

  • Instructions

    • Clear instructions reduce ambiguity.
    • Instead of "What is the name of the monarch?"
    • Specify "What is the name of the current monarch in Denmark?"
  • Persona

    • Adopting a persona ensures relevance and quality.
    • Instead of "Write me a short story,"
    • Use "You are J.K. Rowling. Write me a short story about magic."
  • Output Format

    • Specify the desired format.

    • Example:

      I'm applying for a job as a data scientist. Create a checklist for how I can best prepare.
  • Context

    • Provide background information to guide the response.

    • Example:

      Write a summary with 3 bullet points on Charles Duhigg's book "The Power of Habit". What does it says about habit formation?

Output Control Techniques

Maximizing ChatGPT's potential isn't just about asking the right questions; it's also about steering responses in the right direction. Think of yourself as guiding an informational orchestra to play exactly what you want.

Guiding Acronym

To get the best results, use the acronym SALT:

  • Style: Define the format.
  • Audience: Tailor the content.
  • Length: Decide on short or detailed.
  • Tone: Set the mood.

SALT helps ensure your interactions meet your expectations.

Style

Style shapes the response. Be specific for structured outputs:

  • "Describe the solar system" → paragraph
  • "List the planets in the solar system" → organized list

Example: "Provide steps to make the perfect blueberry pancake."

Audience

Tailor prompts to the audience for relevance:

  • Simple, engaging explanations for kids.
  • Technical details for professionals.

Example: "Explain machine learning like I’m 5."

Length

Control the response length for concise or detailed answers:

  • "Write a haiku about prompt engineering with ChatGPT."
  • Snapshot vs. detailed view, choose as needed.

Tone

Tone adds mood:

  • Formal explanation

  • Casual chat

  • Playful story

Example: "Write a formal recommendation letter for Lauren applying for a senior data science position. Add a humorous sentence about why Mike’s car dealership has the lowest prices in the country at the end of each paragraph." This blends formality with humor effectively.