ChatGPT Prompt Engineering for Developers introduces the principles and practical techniques for using Large Language Models through prompting and API-based application development. Developed by DeepLearning.AI in collaboration with OpenAI and taught by Isa Fulford and Andrew Ng, the course focuses on how carefully structured prompts can transform general-purpose LLMs into effective components for solving specific tasks and building AI-powered applications. 

A central part of the course is understanding how instructions, context, examples, and output formats influence an LLM’s response. Two fundamental principles are introduced: writing clear and specific instructions and giving the model time to think. These principles are developed through techniques such as delimiters, structured output formats, checking whether conditions are satisfied, few-shot prompting, specifying intermediate reasoning steps, and asking the model to work through a problem before producing its final response.

The course also introduces an iterative approach to prompt development. Rather than attempting to create a perfect prompt initially, prompts are progressively refined by examining the model’s output, identifying shortcomings, modifying instructions or context, and evaluating the resulting response. This establishes prompt engineering as an iterative development process comparable to other forms of software design and testing.

The techniques are then applied to several common LLM application patterns. Summarizing demonstrates how large amounts of text can be condensed according to specific requirements. Inferring uses LLMs for tasks such as sentiment analysis, classification, topic identification, and information extraction. Transforming covers translation, rewriting, formatting, and spelling and grammar correction, while Expanding demonstrates how shorter inputs can be developed into more complete generated content. 

The final part of the course combines these techniques in the development of a conversational chatbot. This demonstrates the transition from individual prompts toward an application in which a sequence of messages and responses forms a persistent conversational context. Overall, the course provides a practical foundation for understanding prompt engineering as both an interaction technique and an important component of LLM application development.

Topics and techniques

  • Prompt engineering principles – clear instructions, context, delimiters, and structured outputs.
  • Few-shot prompting – providing examples to establish expected behaviour and output.
  • Iterative prompt development – testing, evaluating, and progressively refining prompts.
  • Summarizing – condensing and extracting relevant information from text.
  • Inferring – sentiment analysis, classification, topic identification, and information extraction.
  • Transforming – translation, rewriting, formatting, and language correction.
  • Expanding – generating more extensive content from shorter inputs.
  • Chatbots and conversational context – managing sequences of messages within an LLM application.
  • OpenAI API – integrating prompts and LLM responses into Python applications. 

Practical exercises

The practical exercises are implemented in Python and Jupyter notebooks using the OpenAI API. Each section applies the concepts directly through code examples, allowing prompts to be modified and their effects on model responses to be evaluated. Exercises cover summarizing product reviews, extracting sentiment and topics, translating and correcting text, transforming information between formats, and generating customized content. 

The final exercise develops a chatbot for taking customer orders, combining system and user messages with conversational context to demonstrate how prompting techniques can be incorporated into an interactive application. Together, the exercises establish a practical workflow for designing, testing, and refining prompts as reusable components of LLM-based software systems.

 


DeepLearning.AI
ChatGPT Prompt Engineering for Developers.