# 第四章 提示词设计最佳实践

掌握了提示词的基本结构后，本章将深入探讨一系列经过验证的最佳实践，这些实践源自主流 AI 厂商的官方指南、研究者的实验发现以及从业者的实战经验。

最佳实践不是死板的规则，而是在大量试错和优化中总结出的有效模式。它们帮助提示词设计者避开常见的陷阱，更快地达到期望的效果。同时，这些实践也需要根据具体任务和模型特点灵活调整。

本章将从清晰性原则、结构化技巧、角色设定和迭代优化四个维度，系统性地介绍提示词设计的实用方法。

***

## 本章目标

* 理解本章核心概念与适用场景
* 掌握可复用的提示词/工作流模式
* 能将方法迁移到自己的任务中

## 先修知识

* 建议先阅读上一章或同等基础内容
* 如涉及代码示例，具备基本编程与 API 调用常识

## 本章内容

* [4.1 清晰性与具体性原则](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/04_best_practices/4.1_clarity_specificity.md)
* [4.2 分隔符与结构化表达](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/04_best_practices/4.2_delimiters.md)
* [4.3 角色设定与人格赋予](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/04_best_practices/4.3_role_setting.md)
* [4.4 迭代优化与测试方法](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/04_best_practices/4.4_iteration.md)
* [4.5 系统提示词设计（System Prompt）](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/04_best_practices/4.5_system_prompt_design.md)
* [本章小结](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/04_best_practices/summary.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yeasy.gitbook.io/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/04_best_practices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
