<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on Guy Freeman</title><link>https://gfrm.in/categories/python/</link><description>Recent content in Python on Guy Freeman</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 22 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://gfrm.in/categories/python/index.xml" rel="self" type="application/rss+xml"/><item><title>A Content-Addressed Foundation for Personal Knowledge</title><link>https://gfrm.in/posts/pkm-phase-1/</link><pubDate>Wed, 22 Apr 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/pkm-phase-1/</guid><description>&lt;p&gt;I have about eleven million words of personal documents. Contracts, invoices, court filings, medical notes, research papers, travel itineraries, conversation transcripts, CVs of various vintages, takeaway menus from restaurants that have since closed. A decade of Syncthing directories and Dropbox archives and email attachments saved twice because I wasn&amp;rsquo;t sure which copy was authoritative.&lt;/p&gt;
&lt;p&gt;I would like to ask questions about this corpus. Not vague questions — specific ones:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;When did I last see my doctor?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;What did Velotix pay me in September 2024?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Which of my subscriptions auto-renew in the next sixty days?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;What&amp;rsquo;s the warranty status on the water heater?&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of these fails on a different existing tool, for a different reason.&lt;/p&gt;</description></item><item><title>Keeping the Coding Agent on the Straight and Narrow</title><link>https://gfrm.in/posts/pkm-coding-agent-discipline/</link><pubDate>Wed, 22 Apr 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/pkm-coding-agent-discipline/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Help me keep that coding agent pup on the straight and narrow, as it likes to be &amp;lsquo;pragmatic&amp;rsquo;.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That was the instruction I gave Claude.ai a week before any code was written for &lt;a href="https://gfrm.in/posts/pkm-phase-1/"&gt;a personal-knowledge-management project&lt;/a&gt;. Its companion describes what that foundation is and why none of the existing tools fit. This one is about how the foundation got built: two AIs, one spec as the contract between them, and what it takes to keep a coding agent from quietly corrupting your architecture.&lt;/p&gt;</description></item><item><title>Teaching Zork to a Bayesian</title><link>https://gfrm.in/posts/teaching-zork/</link><pubDate>Tue, 28 Apr 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/teaching-zork/</guid><description>&lt;div class="callout callout-note"&gt;
 This is Part 2 of a series. For the axioms and types underneath, see &lt;a href="https://gfrm.in/posts/three-types/"&gt;Part 1: Three Types and a Funeral&lt;/a&gt;. For the state-representation consequences, see &lt;a href="https://gfrm.in/posts/loop-problem/"&gt;Part 3: The Loop Problem&lt;/a&gt;.
&lt;/div&gt;

&lt;p&gt;Every AI agent demo involves web search, retrieval, or API calls &amp;mdash; tasks where querying everything is merely expensive. A LangChain ReAct agent that hammers all four tools on every question wastes money but still gets answers. The penalty is economic, not existential.&lt;/p&gt;</description></item><item><title>Agentic AI Is Neither Intelligent Nor an Agent</title><link>https://gfrm.in/posts/agentic-ai/</link><pubDate>Mon, 23 Feb 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/agentic-ai/</guid><description>&lt;p&gt;I&amp;rsquo;ve spent the last few months building agents that maintain actual beliefs and update them from evidence — first &lt;a href="https://gfrm.in/posts/bayesian-agent/"&gt;a Bayesian learner&lt;/a&gt; that teaches itself which foods are safe, then &lt;a href="https://gfrm.in/posts/bayesian-agent-part2/"&gt;an evolutionary system&lt;/a&gt; that discovers its own cognitive architecture. The experience has given me a certain clarity about the industry&amp;rsquo;s use of the word &amp;ldquo;agent,&amp;rdquo; in much the same way that learning to cook gives you clarity about airline food.&lt;/p&gt;
&lt;p&gt;What would it take for an AI system to genuinely deserve the word?&lt;/p&gt;</description></item><item><title>How Decision Theory Cuts Your AI Agent's API Bill in Half</title><link>https://gfrm.in/posts/decision-theory-agents/</link><pubDate>Mon, 23 Feb 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/decision-theory-agents/</guid><description>&lt;p&gt;The &lt;a href="https://gfrm.in/posts/agentic-ai/"&gt;companion essay&lt;/a&gt; argued that LLM-based &amp;ldquo;agents&amp;rdquo; don&amp;rsquo;t earn the title. No beliefs, no uncertainty quantification, no principled mechanism for deciding whether a tool query justifies its cost. This post supplies the technical scaffolding for that claim &amp;mdash; the mathematics and code behind &lt;a href="https://github.com/gfrmin/credence"&gt;Credence&lt;/a&gt;, the benchmark I built to test it. Think of it as the receipts.&lt;/p&gt;
&lt;div class="callout callout-note"&gt;
 For the philosophical argument, see &lt;a href="https://gfrm.in/posts/agentic-ai/"&gt;Agentic AI Is Neither Intelligent Nor an Agent&lt;/a&gt;.
&lt;/div&gt;

&lt;h2 id="the-problem-every-query-has-a-price"&gt;The Problem: Every Query Has a Price&lt;/h2&gt;
&lt;p&gt;Hand a standard LangChain ReAct agent a question and four tools, and it will query most of them most of the time. It possesses no apparatus for reasoning about whether the next query repays its cost. The prompt says &amp;ldquo;be helpful&amp;rdquo;; the agent takes helpfulness to mean exhaustiveness.&lt;/p&gt;</description></item><item><title>Evolution Discovers How to Think: A Philosophical Journey in Code</title><link>https://gfrm.in/posts/bayesian-agent-part2/</link><pubDate>Sat, 31 Jan 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/bayesian-agent-part2/</guid><description>&lt;p&gt;In &lt;a href="https://gfrm.in/posts/bayesian-agent/"&gt;Part 1&lt;/a&gt;, I built an agent that learns which foods are safe through Bayesian inference. It starts ignorant, observes outcomes, updates its beliefs using exact conjugate mathematics, and eventually acts with something resembling competence. Clean code, sound theory, and those belief distributions converging in real-time remain genuinely satisfying to watch, in the way that all correctly implemented mathematics is satisfying to watch.&lt;/p&gt;
&lt;p&gt;Something has been nagging at me, though.&lt;/p&gt;
&lt;p&gt;The agent learns &lt;em&gt;what&lt;/em&gt; to believe. I designed &lt;em&gt;how&lt;/em&gt; it believes. I chose the variables it perceives. I specified the structure of its world-model. I set the prior hyperparameters. The agent&amp;rsquo;s entire cognitive architecture &amp;mdash; the shape of its epistemic machinery &amp;mdash; came from me, handed down like tablets from a mountain. The agent had no say in the matter. As someone who spent years doing Bayesian statistics, I should know better than to treat the model structure as given. The prior over model structures is the prior that actually matters, and I skipped it entirely.&lt;/p&gt;</description></item><item><title>Building a Bayesian Learning Agent That Teaches Itself to Eat</title><link>https://gfrm.in/posts/bayesian-agent/</link><pubDate>Fri, 26 Dec 2025 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/bayesian-agent/</guid><description>&lt;p&gt;You&amp;rsquo;re stranded somewhere unfamiliar with twelve types of food scattered around. Some provide energy. Others are toxic. You don&amp;rsquo;t know which is which, you&amp;rsquo;re losing energy with every step, and nobody left a manual. The question is whether you can learn fast enough to survive.&lt;/p&gt;
&lt;p&gt;This is the exploration-exploitation tradeoff, and it&amp;rsquo;s one of those problems that sounds like a thought experiment until you actually have to solve it. Pure exploration &amp;mdash; trying everything at random &amp;mdash; kills you. Pure exploitation &amp;mdash; eating only what you currently believe is best &amp;mdash; starves you when better options exist two metres away. You need something that balances both, and ideally something with a mathematical proof attached.&lt;/p&gt;</description></item><item><title>Scalibur: Reading Body Composition from a Cheap Bluetooth Scale</title><link>https://gfrm.in/posts/scalibur/</link><pubDate>Mon, 22 Dec 2025 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/scalibur/</guid><description>&lt;p&gt;Body composition scales are, on their own terms, genuinely useful devices. Step on, wait a few seconds, receive a small dossier on your own physical form: weight, body fat percentage, muscle mass, and several other numbers whose accuracy I&amp;rsquo;m diplomatically not questioning here. The problem is what happens next. Your data vanishes into whichever proprietary app the manufacturer saw fit to build, typically bundled with aggressive upsells and privacy practices that would make a data broker wince.&lt;/p&gt;</description></item><item><title>I Built a GTD Telegram Bot in Under an Hour with Claude Code</title><link>https://gfrm.in/posts/gtd-lite-bot/</link><pubDate>Sat, 20 Dec 2025 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/gtd-lite-bot/</guid><description>&lt;p&gt;Every GTD app I&amp;rsquo;ve tried commits one of two sins. Either it&amp;rsquo;s a Byzantine fortress of features &amp;mdash; Kanban boards, team collaboration, productivity gamification, the full catastrophe (looking at you, OmniFocus) &amp;mdash; or it&amp;rsquo;s simple but demands you learn its particular syntax for categorising things, which rather defeats the purpose of a system meant to get tasks out of your head quickly.&lt;/p&gt;
&lt;p&gt;What I actually wanted was to type &amp;ldquo;buy milk tomorrow&amp;rdquo; into my phone and have it land in the right place. No app switching. No form fields. No learning a miniature programming language just to add a grocery item.&lt;/p&gt;</description></item></channel></rss>