<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>memory examples on Programmer.ie: Modern AI programming</title>
		<link>http://programmer.ie/examples/memory/</link>
		<description>Recent content in memory examples on Programmer.ie: Modern AI programming</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<atom:link href="http://programmer.ie/examples/memory/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Score three memory systems against the same six tasks</title>
				<link>http://programmer.ie/examples/memory/02-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/memory/02-chapter/</guid>
				<description>&lt;p&gt;A memory book needs an instrument before it needs a memory. The chapter&amp;rsquo;s&#xA;claim is that the measurement has to be separate from the thing being measured,&#xA;and that a number without a failure attribution is not a result. This is that&#xA;instrument: six canned tasks, three canned systems, and a scorecard that says&#xA;which failures belong to which cause.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&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;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd project-memory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd experiments/benchmark&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python -B -m memory_measurement.demo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;cd project-memory&#xA;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;cd experiments/benchmark&#xA;python -B -m memory_measurement.demo&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Python 3.11 or later. The demo has no dependencies, calls no model, and needs&#xA;no service. It scores canned responses against canned labels, so it is a test&#xA;of the &lt;em&gt;instrument&lt;/em&gt;, not of any memory.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Tell a current fact from a historical one</title>
				<link>http://programmer.ie/examples/memory/08-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/memory/08-chapter/</guid>
				<description>&lt;p&gt;&amp;ldquo;Is it still true?&amp;rdquo; is two questions, and a memory that answers the wrong one&#xA;is worse than one that answers neither. The suite here scores &lt;em&gt;current&lt;/em&gt; state&#xA;accuracy and &lt;em&gt;historical&lt;/em&gt; state accuracy separately, per temporal shape, so a&#xA;system that remembers everything and a system that only remembers the present&#xA;are not averaged into one number.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&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;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd project-memory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python solution/run_ch8.py --outdir ./runs/ch8-demo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;cd project-memory&#xA;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;python solution/run_ch8.py --outdir ./runs/ch8-demo&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Python 3.11 or later. The suite is fixture-level and deterministic: zero model&#xA;calls, no database, no service. It writes a new run directory; frozen runs are&#xA;never overwritten.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Find the loops nobody wrote down</title>
				<link>http://programmer.ie/examples/memory/09-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/memory/09-chapter/</guid>
				<description>&lt;p&gt;Some work is not finished and nobody wrote that down. The chapter&amp;rsquo;s claim is&#xA;that a memory can infer those open loops, and that the interesting measurement&#xA;is not how many it finds but how many it &lt;em&gt;invents&lt;/em&gt;. The suite here reports&#xA;both, and they are not the same number.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&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;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd project-memory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python solution/run_ch9.py --outdir ./runs/ch9-demo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;cd project-memory&#xA;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;python solution/run_ch9.py --outdir ./runs/ch9-demo&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Python 3.11 or later. The suite is fixture-level and deterministic: zero model&#xA;calls, no database, no service. It writes a new run directory.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Staged gates beat one big prompt, and the ablation shows it</title>
				<link>http://programmer.ie/examples/memory/11-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/memory/11-chapter/</guid>
				<description>&lt;p&gt;A derived loop is a consequence nobody wrote down: a change in one record that&#xA;implies something about another. The chapter&amp;rsquo;s claim is that these are hard&#xA;enough that the &lt;em&gt;order&lt;/em&gt; of the gates matters, and the suite tests that by&#xA;ablation: the same derived loops, with one stage removed at a time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&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;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd project-memory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python solution/run_ch11.py --outdir ./runs/ch11-demo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;cd project-memory&#xA;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;python solution/run_ch11.py --outdir ./runs/ch11-demo&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Python 3.11 or later. The suite is deterministic with zero model calls. It&#xA;writes a new run directory; frozen runs are never overwritten.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Replay a hundred and three traces and check the answer again</title>
				<link>http://programmer.ie/examples/memory/19-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/memory/19-chapter/</guid>
				<description>&lt;p&gt;The capstone replays the Chapter 12 condition ladder over 103 end-to-end&#xA;traces. Replay mode is the important part: it reads the frozen trace rather&#xA;than calling a model, so the result is deterministic and the run measures the&#xA;&lt;em&gt;memory&lt;/em&gt;, not the model that happened to be available on the day.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&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;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd project-memory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python solution/run_capstone.py --mode replay&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/project-memory.git&#xA;cd project-memory&#xA;git checkout 0a6419ab0d6f65e491374b971d214255f2b0d8e8&#xA;python solution/run_capstone.py --mode replay&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Python 3.11 or later. Replay mode makes no model call and needs no service. The&#xA;run writes a &lt;em&gt;new&lt;/em&gt; run directory under &lt;code&gt;experiments/benchmark/runs/&lt;/code&gt;; a frozen&#xA;run is never overwritten, and each run gets its own directory and manifest.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
