<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>DSPy From First Principles on Programmer.ie</title>
    <link>http://programmer.ie/books/dspy-from-first-principles/</link>
    <description>Recent content in DSPy From First Principles on Programmer.ie</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 28 Aug 2026 11:25:00 +0100</lastBuildDate>
    <atom:link href="http://programmer.ie/books/dspy-from-first-principles/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>DSPy From First Principles 01: Why Are We Still Hand-Writing Prompts?</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/01-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:00:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/01-chapter/</guid>
      <description>&lt;h1 id=&#34;why-are-we-still-hand-writing-prompts&#34;&gt;Why Are We Still Hand-Writing Prompts?&lt;/h1&gt;&#xA;&lt;p&gt;A common language-model application begins as one string.&lt;/p&gt;&#xA;&lt;p&gt;That is not a mistake. A prompt is the fastest way to discover whether a model can help with a task. It lets us work directly with the behavior instead of building a framework before we know the shape of the problem.&lt;/p&gt;&#xA;&lt;p&gt;But the prompt often survives too long.&lt;/p&gt;&#xA;&lt;p&gt;In this chapter we will build a small editorial assistant around a handwritten prompt. The task is realistic: given one sentence from a chapter, improve the sentence without changing its meaning or voice. This is a simplified version of the kind of sentence-improvement work that appears in Writer, where candidates, evidence packets, provider identity, fallback state, and later review decisions are all tracked explicitly.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 02: A Prompt Is Not Yet a Program</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/02-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:05:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/02-chapter/</guid>
      <description>&lt;h1 id=&#34;a-prompt-is-not-yet-a-program&#34;&gt;A Prompt Is Not Yet a Program&lt;/h1&gt;&#xA;&lt;p&gt;In chapter 1 we built a reasonable handwritten prompt and found the real problem: one prompt string was carrying the task semantics, role and behavioral framing, output request, and model assumptions at the same time.&lt;/p&gt;&#xA;&lt;p&gt;The next move is not to make a more elaborate prompt. It is to decide what properties an LM component needs before we should reasonably call it a program.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 03: Define the Contract</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/03-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:10:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/03-chapter/</guid>
      <description>&lt;h1 id=&#34;define-the-contract&#34;&gt;Define the Contract&lt;/h1&gt;&#xA;&lt;p&gt;In chapter 2 we stopped treating the prompt string as the program. We defined a small DSPy module around a signature:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sentence&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;editorial_goal&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;local_context&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rewritten_text&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rationale&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;confidence&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That is better than a handwritten prompt, but it raises the next problem. The program boundary is only as good as the contract we put at that boundary.&lt;/p&gt;&#xA;&lt;p&gt;This chapter is about signatures from first principles. A signature is not a prompt template. It is a task contract.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 04: Separate What From How</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/04-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:15:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/04-chapter/</guid>
      <description>&lt;h1 id=&#34;separate-what-from-how&#34;&gt;Separate What From How&lt;/h1&gt;&#xA;&lt;p&gt;In chapter 3 we designed a stronger contract for sentence improvement. The signature names the inputs and outputs. It says what the LM should consume and produce.&lt;/p&gt;&#xA;&lt;p&gt;It still does not say how the LM should execute the task.&lt;/p&gt;&#xA;&lt;p&gt;That distinction is the main subject of this chapter.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                SAME CONTRACT&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;input ────────&amp;gt; Signature ────────&amp;gt; output&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                    │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             execution policy&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              /           \&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;         Predict       ChainOfThought&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Changing the task contract and changing the execution strategy are different operations. Treating them as the same operation is one reason prompt experiments become impossible to interpret.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 05: Build Programs From Programs</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/05-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:20:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/05-chapter/</guid>
      <description>&lt;h1 id=&#34;build-programs-from-programs&#34;&gt;Build Programs From Programs&lt;/h1&gt;&#xA;&lt;p&gt;In chapter 4 we ran the same signature with different execution policies. That helped isolate one question:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Should this behavior be attempted directly or with intermediate reasoning?&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Real applications usually ask a larger question. A sentence-improvement system may need to find what is wrong, generate a candidate, assess risk, and return something the rest of the product can store.&lt;/p&gt;&#xA;&lt;p&gt;That is where a single LM call starts to hide several distinct operations.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 06: Your Model Is a Dependency</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/06-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:25:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/06-chapter/</guid>
      <description>&lt;h1 id=&#34;your-model-is-a-dependency&#34;&gt;Your Model Is a Dependency&lt;/h1&gt;&#xA;&lt;p&gt;In chapter 5 we composed several LM operations into one small editorial program. It can analyze a sentence, rewrite it, assess risk, and return structured fields.&lt;/p&gt;&#xA;&lt;p&gt;One assumption remains hidden:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Which model executed the program?&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That question is not operational trivia. A language-model program is not fully described by its Python class and signature. Its behavior depends on the LM boundary.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DSPy program&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;LM boundary&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   /      \&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;local     hosted&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;model     model&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This chapter treats the model as a dependency: configured, recorded, tested, and replaced deliberately.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 07: Examples Are Data, Not Decoration</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/07-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:30:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/07-chapter/</guid>
      <description>&lt;h1 id=&#34;examples-are-data-not-decoration&#34;&gt;Examples Are Data, Not Decoration&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 6 gave the program a model boundary. We can now say what the program is, which LM dependency ran it, and whether fallback output contaminated the record.&lt;/p&gt;&#xA;&lt;p&gt;That still leaves the unresolved problem:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;program&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;no disciplined evidence&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;#34;seems better&amp;#34;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The next six chapters build one deliberately small teaching experiment. We will keep the editorial sentence-improvement program, create a dataset, measure a baseline, design a metric, compile candidate programs, and compare them against a held-out case.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 08: You Cannot Optimize What You Cannot Measure</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/08-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:35:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/08-chapter/</guid>
      <description>&lt;h1 id=&#34;you-cannot-optimize-what-you-cannot-measure&#34;&gt;You Cannot Optimize What You Cannot Measure&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 7 turned examples into data. We now have rows, labels, provenance, and splits.&lt;/p&gt;&#xA;&lt;p&gt;That does not yet give us evidence. It gives us the material from which evidence can be produced.&lt;/p&gt;&#xA;&lt;p&gt;The next step is a baseline evaluation:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;frozen program&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      +&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;frozen cases&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      +&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;metric&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;per-case results&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;aggregate result&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;failure inspection&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;No optimization happens in this chapter. Evaluation answers one question:&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 09: The Metric Is Part of the Program</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/09-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:40:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/09-chapter/</guid>
      <description>&lt;h1 id=&#34;the-metric-is-part-of-the-program&#34;&gt;The Metric Is Part of the Program&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 8 gave us a baseline harness. It deliberately used a weak smoke-test metric because the first job was to make evaluation run.&lt;/p&gt;&#xA;&lt;p&gt;Now the dangerous part begins.&lt;/p&gt;&#xA;&lt;p&gt;During optimization, DSPy searches for program states that score well under the metric we provide. The optimizer does not know whether the score is a faithful proxy for the behavior we actually want.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-the-metric-ladder&#34;&gt;1. The metric ladder&lt;/h2&gt;&#xA;&lt;p&gt;Different tasks tolerate different metrics.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 10: Compile the Program</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/10-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:45:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/10-chapter/</guid>
      <description>&lt;h1 id=&#34;compile-the-program&#34;&gt;Compile the Program&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 9 gave the optimizer something to pursue: a metric. That does not mean we should let an optimizer mutate the accepted program.&lt;/p&gt;&#xA;&lt;p&gt;Compilation in DSPy is the process of taking a program, optimizer-visible evidence, a metric, and an optimizer, then producing a candidate program state.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-baseline-and-candidate-are-different-objects&#34;&gt;1. Baseline and candidate are different objects&lt;/h2&gt;&#xA;&lt;p&gt;Before compiling, name the boundary:&lt;/p&gt;&#xA;&lt;p&gt;A candidate is not the new production program. It is a proposed program version that must be evaluated.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 11: Few-Shot Optimization</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/11-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:50:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/11-chapter/</guid>
      <description>&lt;h1 id=&#34;few-shot-optimization&#34;&gt;Few-Shot Optimization&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 10 established the compilation boundary. The optimizer may propose a candidate program. It may not promote itself.&lt;/p&gt;&#xA;&lt;p&gt;Now we inspect the first mechanism: few-shot optimization.&lt;/p&gt;&#xA;&lt;p&gt;The question is practical:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Can we improve the program by selecting or constructing better demonstrations rather than rewriting the program ourselves?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;A demonstration is attached to a &lt;strong&gt;predictor&lt;/strong&gt;, so its fields need to make sense for that predictor&amp;rsquo;s signature.&lt;/p&gt;&#xA;&lt;p&gt;For a one-step rewrite predictor, a demonstration might look like:&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 12: Optimize the Instructions</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/12-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 10:55:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/12-chapter/</guid>
      <description>&lt;h1 id=&#34;optimize-the-instructions&#34;&gt;Optimize the Instructions&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 11 let the optimizer change predictor behavior through bootstrapped demonstrations. That changes the examples shown to the LM, but the predictor instructions remain mostly fixed.&lt;/p&gt;&#xA;&lt;p&gt;Now we expand the allowed mutation surface:&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-what-miprov2-searches&#34;&gt;1. What MIPROv2 searches&lt;/h2&gt;&#xA;&lt;p&gt;Current MIPROv2 builds candidate few-shot sets, proposes instruction candidates for predictors, and searches combinations against validation evidence. Its current implementation uses an Optuna-backed search over prompt parameters.&lt;/p&gt;&#xA;&lt;p&gt;Conceptually:&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;2-a-miprov2-compile-shape&#34;&gt;2. A MIPROv2 compile shape&lt;/h2&gt;&#xA;&lt;p&gt;Current docs show &lt;code&gt;MIPROv2(metric=..., auto=&amp;quot;light&amp;quot; | &amp;quot;medium&amp;quot; | &amp;quot;heavy&amp;quot;)&lt;/code&gt;. Its &lt;code&gt;compile&lt;/code&gt; method accepts &lt;code&gt;trainset&lt;/code&gt; and &lt;code&gt;valset&lt;/code&gt;; internally, the optimizer validates those datasets, builds an evaluator over the validation set, and searches prompt parameters against that development evidence.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 13: Let the Program Reflect</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/13-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 11:00:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/13-chapter/</guid>
      <description>&lt;h1 id=&#34;let-the-program-reflect&#34;&gt;Let the Program Reflect&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 12 ended with a hard limitation. MIPROv2 can search instructions and demonstrations, but the metric we built mostly returns a number.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;candidate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;metric&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0.42&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That number can select among candidates. It cannot explain how the program should change.&lt;/p&gt;&#xA;&lt;p&gt;The next mechanism is feedback-shaped evaluation:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;prediction&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;metric&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;score + diagnostic feedback&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;reflection&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;instruction mutation&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;candidate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Current DSPy describes GEPA as a reflection-driven instruction optimizer. It maintains a population of candidate instruction states, evaluates them on validation examples, and uses textual feedback plus execution traces to propose new instructions for selected predictors.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 14: Agents Are Programs Too</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/14-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 11:05:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/14-chapter/</guid>
      <description>&lt;h1 id=&#34;agents-are-programs-too&#34;&gt;Agents Are Programs Too&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 13 gave failures language. The optimizer can receive feedback, reflect, and propose better instructions.&lt;/p&gt;&#xA;&lt;p&gt;The next limitation is access. Our editorial program receives a sentence and local context. A repository repair program cannot be handed the whole world as one input and expected to behave.&lt;/p&gt;&#xA;&lt;p&gt;The naive shape is:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;issue&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;+&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;huge repository context&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;model&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;patch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The stronger shape gives the program &lt;strong&gt;bounded capabilities&lt;/strong&gt; rather than one giant input:&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 15: Search, Memory and Long Context</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/15-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 11:10:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/15-chapter/</guid>
      <description>&lt;h1 id=&#34;search-memory-and-long-context&#34;&gt;Search, Memory and Long Context&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 14 gave the program tools. It can inspect an environment instead of receiving all evidence up front.&lt;/p&gt;&#xA;&lt;p&gt;Now we face the selection problem:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;When the necessary evidence is too large to place directly in the prompt, how should the program decide what to inspect?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Several mechanisms are often collapsed into one word: context. They are different.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1. Put context directly in the prompt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2. Retrieve context before the LM call&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;3. Let an agent choose retrieval tools&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;4. Retrieve previous cases / memory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;5. Let a model programmatically explore a large context&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Each creates a different evidence-selection boundary, with different costs, failure modes, and leakage risks.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 16: Don&#39;t Let the Optimizer Cheat</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/16-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 11:15:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/16-chapter/</guid>
      <description>&lt;h1 id=&#34;dont-let-the-optimizer-cheat&#34;&gt;Don&amp;rsquo;t Let the Optimizer Cheat&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 15 expanded the program&amp;rsquo;s access. It can search repositories, retrieve memory, use tools, and maybe explore large contexts programmatically.&lt;/p&gt;&#xA;&lt;p&gt;That power threatens the experiment.&lt;/p&gt;&#xA;&lt;p&gt;The central question:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;How can an optimization experiment appear valid while the program or optimizer has quietly gained access to the answer?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Cheating is often accidental. A field named &lt;code&gt;validation_result&lt;/code&gt; slips into generation inputs. A memory tool returns the historical accepted patch. A retriever indexes a later repository revision. A GEPA feedback string includes the exact gold answer. A developer inspects holdout failures, changes instructions, and evaluates on the same holdout again.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 17: From Experiment to Production</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/17-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 11:20:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/17-chapter/</guid>
      <description>&lt;h1 id=&#34;from-experiment-to-production&#34;&gt;From Experiment to Production&lt;/h1&gt;&#xA;&lt;p&gt;Chapter 16 gave us a candidate that can be evaluated without obvious leakage.&lt;/p&gt;&#xA;&lt;p&gt;That still does not mean:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;optimizer.compile(...)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;production&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The lifecycle is closer to:&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-offline-win-is-insufficient&#34;&gt;1. Offline win is insufficient&lt;/h2&gt;&#xA;&lt;p&gt;A candidate may beat an aggregate metric and still be unacceptable:&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;2-cocoders-promotion-boundary&#34;&gt;2. CoCoder&amp;rsquo;s promotion boundary&lt;/h2&gt;&#xA;&lt;p&gt;CoCoder stores separate records:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ProgramEvaluationCaseResultDTO&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ProgramEvaluationDTO&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ProgramComparisonDTO&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ProgramPromotionDTO&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The docs summarize the invariant:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;optimizer proposes&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CoCoder evaluates&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CoCoder compares&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;operator/system policy promotes&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Promotion requires a persisted comparison, a &lt;code&gt;promote&lt;/code&gt; recommendation unless there is an explicit override, the comparison baseline still being the single active version, the target still being a candidate, and optimizer lineage—when present—matching that active baseline.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DSPy From First Principles 18: Build a Self-Improving Engineering Program</title>
      <link>http://programmer.ie/books/dspy-from-first-principles/18-chapter/</link>
      <pubDate>Fri, 28 Aug 2026 11:25:00 +0100</pubDate>
      <guid>http://programmer.ie/books/dspy-from-first-principles/18-chapter/</guid>
      <description>&lt;h1 id=&#34;build-a-self-improving-engineering-program&#34;&gt;Build a Self-Improving Engineering Program&lt;/h1&gt;&#xA;&lt;p&gt;We can now assemble the book.&lt;/p&gt;&#xA;&lt;p&gt;The target is not an autonomous runtime that rewrites itself, judges its own work, and deploys the result. That collapses proposal, evidence, and authority into one component.&lt;/p&gt;&#xA;&lt;p&gt;The stronger meaning is:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;A self-improving engineering program participates in a governed evidence loop: production and evaluation create auditable evidence, optimizers propose new program state, independent comparison tests the proposal, and a separate promotion boundary decides what may become active.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
