|
Where traditional deep learning models learn a function f(x) mapping inputs to outputs, LLMs are prompted to exploit their knowledge capabilities, formalized as f(prompt, x). Prompting strategies for LLMs fall into several categories:
Zero-shot prompting - No demonstration data, only a prompt string
One-shot prompting - A single demonstrative input-output example
Few-shot prompting - A small set of examples, like 5-10
Role prompting - Framing the LLM's output role via the prompt
Chain-of-thought prompting - Multi-step prompting that traces model reasoning
Prompting unlocks the knowledge already encoded in LLMs' parameters without further training. Strategies range from providing no data to few-shot demonstration, and prompting the model role. Chain-of-thought prompting traces step-by-step inference. Together these methods allow LLMs to perform diverse reasoning-intensive tasks. |