<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Prompt-Engineering on IT Comparison</title><link>https://comparison.metacog.co.kr/tags/prompt-engineering/</link><description>Recent content in Prompt-Engineering on IT Comparison</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 03 Aug 2026 03:45:54 +0900</lastBuildDate><atom:link href="https://comparison.metacog.co.kr/tags/prompt-engineering/index.xml" rel="self" type="application/rss+xml"/><item><title>Zero-Shot Learning vs Few-Shot Learning: No Examples vs a Handful of Examples</title><link>https://comparison.metacog.co.kr/posts/2026-08-03-zero-shot-learning-vs-few-shot-learning-no-examples-vs-a-han/</link><pubDate>Mon, 03 Aug 2026 03:45:54 +0900</pubDate><guid>https://comparison.metacog.co.kr/posts/2026-08-03-zero-shot-learning-vs-few-shot-learning-no-examples-vs-a-han/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;Zero-shot and few-shot learning describe how much task-specific example data a model is given before it has to perform a task. Zero-shot relies solely on a &lt;strong class="kw"&gt;task description&lt;/strong&gt;, while few-shot conditions its predictions on a small set of &lt;strong class="kw"&gt;labeled examples&lt;/strong&gt;, usually trading a little setup cost for higher accuracy.&lt;/p&gt;
&lt;h2 id="comparison-diagram"&gt;Comparison Diagram&lt;/h2&gt;
&lt;div class="compare-diagram"&gt;
&lt;svg viewBox="0 0 640 360" xmlns="http://www.w3.org/2000/svg"&gt;&lt;text x="160" y="30" text-anchor="middle" font-size="16" font-weight="600" style="fill:var(--primary)"&gt;Zero-Shot&lt;/text&gt;&lt;text x="480" y="30" text-anchor="middle" font-size="16" font-weight="600" style="fill:var(--primary)"&gt;Few-Shot&lt;/text&gt;&lt;line x1="320" y1="45" x2="320" y2="335" stroke-dasharray="4,4" style="stroke:var(--border)" stroke-width="1.5"/&gt;&lt;rect x="60" y="55" width="200" height="95" rx="6" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="160" y="85" text-anchor="middle" font-size="13" style="fill:var(--content)"&gt;Task instruction&lt;/text&gt;&lt;text x="160" y="103" text-anchor="middle" font-size="13" style="fill:var(--content)"&gt;only&lt;/text&gt;&lt;text x="160" y="128" text-anchor="middle" font-size="11" style="fill:var(--secondary)"&gt;(0 examples)&lt;/text&gt;&lt;rect x="380" y="55" width="200" height="95" rx="6" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="480" y="78" text-anchor="middle" font-size="13" style="fill:var(--content)"&gt;Task instruction&lt;/text&gt;&lt;text x="480" y="96" text-anchor="middle" font-size="13" style="fill:var(--content)"&gt;+ K examples&lt;/text&gt;&lt;rect x="400" y="108" width="25" height="22" rx="3" style="fill:none;stroke:var(--compare-b)" stroke-width="1"/&gt;&lt;text x="412" y="123" text-anchor="middle" font-size="10" style="fill:var(--content)"&gt;1&lt;/text&gt;&lt;rect x="430" y="108" width="25" height="22" rx="3" style="fill:none;stroke:var(--compare-b)" stroke-width="1"/&gt;&lt;text x="442" y="123" text-anchor="middle" font-size="10" style="fill:var(--content)"&gt;2&lt;/text&gt;&lt;rect x="460" y="108" width="25" height="22" rx="3" style="fill:none;stroke:var(--compare-b)" stroke-width="1"/&gt;&lt;text x="472" y="123" text-anchor="middle" font-size="10" style="fill:var(--content)"&gt;3&lt;/text&gt;&lt;line x1="160" y1="150" x2="160" y2="183" style="stroke:var(--secondary)" stroke-width="1.5"/&gt;&lt;polygon points="160,185 155,177 165,177" style="fill:var(--secondary)"/&gt;&lt;line x1="480" y1="150" x2="480" y2="183" style="stroke:var(--secondary)" stroke-width="1.5"/&gt;&lt;polygon points="480,185 475,177 485,177" style="fill:var(--secondary)"/&gt;&lt;rect x="60" y="185" width="200" height="50" rx="6" style="fill:none;stroke:var(--border)" stroke-width="1.5"/&gt;&lt;text x="160" y="206" text-anchor="middle" font-size="12" style="fill:var(--content)"&gt;Pretrained&lt;/text&gt;&lt;text x="160" y="222" text-anchor="middle" font-size="12" style="fill:var(--content)"&gt;Model&lt;/text&gt;&lt;rect x="380" y="185" width="200" height="50" rx="6" style="fill:none;stroke:var(--border)" stroke-width="1.5"/&gt;&lt;text x="480" y="206" text-anchor="middle" font-size="12" style="fill:var(--content)"&gt;Pretrained&lt;/text&gt;&lt;text x="480" y="222" text-anchor="middle" font-size="12" style="fill:var(--content)"&gt;Model&lt;/text&gt;&lt;line x1="160" y1="235" x2="160" y2="268" style="stroke:var(--secondary)" stroke-width="1.5"/&gt;&lt;polygon points="160,270 155,262 165,262" style="fill:var(--secondary)"/&gt;&lt;line x1="480" y1="235" x2="480" y2="268" style="stroke:var(--secondary)" stroke-width="1.5"/&gt;&lt;polygon points="480,270 475,262 485,262" style="fill:var(--secondary)"/&gt;&lt;rect x="60" y="270" width="200" height="55" rx="6" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="160" y="302" text-anchor="middle" font-size="13" style="fill:var(--content)"&gt;Prediction&lt;/text&gt;&lt;rect x="380" y="270" width="200" height="55" rx="6" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="480" y="302" text-anchor="middle" font-size="13" style="fill:var(--content)"&gt;Prediction&lt;/text&gt;&lt;text x="160" y="350" text-anchor="middle" font-size="10" style="fill:var(--secondary)"&gt;no task-specific data&lt;/text&gt;&lt;text x="480" y="350" text-anchor="middle" font-size="10" style="fill:var(--secondary)"&gt;learns from few examples&lt;/text&gt;&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id="comparison-table"&gt;Comparison Table&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Zero-Shot Learning&lt;/th&gt;
&lt;th&gt;Few-Shot Learning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Core definition&lt;/td&gt;
&lt;td&gt;Model performs a task it was never explicitly shown examples for, guided only by natural-language instructions or class descriptions&lt;/td&gt;
&lt;td&gt;Model performs a task after being shown a small number (typically 1-100) of labeled examples at inference or fine-tuning time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Examples provided at inference&lt;/td&gt;
&lt;td&gt;None — only a task description or prompt&lt;/td&gt;
&lt;td&gt;A handful of input-output pairs included in the prompt or used for fine-tuning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Underlying mechanism&lt;/td&gt;
&lt;td&gt;Relies entirely on knowledge encoded during pretraining plus semantic alignment between labels and text&lt;/td&gt;
&lt;td&gt;Uses in-context learning or lightweight fine-tuning to infer the task pattern directly from the provided examples&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Labeling/data cost&lt;/td&gt;
&lt;td&gt;Effectively zero — no labeled data needed for the target task&lt;/td&gt;
&lt;td&gt;Low but nonzero — requires curating a small, representative set of examples&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt/context length&lt;/td&gt;
&lt;td&gt;Short — just the instruction or class names&lt;/td&gt;
&lt;td&gt;Longer — instruction plus example pairs, consuming more context tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical accuracy&lt;/td&gt;
&lt;td&gt;Lower and more variable, especially on niche or ambiguous tasks&lt;/td&gt;
&lt;td&gt;Generally higher and more stable since examples disambiguate intent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sensitivity to example choice&lt;/td&gt;
&lt;td&gt;Not applicable — there are no examples to choose&lt;/td&gt;
&lt;td&gt;High — accuracy can swing significantly with example selection, order, and count&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Common techniques&lt;/td&gt;
&lt;td&gt;Prompt engineering, CLIP-style embedding matching, instruction-tuned LLMs&lt;/td&gt;
&lt;td&gt;Few-shot prompting, meta-learning (e.g. MAML), lightweight fine-tuning or LoRA&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="key-differences"&gt;Key Differences&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Zero-shot uses no &lt;strong class="kw"&gt;task examples&lt;/strong&gt; at all, relying purely on pretrained knowledge and instructions&lt;/li&gt;
&lt;li&gt;Few-shot conditions the model on a small &lt;strong class="kw"&gt;support set&lt;/strong&gt; of labeled examples at inference time&lt;/li&gt;
&lt;li&gt;Few-shot generally achieves higher &lt;strong class="kw"&gt;accuracy&lt;/strong&gt; because examples disambiguate an otherwise vague instruction&lt;/li&gt;
&lt;li&gt;Zero-shot has zero &lt;strong class="kw"&gt;labeling cost&lt;/strong&gt;, while few-shot requires curating representative examples&lt;/li&gt;
&lt;li&gt;Few-shot performance is sensitive to &lt;strong class="kw"&gt;example selection&lt;/strong&gt;, a variable that zero-shot simply doesn&amp;rsquo;t have&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="when-to-use-each"&gt;When to Use Each&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Zero-Shot Learning&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>