<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Prompt Engineering on Chen Kai Blog</title><link>https://www.chenk.top/en/tags/prompt-engineering/</link><description>Recent content in Prompt Engineering on Chen Kai Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 31 Oct 2025 09:00:00 +0000</lastBuildDate><atom:link href="https://www.chenk.top/en/tags/prompt-engineering/index.xml" rel="self" type="application/rss+xml"/><item><title>NLP (7): Prompt Engineering and In-Context Learning</title><link>https://www.chenk.top/en/nlp/prompt-engineering-icl/</link><pubDate>Fri, 31 Oct 2025 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/nlp/prompt-engineering-icl/</guid><description>&lt;p>The same model can produce a sharp answer or a confident hallucination. The difference lies in the framing, not the weights. A vague request like &lt;em>&amp;ldquo;analyze this text&amp;rdquo;&lt;/em> yields a generic summary; a prompt with a role, two clear examples, and a strict output schema produces something a parser can use. &lt;strong>Prompt engineering turns that gap into a repeatable system, not just a lucky shot.&lt;/strong>&lt;/p>
&lt;p>In-Context Learning (ICL) is the mechanism that makes this work. When you include a few examples in the prompt, the model doesn&amp;rsquo;t retrain; it conditions its forward pass on those examples and effectively &lt;em>infers a task&lt;/em> from them. Understanding ICL&amp;rsquo;s capabilities and limitations separates a developer who struggles with the model from one who guides it.&lt;/p></description></item><item><title>Prompt Engineering Complete Guide: From Zero to Advanced Optimization</title><link>https://www.chenk.top/en/standalone/prompt-engineering-complete-guide/</link><pubDate>Tue, 30 Sep 2025 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/standalone/prompt-engineering-complete-guide/</guid><description>&lt;p>The same model, two prompts: one achieves 17% accuracy on grade-school math, the other 78%. The difference isn&amp;rsquo;t magic—it&amp;rsquo;s prompt engineering. This guide covers the techniques that work, the research behind them, and how to systematically optimize prompts for production.&lt;/p>
&lt;hr>
&lt;h2 id="what-you-will-learn" class="heading-anchor">What You Will Learn&lt;a href="#what-you-will-learn" class="heading-link" aria-label="Permalink to this section" title="Copy link to this section">#&lt;/a>
&lt;/h2>&lt;ul>
&lt;li>&lt;strong>Foundations&lt;/strong> — zero-shot, few-shot, many-shot, task decomposition, and the five-block prompt skeleton.&lt;/li>
&lt;li>&lt;strong>Reasoning techniques&lt;/strong> — Chain-of-Thought, Self-Consistency, Tree of Thoughts, Graph of Thoughts, ReAct.&lt;/li>
&lt;li>&lt;strong>Automation&lt;/strong> — Automatic Prompt Engineering (APE), DSPy, LLMLingua compression.&lt;/li>
&lt;li>&lt;strong>Practical templates&lt;/strong> — structured output, code generation, data extraction, multi-turn chat.&lt;/li>
&lt;li>&lt;strong>Evaluation and debugging&lt;/strong> — metrics, A/B testing, error analysis, the failure-mode toolkit.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Prerequisites.&lt;/strong> Basic Python; experience calling any LLM API. No math background required.&lt;/p></description></item></channel></rss>