Zero-shot learning refers to an LLM’s ability to perform a task it was not explicitly trained on, based solely on a natural language description. Few-shot learning provides a small number of input-output examples within the prompt to guide the model’s behavior. Both techniques are forms of in-context learning — adapting model behavior through the prompt rather than retraining. Few-shot prompting significantly improves output quality and consistency for specialized tasks, making it a key technique in prompt engineering.