Skip to Main Content

Prompt Engineering

Prompt Engineering

AI prompt

Prompts are the instructions used to ask a large language model to perform a task and create an output. The more specific instructions you can give the generative AI, the better output you're going to get. Prompting generative AI each step of the way guides it to ensure consistency and keeps the AI on topic. 

Whether you're asking a question or providing additional context, you are prompting the language model to perform a task for you. A prompt consists of a few words, a single sentence or paragraphs. Successful prompt crafting influences the quality and relevance of the generated output and the user's satisfaction in the answer. Providing as much instruction and context as you can to a large language model, like ChatGPT, will bring back a more helpful output to the task you've asked. 

Some common tasks that LLM's can perform are:

  • text generation
  • image generation
  • questions & answer
  • problem-solving
  • writing code
  • data analyzation
  • text summarization & synthesizing
  • language translation

The way you engineer or craft a prompt makes a huge difference in the output that ChatGPT gives you. So it's worth learning some tips.


  • Always verify the information it gives you. Think of ChatGPT as your personal intern. They need very specific instructions, and they need you to verify the information.
  • ChatGPT sometimes makes things up. That's because it's designed to write in a way that sounds like human writing. It's not designed to know facts.
  • Learn more about AI hallucinations in Evaluating AI Outputs.

Tips for writing effective prompts

  1. Give it some context or a role to play.
  2. Give it very detailed instructions, including how you would like the results formatted.
  3. Keep conversing and asking for changes. Ask it to revise the answer in various ways.

Examples

  1. A role could be, "Act as an expert in [fill in the blank]." 
    Act as an expert community organizer.
    Act as a high school biology teacher.
    Act as a comedian.
     
  2. Example prompt:
    Act as an expert academic librarian. I’m writing a research paper for Sociology and I need help coming up with a topic. I’m interested in topics related to climate change. Please give me a list of 10 topic ideas related to climate change.
     
  3. Example of changes: (keep conversing until you get something useful)
    Now give me some sub-topics or research questions for [one of those topics]. And give me a list of keywords and phrases I can use to search for that topic in library databases and Google Scholar.
     

    Or...

    I didn't like any of those topics. Please give me 10 more.

Check out

Cover Art

Prompt Engineering for Generative AI by James Phoenix, Mike Taylor

Publication Date: 2024

This book offers strategies and practical guidance for crafting prompts. Includes tips and tricks, along with general concepts.

Tips for Chat GPT

  1. When you want to change the subject, start a new chat.
     
  2. It will remember what you've said in the course of a conversation, so you don't have to repeat everything again. Just continue like you're talking to your intern.

    As of March 2025 there is a new feature in ChatGPT where you can let it reference previous conversations. You can activate this feature by clicking on your name, Settings, Personalization. Look for the button called "reference chat history" and turn it on. (Turn on "reference saved memories" first, to see the button).
     
  3. Choose an output format. In addition to paragraphs it can give you a table, a bulleted list, ascii art, multiple choice quiz questions, emojis, computer code, and more.
     
  4. In ChatGPT you can see a history of your conversations. You can go back to a previous conversation and continue it. If you like, in the settings you can delete your history and turn off the saving of future history. You can also export your history and save it on your own computer.
     
  5. Remember, don't enter any personal, private data in ChatGPT. Learn more in How can I protect my privacy when using ChatGPT?, which also discusses other models.

Attribution