Prompt Engineering

The art of talking to the machine.

Techniques

Zero-Shot

Asking the model to do something without examples.
"Classify this text as positive or negative."

Few-Shot

Providing examples to guide the output format.
"Input: Great job. Output: Positive. Input: This is bad. Output: Negative. Input: Not bad. Output: "

Chain of Thought (CoT)

Asking the model to explain its reasoning step-by-step. Greatly improves math and logic performance.
"Let's think step by step."

System Prompting

Setting the persona and constraints at the beginning of the conversation.
"You are a helpful Python coding assistant. Only answer with code."