Prompt and Agent Engineering
摘要
Prompt and agent engineering explain how clear instructions and persistent roles drive reliable generative AI outcomes. The chapter outlines three prompting strategies—iterative refinement, all-in-one prompts, and letting the model ask clarifying questions—along with trade-offs such as time and energy use. It introduces practical frameworks (ICIO for completeness and RACE for speed) plus lighter patterns like APE, TAG, RISE, and COAST, noting that one-shot prompting usually balances clarity and consistency well. Techniques such as chain-of-thought and prompt chaining can improve reasoning and structure but may increase complexity and carbon footprint, so they’re best applied judiciously. System prompts anchor safety, tone, and scope; agent engineering ranges from off-the-shelf to no−/low−/full-code approaches; and governed prompt/agent libraries enable reuse, standardization, and maintenance across teams.