Foundations in Prompt Engineering

Lessons in this section

  1. 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.

  2. 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.

  3. 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.

  4. 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.