Prompting
摘要
In this chapter, we delve into the prompting techniques, a key method for interacting with large language models. Prompting is defined as the process of guiding model behavior through crafted prompts, without updating the model’s parameters. The chapter begins by introducing the foundational principles of prompting, emphasizing its roots in in-context learning–a technique where models learn from examples provided within the prompt itself. The discussion then categorizes prompting methods into three distinct types: Standard Prompting, which uses straightforward task descriptions and examples; Elicitive Prompting, which enhances reasoning by providing step-by-step guidance; and Prompt Chaining, which involves chaining multiple prompts to handle complex tasks. Each category is explored in detail, including strategies for optimizing prompt design to maximize model performance. The chapter also highlights the challenges of effectively implementing prompting with smaller language models and the importance of prompt engineering in improving interaction outcomes. Note that the Prompting chapter also serves as a comprehensive overview of Inference-Time Scaling (also known as Test-Time Scaling) techniques. In this context, Prompting is not limited to modifying input prompts, but encompasses a broader set of methods–including output planning, branching, and other decoding strategies performed at inference time–to enhance model reasoning and adaptability. Thus, the discussion in this chapter addresses the full spectrum of Inference-Time Scaling approaches.