足ることを知らず

Data Science, global business, management and MBA

Day 140 MIT Sloan Fellows Class 2023, ChatGPT 2 "Basics of Prompt Engineering"

 

What is "prompt engineering"?

Prompt engineering is a relatively new discipline for developing and optimizing prompts to efficiently use language models (LMs) for a wide variety of applications and research topics. Prompt engineering skills help to better understand the capabilities and limitations of large language models (LLMs).

 www.promptingguide.ai

Prompts 101

Prompts has four different elements as components. 

  • Instruction - a specific task or instruction you want the model to perform
  • Context - can involve external information or additional context that can steer the model to better responses
  • Input Data - is the input or question that we are interested to find a response for
  • Output Indicator - indicates the type or format of the output.

Instruction has several types, but let me line up some of them. 

  • Summarize
  • Translate
  • Order/prioritize
  • Classify
  • Write
  • Create

An effective prompt is crucial to obtain accurate and relevant responses from the AI model. Here are a few techniques to help you write better prompts:

  • Be specific and clear: Make your prompt as precise as possible to guide the AI model towards the desired answer. Avoid ambiguous or vague questions.
  • Provide context: Include relevant background information or specify the format you want the response in to help the AI understand your requirements better.
  • Keep it concise: Although ChatGPT can handle long prompts, it's better to keep them short and to the point to avoid overwhelming the model.
  • Use prompt engineering: Experiment with different phrasings or approaches to your question. This can include asking the AI to think step-by-step or debate pros and cons before giving a final answer.

You can find good examples and bad examples from the link as follows. For example, you should avoid specifying "not to do". You should always specify what to do instead.

This is the official help link from OpenAI, so it would be the most accurate source in the existing publications. 

help.openai.com

Also, here is an article about fine-tuning. 

docs.google.com

Updating Prompts for ChatGPT-4
ChatGPT-4 brings improvements in language understanding and response generation. To make the most of these advancements, you can update your prompts by:

  1. Expanding context: ChatGPT-4 has an increased context window, so you can provide more detailed information to get more accurate and relevant responses.
  2. Requesting more depth: Feel free to ask for deeper insights or more complex answers, as ChatGPT-4 is capable of handling them better than its predecessors.
  3. Utilizing new features: Take advantage of any new features or capabilities introduced in ChatGPT-4 to enhance your prompt and get more refined responses.
  4. New information: Compared to GPT 3.5, GPT4 was trained with relatively new data sources.