<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>提示工程 on AI 观察</title><link>https://ai.wujiong.cc/categories/prompt-engineering/</link><description>Recent content in 提示工程 on AI 观察</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Sun, 27 Sep 2026 19:39:24 +0800</lastBuildDate><atom:link href="https://ai.wujiong.cc/categories/prompt-engineering/index.xml" rel="self" type="application/rss+xml"/><item><title>结构化提示词写法：角色、任务、上下文、约束与输出格式</title><link>https://ai.wujiong.cc/posts/2026-09-27-structured-prompt/</link><pubDate>Sun, 27 Sep 2026 19:39:24 +0800</pubDate><guid>https://ai.wujiong.cc/posts/2026-09-27-structured-prompt/</guid><description>&lt;p>很多人使用大模型时的体验是“时灵时不灵”：有时回答得很好，有时却答非所问。问题往往不在模型，而在提示词。&lt;strong>一个模糊的提示词让模型不得不猜测你的意图，而一个结构清晰的提示词能让模型准确理解任务、稳定输出。&lt;/strong> 结构化提示词并不神秘，本质上就是把一项任务交代清楚，就像给一位能力很强但不了解背景的新同事布置工作。&lt;/p></description></item><item><title>System Prompt 设计指南：身份定位、行为边界、语气风格与安全规则</title><link>https://ai.wujiong.cc/posts/2026-09-20-system-prompt-design/</link><pubDate>Sun, 20 Sep 2026 13:04:49 +0800</pubDate><guid>https://ai.wujiong.cc/posts/2026-09-20-system-prompt-design/</guid><description>&lt;p>用户在 AI 应用中看到的每一个回答，背后都有一段用户看不到的文字在发挥作用：系统提示词（System Prompt）。&lt;strong>它定义了 AI 是谁、能做什么、不能做什么、以什么方式说话、遇到特殊情况如何处理。&lt;/strong> 一个精心设计的系统提示词能让 AI 应用表现得专业、稳定、安全；而一个草率的系统提示词，则会让 AI 时而越界、时而啰嗦、时而答非所问。&lt;/p></description></item><item><title>让大模型稳定输出 JSON：提示词、Schema 约束与程序校验</title><link>https://ai.wujiong.cc/posts/2026-09-17-json-output-prompt/</link><pubDate>Thu, 17 Sep 2026 11:36:38 +0800</pubDate><guid>https://ai.wujiong.cc/posts/2026-09-17-json-output-prompt/</guid><description>&lt;p>当大模型只用于聊天时，输出格式稍有变化无关紧要。但一旦要把模型输出交给程序处理，比如写入数据库、调用接口、渲染页面，&lt;strong>格式稳定性就成了生死问题：多一句“好的，以下是结果”、少一个右括号、把数字写成字符串，都可能让程序崩溃。&lt;/strong> 让大模型稳定输出 JSON，需要提示词、接口能力和程序校验三管齐下。&lt;/p></description></item><item><title>提示词工程化：版本管理、自动化测试与团队协作</title><link>https://ai.wujiong.cc/posts/2026-09-05-prompt-versioning/</link><pubDate>Sat, 05 Sep 2026 19:40:32 +0800</pubDate><guid>https://ai.wujiong.cc/posts/2026-09-05-prompt-versioning/</guid><description>&lt;p>在大模型应用的原型阶段，提示词往往直接写在代码里，谁觉得效果不好就改几句，改完看几个例子觉得不错就上线了。&lt;strong>但当应用进入生产环境、服务真实用户时，这种做法会带来严重的问题：一次看似无害的修改，可能让某类请求的效果大幅下降；出了问题不知道是哪次修改导致的；多人同时修改相互覆盖。&lt;/strong> 提示词需要像代码一样被工程化管理。&lt;/p></description></item><item><title>少样本提示（Few-shot）：示例怎么选、放几个、如何避免副作用</title><link>https://ai.wujiong.cc/posts/2026-07-10-few-shot-prompting/</link><pubDate>Fri, 10 Jul 2026 14:25:34 +0800</pubDate><guid>https://ai.wujiong.cc/posts/2026-07-10-few-shot-prompting/</guid><description>&lt;p>有些要求很难用文字描述清楚：一种特定的写作风格、一种复杂的分类规则、一种自定义的输出格式。这时，&lt;strong>与其写一大段说明，不如直接给模型看几个例子。&lt;/strong> 这种在提示词中提供少量输入输出示例的方法，被称为少样本提示（Few-shot Prompting）。它简单有效，但如果使用不当，也会带来意想不到的副作用。&lt;/p></description></item><item><title>思维链提示（CoT）：什么时候该让模型“一步一步想”</title><link>https://ai.wujiong.cc/posts/2026-07-02-chain-of-thought/</link><pubDate>Thu, 02 Jul 2026 11:52:30 +0800</pubDate><guid>https://ai.wujiong.cc/posts/2026-07-02-chain-of-thought/</guid><description>&lt;p>在大模型的发展过程中，有一个发现颇具代表性：&lt;strong>在提示词中加入一句“让我们一步一步地思考”，模型在数学应用题和逻辑推理题上的准确率就会显著提高。&lt;/strong> 这类方法被称为思维链（Chain-of-Thought，CoT）提示。它的原理并不复杂，但在实际使用中，需要清楚它在什么情况下有效、什么情况下多余。&lt;/p></description></item></channel></rss>