From the course: Prompt Engineering: How to Talk to the AIs

What is prompt engineering? - GPT Tutorial

From the course: Prompt Engineering: How to Talk to the AIs

What is prompt engineering?

- Prompt Engineering is a very recent but rapidly growing discipline that has the goal of designing the optimal prompt, given a generative model and a goal. Prompt engineering is growing so quickly that many believe that it will replace other aspects of machine learning, such as feature engineering or architecture engineering for large neural networks. Prompt engineering requires some domain understanding to incorporate the goal into the prompt. One example would be by determining what good and bad outcomes should look like and prompt engineering also requires understanding of the AI model. Different models will respond differently to the same kind of prompting. Generating prompts at some scale requires a programmatic approach. At the most basic level, you want to generate prompt templates that can be programmatically modified according to some dataset or context. As a simple example, let's say if you have a database of people with a short blurb about them, similar to the one I used in the college essay example from earlier. The prompt template would become something like, Given the following information about USER, write a four paragraph college essay: USER_BLURB. And the programmatic approach to generating college letters for all users would look something like this. Note how this is a simple for loop that is going across all the students in the database, taking information about each user and the blurb for that user, integrating it into the prompt, and then calling GPT with that prompt. Finally, prompt engineering, as with any engineering discipline, is iterative and requires some exploration in order to find the right solution. While this is not something that is readily available or common nowadays, prompt engineering will require many of the same engineering processes as software engineering, for example, version control, QA, and regression testing. And on that note, it's interesting there are many prompt engineering tools that are becoming available as we speak.

Contents