Foundations in Prompt Engineering
Lessons in this section
- Prompt Engineering
What a prompt is, what prompt engineering means, the four things every good prompt says, how to check replies by their result, and the write, run, check, improve loop.
- Understanding Prompts
What the model really receives: system, user and assistant messages, the chat template, why the whole chat is re-sent, instructions versus data, vague words, and dos versus don'ts.
- Prompt Structure
The six parts of a prompt (role, instruction, context, examples, input, output format), labelling them with headings or tags, a good order, templates, and checking the output format.
- Context and Grounding
Give the model the facts it needs: grounded prompts, picking the right context, letting the model say I don't know, asking for sources and checking them, and fitting context in the window.