Prompt Engineering
TechniqueDefinition
The practice of crafting inputs to elicit optimal model outputs. Encompasses techniques like chain-of-thought, few-shot examples, role prompting, structured output instructions, and system prompt design.
Related Terms
Chain-of-Thought
A prompting technique where the model is instructed (or naturally encouraged) to output intermediate reasoning steps before a final answer. Dramatically improves performance on multi-step math, logic, and coding problems.
Few-shot Prompting
Providing the model with a small number of input-output examples (shots) in the prompt before asking it to complete a new example. Helps the model understand the desired format, style, or task without fine-tuning.
Zero-shot Prompting
Asking the model to perform a task with no examples — just a description or instruction. Relies on the model's pre-training knowledge. Remarkably capable in modern large models, though few-shot often yields better results for specialized tasks.
Temperature
A sampling hyperparameter controlling output randomness. At temperature 0, the model always picks the most probable next token (deterministic). Higher values increase diversity and creativity. Values above 1.0 introduce significant noise.