Official ChatGPT Prompt Engineering Guide From OpenAI

Skill Leap AI
20 Dec 202322:54

TLDROpenAI has released an official guide for prompt engineering with Chat GPT, aimed at enhancing user interaction with AI. The guide offers six strategies for crafting better prompts, including clear instructions, using reference texts, splitting tasks, giving the model time to think, and systematic testing. It also suggests practical tactics like including detailed questions, adopting personas, using delimiters, specifying output length, and summarizing documents piece by piece. This guide is beneficial for developers and everyday users alike, aiming to improve the efficiency and accuracy of AI responses.


  • πŸ“˜ The official prompt engineering guide from OpenAI aims to improve results from Chat GPT by providing clear instructions and tactics.
  • πŸ’‘ Prompt engineering is about giving AI models like Chat GPT the right instructions to get better answers.
  • πŸ“ The guide offers six broad strategies for improving prompts, each with practical tactics and examples.
  • πŸ” The first strategy is to write clear instructions, emphasizing the need for detail and context in prompts to avoid frustration.
  • 🎭 A tactic under clear instructions is to ask the model to adopt a persona, which can influence the style and content of responses.
  • πŸ“‘ Use delimiters to indicate distinct parts of the input, which helps refine output when dealing with complex prompts.
  • πŸ“ Specify the steps required to complete a task in the prompt to guide the AI through a process.
  • πŸ“š Providing reference text helps the model give answers that are relevant and informed by specific sources.
  • πŸ“ Splitting complex tasks into simpler subtasks can prevent information loss and improve task handling by the AI.
  • ⏱ Giving models time to think involves instructing them to work out their own solutions before comparing to given answers.
  • πŸ”§ Systematic testing of changes helps in refining prompts to consistently achieve better results with Chat GPT.

Q & A

  • What is the purpose of the official prompt engineering guide released by OpenAI?

    -The purpose of the official prompt engineering guide is to provide instructions on how to give AI models like Chat GPT the right set of instructions to yield better answers.

  • Why is it important to write clear instructions when using Chat GPT?

    -Writing clear instructions is important because it helps Chat GPT understand what is being asked and provides more relevant and accurate answers, as AI models cannot read minds and require detailed context.

  • What is the first broad strategy mentioned in the guide for improving prompts?

    -The first broad strategy mentioned in the guide is to write clear instructions, which involves giving Chat GPT as much detail and context as possible.

  • Can you provide an example of how to include details in a question for Chat GPT?

    -Instead of asking 'How do I add numbers to Excel?', you could provide more context like 'How do I add a row of dollar amounts in Excel and do this automatically?' to get a more relevant answer.

  • What is the concept of adopting a Persona when interacting with Chat GPT?

    -Adopting a Persona involves asking Chat GPT to respond as if it had a specific background or role, such as a business consultant or a friendly scientist, to tailor the response style and content.

  • How can delimiters be used to improve prompts for Chat GPT?

    -Delimiters like triple quotation marks or specific formatting can be used to clearly indicate distinct parts of the input, which helps Chat GPT understand the structure and context of the prompt better.

  • What is the significance of specifying the steps required to complete a task in a prompt?

    -Specifying the steps required helps Chat GPT understand the order and importance of tasks, allowing it to work through problems more efficiently and provide more accurate outputs.

  • Why is providing examples a useful tactic when crafting prompts for Chat GPT?

    -Providing examples gives Chat GPT a clear format or structure to follow in its response, which can help in getting the desired output more consistently.

  • How can specifying the desired length of the output help in getting better results from Chat GPT?

    -Specifying the desired length, such as asking for two paragraphs or three bullet points, helps Chat GPT understand the expected scope and format of the response, leading to more precise and relevant answers.

  • What is the second broad strategy discussed in the guide for improving prompts?

    -The second broad strategy is providing reference text, which involves giving Chat GPT a specific resource to reference in its response, ensuring the output is tailored to that source.

  • Can you explain the tactic of splitting complex tasks into simpler subtasks?

    -Splitting complex tasks into simpler subtasks helps Chat GPT manage and process information more effectively by breaking down the prompt into manageable parts, reducing the chance of losing context or details.



πŸ“˜ Prompt Engineering Basics

The script introduces OpenAI's official guide for prompt engineering with Chat GPT, aimed at developers using the API. It simplifies the guide for non-developers, focusing on practical prompts to enhance results. The document outlines six strategies for improving prompts, with tactics and examples provided. The first strategy emphasizes the importance of clear instructions, including giving detailed context and adopting personas to guide the AI's responses.


πŸ” Enhancing Prompts with Delimiters and Examples

This section discusses the use of delimiters to indicate distinct parts of the input, which helps in refining output, especially for complex prompts. It also covers the tactic of specifying steps required to complete a task, ensuring the AI understands the sequence of actions. Providing examples is highlighted as a way to guide the AI to produce responses in a desired format, and specifying the desired length of the output is also discussed to control the response's extent.


πŸ“š Utilizing Reference Text and Subtasks

The third strategy involves using reference text to guide the AI's answers, ensuring the responses are relevant to the provided material. It also touches on the importance of splitting complex tasks into simpler subtasks to avoid confusion and improve accuracy. Techniques such as intent classification and summarizing or filtering previous dialogues are mentioned to enhance the AI's performance in handling long conversations or documents.


πŸ€– Giving Models Time to Think

This part of the script focuses on allowing the AI model time to process information before providing an answer. It suggests tactics like working out the model's own solution to a problem before comparing it to a given one, and using inner monologue to streamline the thought process. The script also recommends asking the model to review its previous responses to ensure nothing was missed, emphasizing the importance of context and thoroughness in prompt engineering.


πŸ› οΈ Advanced Prompt Engineering Techniques

The script delves into advanced techniques for prompt engineering, including the use of external tools and APIs to enhance knowledge retrieval. It discusses the potential of building custom GPT models with specific knowledge bases and the systematic testing of prompt changes to improve output quality. The importance of repeatable tests and documenting changes for continuous improvement is highlighted.

πŸ“ˆ Systematic Testing and Learning Resources

The final part of the script emphasizes the need for systematic testing of prompts to identify the most effective ones. It suggests keeping a record of changes and their outcomes to streamline the process of refining prompts. The speaker also introduces Skill Leap AI, a platform offering courses on AI tools and prompt engineering, and mentions the availability of a PDF guide and other resources for further learning.



πŸ’‘Prompt Engineering

Prompt Engineering refers to the art of crafting instructions for AI models like Chat GPT to elicit the most accurate and relevant responses. It is central to the video's theme as it discusses strategies for improving prompts to get better results from AI. For example, the script mentions 'the whole concept of prompt engineering is to give Chat GPT and other AI models, like it the right set of instructions so you get better answers.'


API stands for Application Programming Interface, which is a set of rules and protocols that allows different software applications to communicate with each other. In the context of the video, it refers to the use of Chat GPT's API for developers to integrate its capabilities into their applications. The script specifies that 'this official guide is technically for developers when using the API.'


In the script, adopting a 'Persona' is a tactic where the AI model is asked to take on a specific character or role when generating responses. This is used to tailor the style and content of the AI's output to match a particular perspective or expertise. An example given is 'ask the model to adopt a Persona so this is one of my favorites, imagine yourself as a business consultant or act as a business consultant.'


Delimiters are symbols or characters used to define the boundaries of a section of text, making it distinct from the rest. In the video, they are used to indicate different parts of the input to help the AI model understand the structure of the prompt better. The script explains, 'use delimiters to clearly indicate distinct parts of the input.'

πŸ’‘Reference Text

Reference text is a source material provided to the AI model to inform its responses. The video suggests using reference text to ensure the AI's output is grounded in specific information. The script mentions, 'instruct a model to answer using reference text,' emphasizing the importance of giving the AI specific resources to reference in its answers.


Subtasks are smaller, manageable parts of a larger, more complex task. The video discusses breaking down complex tasks into simpler subtasks to improve the AI's performance. An example from the script is, 'splitting complex tasks into simpler subtasks,' which helps in handling lengthy or intricate prompts more effectively.

πŸ’‘Inner Monologue

The concept of 'Inner Monologue' in the video refers to the AI's thought process, which may not always be necessary for the user to see. The script suggests a method where the AI works out a problem internally before providing a concise answer, as in 'use inner monologue, basically, is saying a lot of times it doesn't make sense for the user to see the thought process in the answer.'

πŸ’‘Systematic Testing

Systematic Testing involves making changes to prompts in a controlled and trackable manner to evaluate their effectiveness. The video emphasizes the importance of this approach to refine prompts and improve AI's output. The script advises, 'test changes systematically,' highlighting the need for a methodical process in prompt optimization.

πŸ’‘Knowledge Base

A Knowledge Base is a collection of information or data that an AI model can access to provide informed responses. In the video, it is mentioned in the context of embedding knowledge bases into the AI model to enhance its capabilities. The script refers to it when discussing 'use things that will help you with better knowledge retrieval so, inside of What's called the API cookbook.'

πŸ’‘Skill Leap AI

Skill Leap AI is a platform mentioned in the video that offers courses on AI tools, including Chat GPT and prompt engineering. It is presented as a resource for those who want to learn more about these topics. The script introduces it as 'we have an entire platform called skill leap AI we have well over 15 AI courses.'


OpenAI has released an official prompt engineering guide to enhance Chat GPT's performance.

The guide is primarily for developers but has been simplified for everyday users as well.

Prompt engineering is about providing AI models with the right instructions for better answers.

The document outlines six broad strategies for improving prompts.

Clear instructions are vital, and details in questions should be maximized for relevance.

Adopting a persona for the AI can influence the style and content of responses.

Delimiters can be used to indicate distinct parts of the input for complex prompts.

Specifying the steps required to complete a task can guide the AI more effectively.

Providing examples can help the AI understand the desired format of the response.

Specifying the desired length of the output can help in getting more accurate responses.

Reference text can be used to instruct the model to answer with citations.

Complex tasks can be split into simpler subtasks to improve AI comprehension.

Intent classification can help identify the most relevant instructions for the AI.

Summarizing or filtering previous dialogue can help the AI maintain context.

Models can be given time to think by working out their own solutions before rushing to conclusions.

Inner monologue prompts can help streamline the AI's thought process for clearer answers.

Models can be asked to check their own work for missed details.

Systematic testing of changes can help refine prompts for optimal AI performance.

External tools and knowledge bases can enhance the AI's access to information.

Skill Leap AI offers comprehensive courses on AI tools including Chat GPT.

A free PDF summarizing the strategies and tactics for prompt engineering is available.