<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://patternnotes.dev/feed.xml" rel="self" type="application/atom+xml" /><link href="https://patternnotes.dev/" rel="alternate" type="text/html" /><updated>2026-10-07T11:23:10+00:00</updated><id>https://patternnotes.dev/feed.xml</id><title type="html">Prompt &amp;amp; Context Patterns</title><subtitle>An engineering reference with concrete use cases, contrasting examples, and traceable sources.</subtitle><entry xml:lang="zh"><title type="html">2026年7月收录：来源摘要与当前审核</title><link href="https://patternnotes.dev/2026/07/08/harvest-2026-07-zh/" rel="alternate" type="text/html" title="2026年7月收录：来源摘要与当前审核" /><published>2026-07-08T00:00:00+00:00</published><updated>2026-10-06T00:00:00+00:00</updated><id>https://patternnotes.dev/2026/07/08/harvest-2026-07-zh</id><content type="html" xml:base="https://patternnotes.dev/2026/07/08/harvest-2026-07-zh/"><![CDATA[<p><span id="这-51-个从哪来"></span>
<span id="新分类技能创作skill-authoring"></span>
<span id="另外两个来源的亮点"></span>
<span id="接下来"></span></p>

<h2 id="历史收录">历史收录</h2>

<p>本2026-07-08文章宣布新增51条记录，编号156–206，来源包括 Superpowers、Anthropic 插件生态和 Matt Pocock skills。当时多数条目是名称与问题摘要，不是已完成验证的方法。</p>

<h2 id="当前处理方式">当前处理方式</h2>

<p>重建版本读取冻结的来源文件，检查实际机制，并与现有目录去重。来源 confidence 标签不等于质量分数或模型实验。当前介绍、场景、正反教学构造和边界，采用与旧模式相同的编辑标准。</p>

<p>原摘要编号保留在迁移记录中。部分条目已合并或撤下，因此历史新增51条不代表当前仍有51个独立有效方法。</p>

<p><a href="/sources-zh/">当前来源版本</a> · <a href="/catalog/index-zh/">审核后的目录</a> · <a href="/methodology-zh/">收录标准</a></p>]]></content><author><name></name></author><category term="patterns" /><category term="catalog" /><summary type="html"><![CDATA[阅读七月技能研究记录，查看原文观察及历史结论的适用边界。]]></summary></entry><entry xml:lang="en"><title type="html">The July 2026 harvest: source summaries under review</title><link href="https://patternnotes.dev/2026/07/08/harvest-2026-07/" rel="alternate" type="text/html" title="The July 2026 harvest: source summaries under review" /><published>2026-07-08T00:00:00+00:00</published><updated>2026-10-06T00:00:00+00:00</updated><id>https://patternnotes.dev/2026/07/08/harvest-2026-07</id><content type="html" xml:base="https://patternnotes.dev/2026/07/08/harvest-2026-07/"><![CDATA[<p><span id="where-the-51-came-from"></span>
<span id="a-new-category-skill-authoring"></span>
<span id="highlights-from-the-other-two"></span>
<span id="whats-next"></span></p>

<h2 id="historical-harvest">Historical harvest</h2>

<p>This 2026-07-08 post announced51 additional records, numbered156–206, from Superpowers, Anthropic’s plugin ecosystem and Matt Pocock’s skills. Most new records were name/problem summaries rather than complete tested methods.</p>

<h2 id="current-treatment">Current treatment</h2>

<p>The rebuild reads the frozen source files, checks each observed mechanism and deduplicates it against the catalog. A source confidence label is not a quality score or a model experiment. Current descriptions, scenarios, good/bad constructions and limits follow the same editorial criteria as older methods.</p>

<p>The original summary numbering remains part of the migration record. Some entries now merge into earlier identities or have been withdrawn, so51 additions does not imply51 active methods in the current edition.</p>

<p><a href="/sources/">Current source revisions</a> · <a href="/catalog/">Reviewed catalog</a> · <a href="/methodology/">Admission rules</a></p>]]></content><author><name></name></author><category term="patterns" /><category term="catalog" /><summary type="html"><![CDATA[Read the July skill-harvest report, its source observations and the boundaries of its historical conclusions.]]></summary></entry><entry xml:lang="zh"><title type="html">155个模式目录：历史收录与当前审核</title><link href="https://patternnotes.dev/2026/05/26/prompt-pattern-catalog-zh/" rel="alternate" type="text/html" title="155个模式目录：历史收录与当前审核" /><published>2026-05-26T00:00:00+00:00</published><updated>2026-10-06T00:00:00+00:00</updated><id>https://patternnotes.dev/2026/05/26/prompt-pattern-catalog-zh</id><content type="html" xml:base="https://patternnotes.dev/2026/05/26/prompt-pattern-catalog-zh/"><![CDATA[<p><span id="为什么做这个"></span>
<span id="目录结构"></span>
<span id="12-个模式分类"></span>
<span id="举例模式-23--带上限的修复循环"></span>
<span id="举例模式-45--指令式写前审查"></span>
<span id="技巧亮点"></span>
<span id="token-级技巧9-个"></span>
<span id="防偷懒策略8-种"></span>
<span id="prompt-评审框架"></span>
<span id="如何使用"></span>
<span id="许可"></span></p>

<h2 id="历史收录">历史收录</h2>

<p>本2026-05-26文章宣布收录155个编号方法。这是历史目录规模，不是效果测量。旧版聚合插件来源说明没有提供逐模式的固定版本证据。</p>

<h2 id="审核后的变化">审核后的变化</h2>

<p>当前版本逐项评估任务、机制、正反例、可检查结果和边界。重复身份合并，错误或薄弱内容撤下；有用但未定位原文的方法保留“来源未确认”标签。</p>

<p>当前实例链接到固定版本，不代表最早发明归属。最新数量来自有效元数据，不从这篇历史标题推断。</p>

<h2 id="阅读当前参考库">阅读当前参考库</h2>

<p>存续方法有独立的中英文页面与具体场景。旧编号和入口继续通过合并或撤下记录定位。</p>

<p><a href="/catalog/index-zh/">当前目录</a> · <a href="/catalog/catalog-index-zh/">完整索引</a> · <a href="/methodology-zh/">来源标准</a></p>]]></content><author><name></name></author><category term="patterns" /><category term="catalog" /><summary type="html"><![CDATA[了解历史方法目录的组织方式，通过保留的引用访问当前方法。]]></summary></entry><entry xml:lang="en"><title type="html">The 155-pattern catalog: historical collection and current review</title><link href="https://patternnotes.dev/2026/05/26/prompt-pattern-catalog/" rel="alternate" type="text/html" title="The 155-pattern catalog: historical collection and current review" /><published>2026-05-26T00:00:00+00:00</published><updated>2026-10-06T00:00:00+00:00</updated><id>https://patternnotes.dev/2026/05/26/prompt-pattern-catalog</id><content type="html" xml:base="https://patternnotes.dev/2026/05/26/prompt-pattern-catalog/"><![CDATA[<p><span id="why-this-exists"></span>
<span id="catalog-structure"></span>
<span id="the-12-pattern-categories"></span>
<span id="example-pattern-23--attempt-capped-repair-loop"></span>
<span id="example-pattern-45--directive-based-pre-write-review"></span>
<span id="techniques-highlights"></span>
<span id="token-level-techniques-9-techniques"></span>
<span id="anti-laziness-strategies-8-strategies"></span>
<span id="prompt-review-framework"></span>
<span id="how-to-use"></span>
<span id="license"></span></p>

<h2 id="historical-collection">Historical collection</h2>

<p>This 2026-05-26 post announced a catalog of155 numbered methods. That is a historical collection size, not a measurement of their effectiveness. Its aggregate plugin-source claims did not provide per-pattern immutable evidence.</p>

<h2 id="what-changed-in-the-review">What changed in the review</h2>

<p>The current edition assesses each method’s task, mechanism, contrasting examples, observable result and boundaries. Duplicate identities merge, incorrect or weak content is withdrawn, and useful methods without located sources retain a Source unconfirmed label.</p>

<p>Current source instances link to fixed revisions; they do not establish earliest invention. The current catalog count comes from active metadata rather than this historical title.</p>

<h2 id="read-the-current-reference">Read the current reference</h2>

<p>Each surviving method has an independent English/Chinese page and a concrete use case. Old numbers and entry points remain resolvable through merge or withdrawal records.</p>

<p><a href="/catalog/">Current catalog</a> · <a href="/catalog/catalog-index/">Complete index</a> · <a href="/methodology/">Provenance criteria</a></p>]]></content><author><name></name></author><category term="patterns" /><category term="catalog" /><summary type="html"><![CDATA[Follow the historical catalog organization and find the reviewed methods through its preserved references.]]></summary></entry><entry xml:lang="zh"><title type="html">决策树提示词：历史样例与实验边界</title><link href="https://patternnotes.dev/2026/04/19/decision-tree-pattern-zh/" rel="alternate" type="text/html" title="决策树提示词：历史样例与实验边界" /><published>2026-04-19T00:00:00+00:00</published><updated>2026-10-06T00:00:00+00:00</updated><id>https://patternnotes.dev/2026/04/19/decision-tree-pattern-zh</id><content type="html" xml:base="https://patternnotes.dev/2026/04/19/decision-tree-pattern-zh/"><![CDATA[<p><span id="问题"></span>
<span id="结果各-20-次运行"></span>
<span id="主要缓解措施"></span>
<span id="次要措施"></span>
<span id="完整对比"></span>
<span id="这意味着什么"></span>
<span id="模式"></span>
<span id="为什么有效"></span>
<span id="什么时候用--什么时候不用"></span>
<span id="自己试试"></span>
<span id="延伸阅读"></span></p>

<h2 id="历史修订说明">历史修订说明</h2>

<p>保留本文2026-04-19的实验语境。旧报告描述了重复运行的 prose/tree 对比，但当前仓库没有原始输出，无法重新计算当时的数字；这些结论不作为当前效果证据。</p>

<p>两组提示词的输出词汇也不同：树形版本给出固定 action 字符串，散文版本允许自由句子。这混合了分支表示与输出契约两个变量。决策树本身不保证模型决策稳定或正确。</p>

<h2 id="教学对照">教学对照</h2>

<p>任务：为失败部署选择一个已获授权的行动。</p>

<p>Bad：</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>选择最好的缓解措施并解释。
</code></pre></div></div>

<p>Good：</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>支持且授权回滚时，提出 action=rollback。
否则，如果授权的 feature flag 能禁用变更，提出 action=disable_flag。
否则，报告 action=investigate 及缺失的事实。
返回含 action 与 evidence 的 JSON，不执行缓解操作。
</code></pre></div></div>

<p>这个构造让分支、未知状态和输出枚举可检查。输出 schema 与语义判断准确性仍应分别验证。</p>

<h2 id="复现受控实验">复现受控实验</h2>

<p>旧样例保留在 <code class="language-plaintext highlighter-rouge">eval/decision-tree-ab/</code>，运行器需要 Claude Code CLI。Patternfoo 是当前可配置的评测工具。运行模型实验须显式选择，不属于网站静态检查。</p>

<p>新的对比应固定事实、模型配置、输出枚举与预算，只改变分支表示方式。报告每次结果和失败，并保存原始输出后再提出数值主张。</p>

<p><a href="/catalog/patterns/3-zh/">工作流分支</a> · <a href="/catalog/patterns/20-zh/">意图路由</a> · <a href="/catalog/patterns/14-zh/">输出契约</a></p>]]></content><author><name></name></author><category term="patterns" /><category term="decision-tree" /><summary type="html"><![CDATA[阅读决策树指令的历史样例，了解实验报告中可核对的材料与证据限制。]]></summary></entry><entry xml:lang="en"><title type="html">Decision-tree prompts: historical fixtures and limits</title><link href="https://patternnotes.dev/2026/04/19/decision-tree-pattern/" rel="alternate" type="text/html" title="Decision-tree prompts: historical fixtures and limits" /><published>2026-04-19T00:00:00+00:00</published><updated>2026-10-06T00:00:00+00:00</updated><id>https://patternnotes.dev/2026/04/19/decision-tree-pattern</id><content type="html" xml:base="https://patternnotes.dev/2026/04/19/decision-tree-pattern/"><![CDATA[<p><span id="the-problem"></span>
<span id="results-20-runs-each"></span>
<span id="primary-mitigation-action"></span>
<span id="secondary-action"></span>
<span id="full-comparison-table"></span>
<span id="what-this-means-in-practice"></span>
<span id="the-pattern"></span>
<span id="why-it-works"></span>
<span id="when-to-use--when-not-to"></span>
<span id="try-it-yourself"></span>
<span id="further-reading"></span></p>

<h2 id="historical-revision">Historical revision</h2>

<p>This article retains its 2026-04-19 experiment context. The earlier report described repeated prose/tree runs, but the raw outputs are absent from this checkout. Its numerical reproducibility claims cannot be recomputed here and are not current evidence.</p>

<p>The two prompt forms also differed in their output vocabulary: the tree supplied fixed action strings while prose allowed free-form sentences. That confounds branch presentation with output-contract enforcement. A tree alone does not guarantee stable or correct model decisions.</p>

<h2 id="a-teaching-comparison">A teaching comparison</h2>

<p>Task: choose an authorized action for a failed deployment.</p>

<p>Bad:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Choose the best mitigation and explain it.
</code></pre></div></div>

<p>Good:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>If rollback is supported and authorized, propose action=rollback.
Otherwise, if an authorized feature flag disables the change, propose action=disable_flag.
Otherwise report action=investigate and the missing fact.
Return JSON with action and evidence. Do not execute a mitigation.
</code></pre></div></div>

<p>This construction makes the branches, unknown state and allowed output values inspectable. Check schema compliance separately from semantic decision accuracy.</p>

<h2 id="reproduce-a-controlled-experiment">Reproduce a controlled experiment</h2>

<p>The retained fixtures are in <code class="language-plaintext highlighter-rouge">eval/decision-tree-ab/</code>; its runner requires Claude Code CLI. Patternfoo is the maintained configurable evaluation tool. Running either tool is an explicit model experiment, not part of the static site checks.</p>

<p>A new comparison should hold facts, model configuration, output enums and budget constant; change only the branch representation. Report individual outcomes and failures, and retain raw outputs before making numerical claims.</p>

<p><a href="/catalog/patterns/3/">Workflow branching</a> · <a href="/catalog/patterns/20/">Intent routing</a> · <a href="/catalog/patterns/14/">Output contracts</a></p>]]></content><author><name></name></author><category term="patterns" /><category term="decision-tree" /><summary type="html"><![CDATA[Read the historical decision-tree instruction fixture and its known experimental evidence limits.]]></summary></entry><entry xml:lang="zh"><title type="html">提示词工程：可观察的指令与有效对照</title><link href="https://patternnotes.dev/2026/04/19/prompt-engineering-patterns-zh/" rel="alternate" type="text/html" title="提示词工程：可观察的指令与有效对照" /><published>2026-04-19T00:00:00+00:00</published><updated>2026-10-06T00:00:00+00:00</updated><id>https://patternnotes.dev/2026/04/19/prompt-engineering-patterns-zh</id><content type="html" xml:base="https://patternnotes.dev/2026/04/19/prompt-engineering-patterns-zh/"><![CDATA[<p><span id="核心原则降低不确定性"></span>
<span id="简单例子"></span>
<span id="一句话总结"></span>
<span id="模式-1决策树替代自然语言"></span>
<span id="不好自然语言"></span>
<span id="好决策树"></span>
<span id="模式-2锚定给起点"></span>
<span id="不好无锚定"></span>
<span id="好用模板锚定"></span>
<span id="模式-3认知卸载把思考步骤写出来"></span>
<span id="不好隐式推理"></span>
<span id="好显式步骤"></span>
<span id="模式-4注意力局部性把相关的放在一起"></span>
<span id="不好规则离目标太远"></span>
<span id="好规则紧挨目标"></span>
<span id="模式-5指令-动作绑定一条指令一个动作"></span>
<span id="不好一句话多个动作"></span>
<span id="好一条指令--一个动作"></span>
<span id="模式-6输出格式预设给输出一个形状"></span>
<span id="不好开放式"></span>
<span id="好结构约束"></span>
<span id="模式-7负空间说不要的同时说要"></span>
<span id="不好只说不要"></span>
<span id="好不要--替代方案"></span>
<span id="模式-8xml-标签做语义分区"></span>
<span id="推荐的提示词结构"></span>
<span id="模式-9带推理过程的示例"></span>
<span id="不好只有输入输出"></span>
<span id="好输入--思考过程--输出"></span>
<span id="各模式之间的关系"></span>
<span id="参考资料"></span></p>

<h2 id="历史修订说明">历史修订说明</h2>

<p>原2026-04-19文章用条件熵和注意力解释提示词结构，但仓库没有将具体措辞与这些模型内部量关联的测量。修订版保留实用方法，移除未经支持的因果保证。</p>

<h2 id="从任务和已知事实开始">从任务和已知事实开始</h2>

<p>明确输入、所需结果及未知信息。例如诊断配置问题时，先定位加载器、配置路径和已观察到的症状，再讨论修改。</p>

<h2 id="让契约可检查">让契约可检查</h2>

<p>把“清楚报告”改成必需字段和允许值，并提供缺失输入或未知分支。格式校验能检查契约，不能证明答案为真。</p>

<h2 id="使用同任务对照">使用同任务对照</h2>

<p>固定任务与事实，只修改导致一个具体失败的指令，解释可检查的差异并说明边界。本站示例是教学构造，不是模型效果测量。</p>

<h2 id="按需要加载上下文">按需要加载上下文</h2>

<p>每个分支都需要的约束放在行动附近。任务专属参考材料附明确的读取条件。保留来源位置，不把记忆或摘要当作当前事实的证明。</p>

<p><a href="/guides/teaching-examples-zh/">教学示例指南</a> · <a href="/guides/reference-reading-zh/">参考读取指南</a> · <a href="/methodology-zh/">编辑标准</a></p>]]></content><author><name></name></author><category term="prompt-engineering" /><category term="patterns" /><summary type="html"><![CDATA[回顾提示词结构与对照写法，区分教学示例和历史比较中的已知结果。]]></summary></entry><entry xml:lang="en"><title type="html">Prompt engineering: observable instructions and useful contrasts</title><link href="https://patternnotes.dev/2026/04/19/prompt-engineering-patterns/" rel="alternate" type="text/html" title="Prompt engineering: observable instructions and useful contrasts" /><published>2026-04-19T00:00:00+00:00</published><updated>2026-10-06T00:00:00+00:00</updated><id>https://patternnotes.dev/2026/04/19/prompt-engineering-patterns</id><content type="html" xml:base="https://patternnotes.dev/2026/04/19/prompt-engineering-patterns/"><![CDATA[<p><span id="core-principle-reduce-conditional-entropy"></span>
<span id="what-conditional-entropy-actually-means"></span>
<span id="concrete-example"></span>
<span id="feel-it-in-numbers"></span>
<span id="why-indentation-is-information"></span>
<span id="one-line-summary"></span>
<span id="1-visual-decision-trees-over-prose"></span>
<span id="why-it-works"></span>
<span id="bad-prose"></span>
<span id="good-decision-tree"></span>
<span id="why-indentation-matters"></span>
<span id="2-grounding-anchoring"></span>
<span id="bad-unanchored"></span>
<span id="good-anchored-with-template"></span>
<span id="3-cognitive-offloading"></span>
<span id="bad-implicit-reasoning-required"></span>
<span id="good-explicit-steps-provided"></span>
<span id="4-attention-locality"></span>
<span id="bad-rule-far-from-its-target"></span>
<span id="good-rule-adjacent-to-its-target"></span>
<span id="5-token-action-binding"></span>
<span id="bad-multiple-implicit-actions-in-one-sentence"></span>
<span id="good-one-instruction--one-action"></span>
<span id="6-schema-priming"></span>
<span id="bad-open-ended"></span>
<span id="good-schema-constrained"></span>
<span id="7-negative-space-explicit-alternatives"></span>
<span id="bad-negation-only"></span>
<span id="good-negation--alternative-path"></span>
<span id="8-xml-tags-for-semantic-boundaries"></span>
<span id="recommended-structure-for-skill-prompts"></span>
<span id="9-few-shot-with-embedded-reasoning"></span>
<span id="bad-inputoutput-pairs-only"></span>
<span id="good-input--thinking--output"></span>
<span id="putting-it-all-together-skill-prompt-template"></span>
<span id="summary-of-relationships"></span>
<span id="references"></span></p>

<h2 id="historical-revision">Historical revision</h2>

<p>The original 2026-04-19 article explained prompt structure through conditional entropy and attention. This repository does not contain measurements linking its suggested wording to those internal model quantities. The revision keeps practical methods and removes unsupported causal guarantees.</p>

<h2 id="start-with-the-task-and-known-facts">Start with the task and known facts</h2>

<p>Specify the input, required outcome and what is not known. For a configuration diagnosis, identify the loader, config path and observed symptom before asking for a change.</p>

<h2 id="make-the-contract-inspectable">Make the contract inspectable</h2>

<p>Replace “report clearly” with required fields and allowed values. Include a missing-input or unknown branch. A format validator checks the contract, not the truth of the answer.</p>

<h2 id="use-a-same-task-contrast">Use a same-task contrast</h2>

<p>Keep task and facts constant. Change the instruction responsible for one concrete failure, explain the expected difference, and state the boundary. Examples here are teaching constructions, not measured model outputs.</p>

<h2 id="route-context-by-need">Route context by need</h2>

<p>Put always-needed constraints near the action. Attach an explicit reading condition to task-specific references. Preserve a source location instead of treating a memory or summary as current proof.</p>

<p><a href="/guides/teaching-examples/">Teaching-example guide</a> · <a href="/guides/reference-reading/">Reference-reading guide</a> · <a href="/methodology/">Editorial criteria</a></p>]]></content><author><name></name></author><category term="prompt-engineering" /><category term="patterns" /><summary type="html"><![CDATA[Review historical prompt structures, their teaching examples and the limits of the recorded comparisons.]]></summary></entry></feed>