← Table of Contents · Page 43 of 868

THE THREE DISCIPLINES AROUND THE MODEL

Part 2 of 11

PROMPT ENGINEERING Prompt engineering is the practice of crafting the instructions for a single interaction with a model so that the response is as useful as possible. A prompt is the input text, as you learned in Chapter 3. Prompt engineering is about the wording, structure, and content of that text. Typical techniques include stating a clear role for the model, describing the audience, specifying the format of the answer, giving examples of good output, and breaking a request into steps. A technique that gives the model sample inputs and outputs inside the prompt is called few-shot prompting, where few-shot means a small number of examples. Consider the plain request "summarize this." It is vague, so the model must guess the length, the audience, and the focus. Rewriting it as "summarize this in three bullet points for a busy executive, focusing on financial risk" tells the model exactly what to produce. Prompt engineering is valuable, easy to start with, and requires no programming. But its reach is limited to the one interaction in front of you. It cannot, on its own, make an agent remember last week, recover from a crashed tool, or stop itself from deleting the wrong file.
Advertisement
Read Aloud:
0:00 / 0:00