Skip to Main Content

Generative AI and Chatbots

This guide offers advice on generative AI chatbots and tools and how to best use them to support your work.

Prompt Optimization Definition

Prompt optimization (also called prompt engineering) "is the process of creating and refining prompts to optimize the performance of a language model or chatbot. A prompt is a piece of text that provides context and guidance for generating a response to a user query. It typically consists of a short phrase or sentence that describes the desired outcome of the conversation." (Banik 2023)

Prompt optimization basics

Be as specific as you can. The better information you give to a chatbot, the better response you will get. 

Consider including information about: 

  • Audience: Who is the response intended for? (e.g. respond at a 6th grade reading level)

  • Tone: What tone is appropriate for the context? (e.g. a professional business letter? A humorous response?) 

  • Length: How long should the response be? (e.g. summarize the article in one paragraph, list the top 5 things related to my topic) 

  • Format: Is there a specific way the response should be formatted? (e.g. bullet points for a PowerPoint presentation, sort the results by date oldest to newest) 

  • Role: What is the context for the query? Who is doing the asking? (e.g. "imagine you are...", "act as if...")

Example: Provide a list for a camp counselor of 10 fun outdoor activities for a group of 12-year-olds that will make them want to spend more time outside and away from screens.

More advice for fine tuning prompts

Here are some additional technique for improving chatbot responses:

  • Articulate the desired output format through examples   

  • Avoid saying what not to do but say what to do instead   

  • Interacting with chatbots can be iterative. Break questions into smaller steps and build.

  • Ask follow-up questions if you don’t get the response you were expecting. 

  • Be prepared to rephrase and correct the chatbot

  • Use a clear separator like "###" to separate the instruction and context ​

  • Use the key command Shift + Enter to create line breaks in ChatGPT and write multiline prompts

Prompt Optimization Resources