> For the complete documentation index, see [llms.txt](https://yeasy.gitbook.io/prompt_engineering_guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yeasy.gitbook.io/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/03_prompt_structure.md).

# 第三章 提示词的基本结构

掌握了大语言模型的基础知识后，本章将进入提示词设计的核心内容——如何构建一个结构良好、表达清晰的提示词。就像写作需要遵循一定的结构和规范，提示词设计也有其内在的逻辑和组成要素。

一个有效的提示词不是随意堆砌的文字，而是经过精心组织的信息集合。它需要清晰地传达任务目标、提供必要的上下文、展示期望的输出格式，并在需要时给出示例或约束条件。不同的结构元素相互配合，共同引导模型产出高质量的结果。

本章将系统性地介绍提示词的核心组成要素，探讨各个要素的作用和设计原则，并通过丰富的示例帮助读者理解如何将这些要素有机地整合在一起。

***

## 本章目标

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

## 先修知识

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

## 本章内容

* [3.1 提示词的核心组成要素](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/03_prompt_structure/3.1_core_elements.md)
* [3.2 指令设计的基本原则](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/03_prompt_structure/3.2_instruction_principles.md)
* [3.3 上下文与背景信息的提供](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/03_prompt_structure/3.3_context.md)
* [3.4 输出格式的定义与约束](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/03_prompt_structure/3.4_output_format.md)
* [3.5 结构化输出的定义与约束](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/03_prompt_structure/3.5_structured_output.md)
* [本章小结](/prompt_engineering_guide/di-yi-bu-fen-ji-chu-pian/03_prompt_structure/summary.md)
