我以为我懂得如何与 AI 对话:其实并不懂
Source: Dev.to

我第一次向 ChatGPT 求助时,输入了:“帮我写一段降噪耳机的产品描述。”
它给了我一堆垃圾。我把错怪在 AI 身上,但问题出在我自己。
“清晰”并不意味着“冗长”
几个月来,我写了很多冗长的提示,解释每一个细节,但结果仍然时好时坏。后来我学到了一个简单的技巧:分隔符。
- 分隔符就是你在提示中划出的界线,用来说明:“这部分是我的指令。这部分是我希望你处理的内容。不要把两者混在一起。”
- 可以把它想象成会议中在白板上写字。你不会把所有内容随意涂在一起形成一个大块,而是画框、给标题加下划线,把问题与解决方案分开。
- 分隔符的作用正是如此:它们防止你的指令渗入内容,使 AI 能准确分辨哪部分是指令,哪部分是内容。
常见的分隔符包括三引号 """、XML 标签或简单的破折号 ---。任选一种你觉得自然的方式即可。
Role:
You are an AI writing assistant for students.
Task:
Improve clarity; keep it short; avoid complex words.
Rules:
- Do not change meaning
- Output only the improved text
- No extra explanations
Input | Metadata:
topic: AI prompting | level: beginner | tone: casual
---
Original text:
"""
AI works good but sometimes it gives wrong answers because the question is not clear.
"""
---
Output format:
improved_text:
Source:
停止催促 AI(以及你自己)
我过去把 AI 当成自动售货机:输入 → 按下 → 期待完美。后来有人告诉我,要给模型结构——而不是字面上的时间。
首先,分析问题
A train travels 60 km in 1.5 hours.
The speed of the train is constant.
We are asked to find the time required to travel 100 km at the same speed.
So this is a speed–distance–time problem.
然后,确定方法
We can solve this by:
1. Calculating the speed of the train, then
2. Using the same speed to find the time for 100 km
Formulae involved:
Speed = Distance ÷ Time
Time = Distance ÷ Speed
最后,给出你的解答
Calculate speed:
Speed = 60 km ÷ 1.5 hours
Speed = 40 km/h
Now calculate time for 100 km:
Time = 100 km ÷ 40 km/h
Time = 2.5 hours
差距非常大。
四种有效的提问方式
零样本
只给指令,不提供示例。任务直接时有效。
Prompt:
Roast my coding skills.
输出: 你的代码能运行,但连它自己都对这点感到惊讶。
少样本
提供多个示例以展示明确的模式。我的首选,用于保持一致性。
Prompt:
Roast my coding skills.
Examples:
"Your variable names are so creative, even you forget what they mean."
"Your code has comments because future‑you will be very confused."
Now roast me.
输出: 你的代码像一本悬疑小说——篇幅冗长、令人困惑,结局几乎说不通。
基于上下文
背景 + 约束 + 问题。彻底改变局面。
Prompt:
Context:
I’m a student who codes regularly.
This roast can be harsh.
Tone should be playful and relatable.
Task:
Roast my coding skills in one line.
输出: 你的代码能跑,是因为 bug 已经累得懒得反抗。
最终让它点通的原因
我不再把提示视为“给出指令”。我开始把它当作与想要帮助你但需要确切了解你需求的人交谈。你不会对同事说“Do the thing”。你会提供背景、约束、示例。这就是一个好提示的全部。
开始
- 使用分隔符。
- 将你的指令与内容分开。
仅此就能改变你的结果。一旦你意识到 AI 不是你指挥的工具,而是与你交流的合作伙伴,其他的自然会到来。你们共同构建的质量取决于你对想要构建的东西的沟通有多清晰。