# 11.3 常用提示词模式

> 除了 BROKE，还有一些特定的“咒语”能解决特定问题。举个栗子，胜过千言万语。

## 11.3.1 少样本提示：教它“照猫画虎”

有时候，你很难用语言描述清楚你要什么 **风格**。

比如“我要一种赛博朋克且带点忧伤的文字”。AI 可能会写得很矫情。

最简单的办法是 **直接给例子**。

**指令**：

> “请模仿下面的例子，把成语翻译成 Emoji。 例子1：对牛弹琴 -> 🧑🏼🎸🐄 例子2：画蛇添足 -> 🐍🦵❌ 任务：拔苗助长 -> ?”

AI 看了例子，瞬间就能 get 到你的点。这叫 **少样本提示（Few-Shot）**。

这招极其好用，尤其是在做数据清洗、风格模仿的时候。

## 11.3.2 链式思考：逼它“把题算对”

当你问 AI 复杂的数学题或逻辑题时，如果直接问答案，它经常瞎蒙。

比如：“水池进水 3 小时，出水 5 小时...”

这时候，你只要加一句咒语：

> **“请一步一步地思考（Let's think step by step）。”**

在不少推理任务里，加上这类指令通常会让答案更稳定，但并不保证每次都更好，仍需要你做结果核验。

这就像老师让学生写“解题步骤”并检查中间过程，错误更容易被及时发现（关于思维链的进阶技巧，详见 [12.1 节](/ai_beginner_guide/di-san-bu-fen-shi-zhan-ying-yong-ji-qiao/12_prompt_advanced/12.1_chain_of_thought.md)）。

## 11.3.3 指定格式：不要让它乱发挥

从今天起，养成一个好习惯：**永远告诉 AI 你要的输出格式**。

* 不要说：“给我推荐几款手机。”
* 要说：“给我推荐几款手机，**请用 Markdown 表格输出**，列包含：型号、价格、处理器、优缺点。”

**常用的格式咒语**：

* “用 Markdown 表格”（做对比神器）
* “用 JSON 格式”（程序员神器）
* “用 1, 2, 3 清单体”（做总结神器）
* “用代码块”（复制粘贴方便）

## 11.3.4 思考题

我们在教新员工做事的时候，是不是也是这样？

1. 给个模板（Few-Shot）。
2. 让他把做事逻辑讲一遍（Chain of Thought）。
3. 规定好汇报格式（Format）。 **管理 AI，其实就是管理学。**


---

# 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/ai_beginner_guide/di-san-bu-fen-shi-zhan-ying-yong-ji-qiao/11_prompt_basics/11.3_patterns.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.
