<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Mark Watson’s Artificial Intelligence Books and Blog]]></title><description><![CDATA[Author of 20+ books on AI and I have 50+ US patents. Here I talk about both technology and provide links to read my published books online.]]></description><link>https://marklwatson.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg</url><title>Mark Watson’s Artificial Intelligence Books and Blog</title><link>https://marklwatson.substack.com</link></image><generator>Substack</generator><lastBuildDate>Thu, 16 Apr 2026 09:35:32 GMT</lastBuildDate><atom:link href="https://marklwatson.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Mark Watson]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[marklwatson@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[marklwatson@substack.com]]></itunes:email><itunes:name><![CDATA[Mark Watson]]></itunes:name></itunes:owner><itunes:author><![CDATA[Mark Watson]]></itunes:author><googleplay:owner><![CDATA[marklwatson@substack.com]]></googleplay:owner><googleplay:email><![CDATA[marklwatson@substack.com]]></googleplay:email><googleplay:author><![CDATA[Mark Watson]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[I removed my OpenAI Account - notes for readers of my books]]></title><description><![CDATA[I was outraged by the pressure the Department of Defense and the Trump administration put on Anthropic last week to accept changes in their contract.]]></description><link>https://marklwatson.substack.com/p/i-removed-my-openai-account-notes</link><guid isPermaLink="false">https://marklwatson.substack.com/p/i-removed-my-openai-account-notes</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Sun, 01 Mar 2026 17:07:57 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I was outraged by the pressure the Department of Defense and the Trump administration put on Anthropic last week to accept changes in their contract.</p><p>I was also outraged by Sam Altman&#8217;s response and decided to simply remove my OpenAI account (easy to do: <a href="https://help.openai.com/en/articles/6378407-how-to-delete-your-account">https://help.openai.com/en/articles/6378407-how-to-delete-your-account</a>).</p><p>A number of my books have examples using OpenAI APIs. I will in the next few weeks modify the public GitHub repos for these books adding a directory OLD_MATERIAL that will contain the markdown file for any book chapters removed and the OpenAI example code). This will allow my readers to still easily read the removed material as well as the example code.</p><p>I will also push revised copies of the affected books to: <a href="https://leanpub.com/u/markwatson">https://leanpub.com/u/markwatson</a></p>]]></content:encoded></item><item><title><![CDATA[Balancing Privacy and Productivity]]></title><description><![CDATA[I build my digital life on two primary service providers:]]></description><link>https://marklwatson.substack.com/p/balancing-privacy-and-productivity</link><guid isPermaLink="false">https://marklwatson.substack.com/p/balancing-privacy-and-productivity</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Sun, 22 Feb 2026 13:48:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I build my digital life on two primary service providers:</p><ul><li><p>Proton: mail, cloud storage, and Lumo private LLM chat (integrated web search tool with a strong Mistral model: my default tool that replaces plain web searches as well as covering 90% of my routine &#8216;LLM chat&#8217; use)</p></li><li><p>Google: Gemini APIs, occasional use of Gemini for deep research, very occasional use of AntiGravity for coding using Claude and Gemini models, YouTube Plus for entertainment (philosophy talks, nature videos, Qi Gong exercise, etc. etc.)</p></li></ul><p>I also use:</p><ul><li><p>DuckDuckGo: when I still do web search, DDG is my default.</p></li></ul><h3>Make your own decisions</h3><p>While I argue that almost everyone should think more carefully what personal and business information they leak to thousands of companies that buy, sell, trade, and use your data - and what to do to minimize these oozing data leaks - the question of how to stay productive is probably more difficult for you, dear reader.</p><p>I am happily retired so I understand that my tool and infrastructure requirements are easier to reconcile with privacy concerns than those of my online friends who are reading this.</p>]]></content:encoded></item><item><title><![CDATA[Using both a 16B MacBook Air and a 32B Mac mini for LLM Experiments: My Setup]]></title><description><![CDATA[As I write this I am using the new glm-4.7-flash model on my &#8216;headless&#8217; MacMini for general use and for for coding assistants like Claude Code (not using Anthropic&#8217;s models).]]></description><link>https://marklwatson.substack.com/p/using-both-a-16b-macbook-air-and</link><guid isPermaLink="false">https://marklwatson.substack.com/p/using-both-a-16b-macbook-air-and</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Sat, 24 Jan 2026 17:26:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have a setup that other people might find useful. I leave my M2Pro MacMini tucked away always running headless. I use the Tailscale service to assign a &#8220;sort of&#8221; IP address to the MacMini - in fact, other devices must have TailScale installed and all devices need to be using the same configuration. I have never used TailScale before so it took almost 20 minutes to setup both my Macs, iPad Pro, and my iPhone.</p><p>On my MacMini, I always keep running:</p><p><code>OLLAMA_HOST=0.0.0.0 OLLAMA_CONTEXT_LENGTH=32768 ollama serve</code></p><p>Setting a larger than default context length is crucial. For example running Claude Code using a Ollama hosted model fails with a smaller context.</p><p>On my MacBook Air I need to set the OLLAMA_HOST address assigned by Tailscale <strong>(set the IP address Tailscale gives you, not the &#8216;dummy&#8217; one I show here)</strong>:</p><p><code>$ OLLAMA_HOST=100.122.241.16 ollama list</code></p><p><code>NAME                       ID              SIZE      MODIFIED  nemotron-3-nano:latest     b725f1117407    24 GB     4 weeks ago</code></p><p><code>devstral-small-2:latest    24277f07f62d    15 GB     4 weeks ago  </code></p><p><code>....</code></p><p></p><p><strong>In Python code:</strong></p><p></p><p><code>import os, ollama</code></p><p><code>_remote = os.getenv(&#8221;REMOTE_OLLAMA&#8221;)</code></p><p><code>client = ollama.Client(host=_remote) if _remote else ollama</code></p><p><code>def completion(prompt):</code></p><p><code>    print(f&#8221;\n\n$$ completion: prompt: {prompt}\n\n&#8221;)</code></p><p><code>    response = client.chat(</code></p><p><code>        model=&#8221;rnj-1&#8221;,</code></p><p><code>        messages=[{&#8221;role&#8221;: &#8220;user&#8221;, &#8220;content&#8221;: prompt}]</code></p><p><code>    )</code></p><p><code>    ret = response[&#8221;message&#8221;][&#8221;content&#8221;]</code></p><p><code>    print(f&#8221;\n\n$$ completion: ret: {ret}\n\n&#8221;)</code></p><p><code>    return ret</code></p><p><code>print(completion(&#8221;1 + 3&#8221;))</code></p><p>I also find it useful to set a shell script for using ollama on the remote MacMini that I call &#8216;mollama&#8217;:</p><p><code>$ cat ~/bin/mollama </code></p><p><code>#!/usr/bin/env zsh</code></p><p><code>OLLAMA_HOST= 100.122.241.16:11434 exec ollama &#8220;$@&#8221;%                                                                         </code></p><p><code>$ chmod +x ~/bin/mollama</code></p><p></p><h3>Using Open WebUI on MacBook Air to access to my MacMini:</h3><p><code>uv tool install open-webui --python 3.11</code></p><p>Run using:</p><p><code>OLLAMA_HOST=100.122.241.16 open-webui serve</code></p><p>To NOT show OpenAI models, just models on the MacMini with Ollama:</p><p><code>OLLAMA_HOST=100.122.241.16 OPENAI_API_KEY=&#8217;&#8217; OPENAI_KEY=&#8217;&#8217; open-webui serve</code></p><p>Note, to uninstall use:</p><p><code>uv tool uninstall open-webui</code></p><h3>Using Claude Code (not using Anthropic&#8217;s models)</h3><p>Set these environment variables:</p><p><code>export ANTHROPIC_AUTH_TOKEN=ollama</code></p><p><code>export ANTHROPIC_BASE_URL=http://100.122.241.16:11434</code></p><p><code>export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1</code></p><p>And then create an alias:</p><p><code>alias CLAUDE=&#8217;~/.local/bin/claude --model glm-4.7-flash&#8217;</code></p><h3>Problems</h3><p>The only hassle with my setup is that even though I keep a few SSH sessions open on the remote MacMini, at least twice a week I find that I need to plug the MacMini into a monitor and keyboard/mouse for admin actions that I can&#8217;t easily do on the command line.</p>]]></content:encoded></item><item><title><![CDATA[Supporting Goals of Free Software Foundation while using Apple hardware]]></title><description><![CDATA[My personal rationalizations...]]></description><link>https://marklwatson.substack.com/p/supporting-goals-of-free-software</link><guid isPermaLink="false">https://marklwatson.substack.com/p/supporting-goals-of-free-software</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Fri, 14 Nov 2025 22:29:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I just rejoined the FSF (<a href="https://www.fsf.org/">https://www.fsf.org/</a>) recently after almost ten years of not being a member. For decades I relied on Linux for work and writing and being a member of the FSF made sense. However when I decided to simplify my life and use a MacBook, an iPhone, and an iPad then I let my FSF membership drop. I am enjoying being a member again.</p><p>I am not recommending that anyone adopt my setup, but it may still be of general interest:</p><p><strong>Apps vs. Web Browser</strong></p><p>On mobile devices (and my MacBook) I don&#8217;t like to install apps unless it is something like a Chess game app. Services like Email, Mastodon, Facebook, YouTube, and X all work fine in a web browser, even with the DuckDuckGo browser which is usually my default.</p><p><strong>Email</strong></p><p>I use my own custom domain on Apple iCloud email. Convenient enough. I use backup ProtonMail and Gmail accounts.</p><p>I use the DuckDuckGo web browser, even on my iPhone, for these three services.</p><p><strong>AI vs. No AI</strong></p><p>Well, I have been a paid AI practitioner since 1982 but I believe that modern (LLM based) AI should be used purposely, keeping in mind &#8220;productivity vs. just playing around issues.&#8221; The resource costs of overuse of AI might cause an economic crash (a favorite little conspiracy theory of mine).</p><p>I like to have AI available only when I specifically want it. Usually I just code in plain-old <strong>Emacs</strong> for coding and writing my books. If I specifically want AI help with something then for an IDE experience I will use the TRAE coding agent. For command line, I will use gemini-cli or codex. I like to use AI coding help 4 or 5 times a week. As an example, today I wanted some Python code that used a few libraries converted to Common Lisp (using several popular CL libraries). TRAE one-shotted this for me in two minutes. I think it would have taken me over 20 minutes to write it myself.</p><p>AI is OK for easy stuff you can do yourself, and save time.</p><p>I prefer to use AI less, rather than more often but I love writing open source software and Open Content licensed books (<a href="https://leanpub.com/u/markwatson">https://leanpub.com/u/markwatson</a>) - no strong desire to over-automate my work. But I appreciate AI tools when I do use them.</p><p><strong>Do it myself AI integrations</strong></p><p>I do write many small Python (and occasionally Lisp) utilities for specific purposes using LLM APIs. I prefer local LLMs on Ollama or LM Studio but I also use commercial APIs.</p><p><strong>AI / Web Browser Integration?</strong></p><p>In general I say NO! After reading their privacy docs I did experiment a few hours each with the Perplexity Comet Browser and OpenAI&#8217;s ChatGPT Atlas and I have read the docs for Opera Neon and Brave with Leo. (I used Proton&#8217;s Lumo AI for two months which is not really a browser integration and decided I didn&#8217;t want to pay for it after two months.)</p><p>I am a human being, I like to think for myself, and just use AI sparingly.</p><p>One option I am investigating is the &#8220;AI tab&#8221; on the DuckDuckGo browser that seems very useful and is privacy preserving. I am evaluating DDG&#8217;s subscription paid plan month by month, haven&#8217;t subscribed for a year yet.</p><p><strong>Software Development</strong></p><p>I find macOS almost as good as Linux for coding. I do keep one or two small Linux VPSs running on the web when Linux is better than macOS.</p>]]></content:encoded></item><item><title><![CDATA[Apple's Hybrid Intelligence Architecture]]></title><description><![CDATA[Combining local model inferencing with secure cloud computation]]></description><link>https://marklwatson.substack.com/p/apples-hybrid-intelligence-architecture</link><guid isPermaLink="false">https://marklwatson.substack.com/p/apples-hybrid-intelligence-architecture</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Thu, 13 Nov 2025 16:09:59 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I wrote a iPadOS/iOS app &#8220;Mark Chat&#8221; a few months ago: <a href="https://apps.apple.com/us/app/markchat/id6747982917">https://apps.apple.com/us/app/markchat/id6747982917</a> I have good intentions of adding this app as an example to my Swift AI book (read online: https://leanpub.com/SwiftAI/read).</p><p>This app combines Apple&#8217;s local 3B parameter system model with secure cloud based inference, as needed. Apple&#8217;s AI efforts have received some justified criticism for slow rollout of features, but I believe Apple is on the right track.</p><p>When using Apple&#8217;s hybrid model system, what is computed locally? Here is a rough breakdown:</p><p><strong>Processed On-Device (Local):</strong> These tasks are typically low-complexity, highly repetitive, context-dependent, and privacy-sensitive. They must be fast and available offline.</p><ul><li><p><strong>Writing Tools:</strong> Proofreading, tone adjustments (friendly, professional, concise).</p></li><li><p><strong>Summarization:</strong> Notification summaries, message preview summaries.</p></li><li><p><strong>Generation:</strong> Genmoji creation.</p></li><li><p><strong>Siri Context:</strong> Understanding on-device data (e.g., &#8220;What&#8217;s on my calendar?&#8221;).</p></li><li><p><strong>Photos:</strong> Intelligent search (after local indexing) and the &#8220;Clean up&#8221; tool.</p></li></ul><p><strong>Escalated to Private Cloud Compute (PCC):</strong> These tasks require more powerful generative models for higher-quality output, deeper reasoning, or broad-world knowledge.</p><ul><li><p><strong>Advanced Writing Tools:</strong> More complex &#8220;Rewrite&#8221; functions, Summary, Key Points, Lists, and Tables.</p></li><li><p><strong>Mail:</strong> Full email summarization and Smart Replies.</p></li><li><p><strong>Summarization (Broad):</strong> Summaries for Safari web pages and Notes audio recordings.</p></li><li><p><strong>ChatGPT Integration:</strong> Any request explicitly routed to a third-party model (which requires user permission).</p></li></ul><h3>Architecture of the ~3B Parameter On-Device Model</h3><p>The default on-device model is a highly optimized foundation model with approximately 3 billion parameters. It is not a generic, off-the-shelf model but a custom-built LLM designed specifically for efficient inference on Apple Silicon&#8217;s Neural Engine.</p><ul><li><p><strong>Performance and Optimization:</strong> To meet the strict memory, power, and performance requirements of a mobile device, the model employs aggressive optimization techniques. This includes a mixed 2-bit and 4-bit &#8220;low-bit palletization&#8221; strategy, achieving an average of 3.7 bits-per-weight. This aggressive quantization is key to fitting a 3B-parameter model into the device&#8217;s memory. On an iPhone 15 Pro (A17 Pro chip), this optimized model is capable of generating approximately 30 tokens per second.</p></li><li><p><strong>Model Capabilities (Internal vs. External View):</strong> Apple&#8217;s internal human-evaluation benchmarks show this ~3B model outperforming larger, well-regarded open-source models like Mistral-7B, Gemma-7B, and Llama-3-8B on a variety of user-facing tasks.</p></li><li><p>This data, however, is complemented by third-party developer benchmarks. These independent tests suggest that on raw academic NLP benchmarks (like MMLU), the <em>base</em> on-device model may underperform similarly-sized models like Phi-3 Mini. This juxtaposition does not imply a contradiction, but rather a clarification of the model&#8217;s purpose. It is not a general-purpose, high-knowledge LLM; it is a highly-tuned, <em>task-oriented</em> engine optimized for the specific functions of Apple Intelligence (summarization, tone adjustment, etc.).</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Digital Diet]]></title><description><![CDATA[Removing clutter and saving time]]></description><link>https://marklwatson.substack.com/p/digital-diet</link><guid isPermaLink="false">https://marklwatson.substack.com/p/digital-diet</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Sat, 25 Oct 2025 18:09:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I started investing personal time in learning and personal research in 1977 when I read &#8220;Mind Inside Matter&#8221; and started using Lisp languages. While I believe that adequate random exploration followed by drilling down into interesting topics is useful for career development and enjoyment every few years I evaluate how I spend time and make adjustments. I am performing one of these digital diet phases this week. Hopefully my notes may help you too:</p><ol><li><p>One of my largest time syncs is switching between privacy preserving tools and sometimes more useful tools. I love ProtonMail but I stopped using it yesterday because of the time sync of periodically switching my domain between Gmail and ProtonMail and other overhead of using two email providers. While I believe privacy is important in general, in my particular case I spend all my time writing open source software and writing open content books: everything I do is non-private. If I ran a company, we would probably use Proton products, but for my independent open work having just a single simple email system like Gmail is a time saver. (I configure Google services for maximum privacy and security and minimum data sharing.)</p></li><li><p>I spend too much time trying to do too much using local LLM models. This week I created a short list of use cases where local models run using Ollama and LM Studio make sense for my work flows (mostly using small models embedded in  specific applications). Everything else is now handled by paying for Gemini and GPT-5 (all variants) and I am trying to spend much less time experimenting with all available models (except Anthropic: I don&#8217;t like their business model, but that is just me).</p></li><li><p>OK, now that I have the smaller stuff out of the way, I will address a larger time sync: spending too much time configuring Emacs and VSCode to use many different local and remote LLM-powered AI coding agents and then interrupting editing work flow switching to AI tools inside an editor or IDE. While I do have many useful packages added to both editors I use, for my work flow I am much more time efficient just using Emacs (mostly) and VSCode (sometimes useful for projects with many files) for editing. I am now just using command line coding agents: I am standardizing on just using Google&#8217;s gemini-client and OpenAI&#8217;s codex when I specifically want help in writing code, tweaking documentation, of brainstorming possible code changes. Splitting AI use out to just command line interactions saves me time and effort. Consider this attitude as &#8216;anti-IDE.&#8217;</p></li></ol>]]></content:encoded></item><item><title><![CDATA[Using LLMs vs. 'The Environment']]></title><description><![CDATA[A short rant about people who overuse LLM AI's]]></description><link>https://marklwatson.substack.com/p/using-llms-vs-the-environment</link><guid isPermaLink="false">https://marklwatson.substack.com/p/using-llms-vs-the-environment</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Thu, 09 Oct 2025 19:03:57 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There&#8217;s a strange irony in watching people talk about global warming and other environmental problems while simultaneously hammering away at chatbots like they&#8217;re infinite-energy oracles. Every throwaway prompt like &#8220;write my tweet,&#8221; &#8220;summarize this article,&#8221; &#8220;draft an email to my cat,&#8221; etc. runs on megawatts and datacenter water cooling. It&#8217;s not that using LLMs is evil; it&#8217;s that <em>overusing</em> them as a replacement for thinking has become its own form of digital pollution. While there is a real environmental cost, perhaps the erosion of intellectual self-sufficiency is even more damaging.</p><p>Agentic programming tools take this wastefulness to another level. These &#8220;autonomous&#8221; agents chain LLM calls together, recursively prompting other models, often without meaningful human oversight. Each step burns compute cycles. The result isn&#8217;t intelligence&#8212;it&#8217;s a Rube Goldberg machine of API calls, an illusion of progress paid for in electricity, latency, and cognitive outsourcing. If overusing LLM Chat is leaving the lights on, then agentic systems are the AI equivalent of lighting up Las Vegas to toast a single slice of bread.</p><p>To be clear, dear reader, I use gemini-cli and codex a few times a week to good effect. What I am complaining about here is devs on social media bragging how many agentic AI coding sessions they keep running in multiple sessions.</p><p>The energy and other environmental externalities for over-using or miss-using AI are extreme, dumping on our environment and our future economy.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Gerbil Scheme OpenAI, Google Gemini, and Ollama Local Model Clients]]></title><description><![CDATA[Three short examples in the Lisp language Gerbil Scheme]]></description><link>https://marklwatson.substack.com/p/gerbil-scheme-openai-google-gemini</link><guid isPermaLink="false">https://marklwatson.substack.com/p/gerbil-scheme-openai-google-gemini</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Sun, 24 Aug 2025 20:05:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://cons.io">Gerbil Scheme</a> is a modern Lisp with a &#8220;batteries included&#8221; library. Here we look at three simple examples that demonstrate network IO and handling JSON responses.</p><p>September 19, 2025 update: I have released a book about Gerbil Scheme: <a href="https://leanpub.com/Gerbil-Scheme/read">Gerbil Scheme in Action - AI Applications, Network Programming, and Utilities</a></p><p>Let&#8217;s start with local model (Ollama must be installed and &#8216;ollama serve&#8217; should be running):</p><pre><code>(import :std/net/request :std/text/json)
(export ollama)

(def (ollama prompt
             model: (model "gemma3:latest")) ;; "gpt-oss:20b")) ;; "qwen3:0.6b"))
  (let* ((endpoint "http://localhost:11434/api/generate")
         (headers '(("Content-Type". "application/json")))
         (body-data 
           (list-&gt;hash-table
             `(("model". ,model) ("prompt". ,prompt) ("stream". #f))))
         (body-string (json-object-&gt;string body-data)))

    (let ((response
            (http-post endpoint headers: headers data: body-string)))
      (if (= (request-status response) 200)
          (let* ((response-json (request-json response)))
            ;;(displayln (hash-keys response-json))
            (hash-ref response-json 'response))
          (error "Ollama API request failed"
                 status: (request-status response)
                 body: (request-text response))))))

;;  (ollama "why is the sky blue? Be very concise.")</code></pre><p>You would run this example using:</p><pre><code>$ gcx ollama.ss
$ gxi 
Gerbil v0.18.1-78-gc5546da0 on Gambit v4.9.5-124-g6d1a9a9b
&gt; (import :ollama/ollama)
&gt; (ollama "why is the sky blue?")
"The blue color of the sky is a...."</code></pre><p>The Gemini example is similar except the web service call must be authenticated:</p><pre><code>;; File gemini.ss
(import :std/net/request
        :std/text/json)

(export gemini)

(def uri2 "https://generativelanguage.googleapis.com/v1beta/models/")

(def (gemini prompt
             model: (model "gemini-2.5-flash")
             system-prompt:
             (system-prompt "You are a helpful assistant."))
     (let ((api-key (get-environment-variable "GOOGLE_API_KEY")))
       (unless api-key
         (error "GEMINI_API_KEY environment variable not set."))

       (let* ((headers `(("Content-Type". "application/json")
                         ("x-goog-api-key". ,api-key)))
              (body-data
               (list-&gt;hash-table
                `(("contents".
                   ,(list
                      (list-&gt;hash-table
                         `(("role". "user")
                           ("parts".
                             ,(list
                               (list-&gt;hash-table
                                `(("text". ,prompt))))))))))))
              (body-string (json-object-&gt;string body-data))
              (endpoint
               (string-append
                 uri2
                 model ":generateContent?key=" api-key)))

         (let ((response
                (http-post
                  endpoint headers: headers data: body-string)))
           (if (= (request-status response) 200)
               (let* ((response-json (request-json response))
                      (candidate
                        (car (hash-ref response-json 'candidates)))
                      (content (hash-ref candidate 'content))
                      (p1 (car (hash-ref content 'parts))))
                 (hash-ref p1 'text)))))))

;;   (gemini "why is the sky blue? be very concise")</code></pre><p>The OpenAI example is similar:</p><pre><code>(import :std/net/request
        :std/text/json)

(export openai)

(def (openai
       prompt
       model: (model "gpt-5-mini")
       system-prompt: (system-prompt "You are a helpful assistant."))
     (let ((api-key (get-environment-variable "OPENAI_API_KEY")))
    (unless api-key
      (error "OPENAI_API_KEY environment variable not set."))

    (let* ((headers `(("Content-Type". "application/json")
                      ("Authorization".
                       ,(string-append "Bearer " api-key))))
           (body-data
            (list-&gt;hash-table
             `(("model". ,model)
               ("messages".
                ,(list
                   (list-&gt;hash-table
                    `(("role". "system")
                      ("content". ,system-prompt)))
                   (list-&gt;hash-table `(("role". "user")
                                       ("content". ,prompt))))))))
           (body-string (json-object-&gt;string body-data))
           (endpoint "https://api.openai.com/v1/chat/completions"))

      (let ((response
              (http-post
                endpoint headers: headers data: body-string)))
        (if (= (request-status response) 200)
            (let* ((response-json (request-json response))
                   (choices (hash-ref response-json 'choices))
                   (first-choice (and (pair? choices) (car choices)))
                   (message (hash-ref first-choice 'message))
                   (content (hash-ref message 'content)))
              content)
            (error "OpenAI API request failed"
                   status: (request-status response)
                   body: (request-text response)))))))

;;  (openai "why is the sky blue? be very concise")
</code></pre><p>Gerbil Scheme is useful for general network and concurrent programming tasks.</p><p></p>]]></content:encoded></item><item><title><![CDATA[How do you manage your time evaluating new AI tools?]]></title><description><![CDATA[I used to try everything - I don&#8217;t do that anymore]]></description><link>https://marklwatson.substack.com/p/how-do-you-manage-your-time-evaluating</link><guid isPermaLink="false">https://marklwatson.substack.com/p/how-do-you-manage-your-time-evaluating</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Fri, 01 Aug 2025 14:33:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hello dear readers, do you ever get frustrated at the end of a week when you realize how many hours you spent reading about new AI tools (most frequently LLM based, sometimes RL and good old fashioned ML) and trying them? I do!</p><p>As a form of &#8220;digital diet&#8221; I now only pay a yearly subscription for Google Gemini Plus, ignoring OpenAI and Claude. Do I have fear of missing out (FOMO) when, for example, I hear people raving on Hacker News that Claude Code is the &#8220;bat&#8217;s ass&#8221; best coding tool? Nope. I just happily switch between using Google&#8217;s gemini-cli in either free mode or paid API mode and usually have a pleasant and productive coding session - but after some soul searching I have changed my habits to often just coding from scratch and not by default start using a coding agent.</p><p>I really believe that the big win using AI is in improving ourselves, as a learning tool, and for research. Dear readers, obviously you get to decide for yourselves how much you use AI vs. &#8216;doing it all yourself.&#8217;</p><p><strong>One other thing, some news: I am writing a new book based on using LM Studio to work using AI offline.</strong></p><p>I love using Ollama for personal research, and I enjoy maintaining my book on Ollama by adding examples and updating it. However, I find that I use Ollama and LM Studio for different local AI use cases so it is worth writing down what I am learning and my workflows (with plenty of example code) in a separate book. I only have three chapters written so far; in a few weeks I will publish the first version and post on Substack a link to read the new book online.</p>]]></content:encoded></item><item><title><![CDATA[Added material for using Moonshot AI's Kimi K2 model to my Common Lisp book]]></title><description><![CDATA[Kimi K2 is cost effective and is excellent for reasoning and tool use]]></description><link>https://marklwatson.substack.com/p/added-material-for-using-moonshot</link><guid isPermaLink="false">https://marklwatson.substack.com/p/added-material-for-using-moonshot</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Tue, 29 Jul 2025 18:09:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You can reads the new material online at <a href="https://leanpub.com/lovinglisp/read#leanpub-auto-moonshots-kimi-k2-model">https://leanpub.com/lovinglisp/read#leanpub-auto-moonshots-kimi-k2-model</a></p><p>Enjoy!</p><p>I now keep both the example programs and the book&#8217;s manuscript files in one public repository: <a href="https://github.com/mark-watson/loving-common-lisp">https://github.com/mark-watson/loving-common-lisp</a></p><p></p>]]></content:encoded></item><item><title><![CDATA[I am taking a break from LLMs, updating my Lisp books instead]]></title><description><![CDATA[For over two years I have spent most of my personal development time implementing LLM-based RAG system, experimenting with local models, and trying to build my own LLM-based tools from the ground up.]]></description><link>https://marklwatson.substack.com/p/i-am-taking-a-break-from-llms-updating</link><guid isPermaLink="false">https://marklwatson.substack.com/p/i-am-taking-a-break-from-llms-updating</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Thu, 24 Jul 2025 23:40:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>For over two years I have spent most of my personal development time implementing LLM-based RAG system, experimenting with local models, and trying to build my own LLM-based tools from the ground up. I now feel stuck with LLM tool calling and building agentic systems: it is simple enough to build demo or example systems  but I find the commercial products like gemini-cli and OpenAI agent mode to be so much more compelling than what I prototype for my own use (especially when using weaker local models running on Ollama) that I feel like taking a break for a few months.</p><p>I thought about what I felt like doing for a few months, and it is an easy call: do some Lisp hacking!</p><p>I plan on concentrating on Clojure and Common Lisp, but will probably spend some time with Racket and Hy (hylang). Anything interesting I work on will probably be added to one of my existing Lisp books: <a href="https://leanpub.com/u/markwatson">https://leanpub.com/u/markwatson</a></p><p>A few days ago I did some code maintenance on my 12 year old web site <a href="https://cookingspace.com/">https://cookingspace.com/</a> that is written in Clojure. If I get that code sufficiently cleaned up I would like to open source it and add a new chapter to my Clojure book.</p>]]></content:encoded></item><item><title><![CDATA[AI bubbles]]></title><description><![CDATA[I have lived and worked through two previous &#8216;AI winters&#8217; and I expect the current bubble to eventually pop in a dramatic way.]]></description><link>https://marklwatson.substack.com/p/ai-bubbles</link><guid isPermaLink="false">https://marklwatson.substack.com/p/ai-bubbles</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Tue, 15 Jul 2025 14:13:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have lived and worked through two previous &#8216;AI winters&#8217; and I expect the current bubble to eventually pop in a dramatic way. There will be good things produced by AI, but I am skeptical of the panic FOMO rush to AGI or super intelligence.</p><p>I think technology improvements that drastically lower the costs of inference will hollow out the anticipated profits from xAI, Google, Anthropic, OpenAI, etc.</p><p>I was experimenting with tool use with Kimi K2 APIs yesterday - very effective (especially with tool use), and so incredibly inexpensive. I am retired, now doing independent research, so my requirements are very different than most tech people who are still in the job market or growing their own business. I find a combination of local Ollama models, with very inexpensive APis like Moonshot&#8217;s Kimi with occasional Gemini 2.5 Pro use, and occasionally using gemini-cli provides extraordinary value. Am I missing out by not using one or more $200-$300 a month subscriptions? Probably but I don&#8217;t care.</p><p><strong>Thoughts in NVdia&#8217;s $4T valuation</strong></p><p>There is no doubt that NVidia is a very well run company, great research and great products.</p><p>How large is NVidia&#8217;s moat?</p><p>NVidia is being propped up by the US government. Huawei&#8217;s new chips are lower tech but would probably hit a good &#8216;practical sweet spot&#8217; for AI data centers in many countries around the world but our current administration is threatening economic violence against any countries who choose to use more cost effective Huawei AI chips. Given protectionism by the US government and the quality of NVidia&#8217;s products I think NVidia&#8217;s stock value is secure for now, but it will probably eventually get disrupted.</p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[AI needs highly effective continuous learning]]></title><description><![CDATA[A hallmark of human cognition is the ability for continual, data-efficient learning and knowledge consolidation.]]></description><link>https://marklwatson.substack.com/p/ai-needs-highly-effective-continuous</link><guid isPermaLink="false">https://marklwatson.substack.com/p/ai-needs-highly-effective-continuous</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Sat, 05 Jul 2025 17:34:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A hallmark of human cognition is the ability for continual, data-efficient learning and knowledge consolidation. Current techniques like RAG, which treat past interactions as a static corpus for retrieval, fail to replicate this dynamic process, limiting agents to a non-evolving, superficial memory. Knowledge graphs, drawing from Semantic Web technologies, provide a robust formalism for representing episodic memory for rich, contextual retrieval. The critical gap, however, is not just in memory representation, but in the autonomous mechanisms for lifelong learning&#8212;enabling an agent to generalize and evolve its internal models from that stored experience.</p><p></p><p>I would love to see more engineering and research (or Common Lisp hacking if you roll that way &#128515;) directed towards algorithms for building, maintaining, accessing and using episodic memories of agents&#8217; experiences.</p>]]></content:encoded></item><item><title><![CDATA[My new book "Practical AI with Google: A Solo Knowledge Worker's Guide to Gemini, AI Studio, and LLM APIs"]]></title><description><![CDATA[You can read my new book online at Practical AI with Google: A Solo Knowledge Worker's Guide to Gemini, AI Studio, and LLM APIs]]></description><link>https://marklwatson.substack.com/p/my-new-book-practical-ai-with-google</link><guid isPermaLink="false">https://marklwatson.substack.com/p/my-new-book-practical-ai-with-google</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Mon, 05 May 2025 16:32:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You can read my new book online at <a href="https://leanpub.com/solo-ai/read">Practical AI with Google: A Solo Knowledge Worker's Guide to Gemini, AI Studio, and LLM APIs</a></p><p>Most books I have written are deeply technical - this is not one of them. Here, I attempt to make state of the art AI approachable and usable to a wider and not necessarily technical audience.</p><h1>A Decision Surface</h1><p>My previous book <a href="https://leanpub.com/ollama/read">Ollama in Action: Building Safe, Private AI with LLMs, Function Calling and Agents</a> concerned running local LLMs using Ollama - an idea I like for security and privacy (and fun!) reasons. Recent reasoning models like qwen3:30b, gemma3:27b-it-qat, and qwen3:30b can be run very well on a high end home computer, but they are very slow compared to using APIs from Google, OpenAI, etc. and that slows down my development process.</p><p>For a few years I wrote my own utilities using LLMs (both local and commercial APIs) to get stuff done, now I do much less coding, using instead products built around Gemini (and less often ChatGPT) because the product offerings do mostly what I want with no custom coding on my part.</p><p>I have been retired for a two years but I still spend 3 to 4 hours a day performing what I call &#8220;personal research&#8221; so my developer use cases are probably different than most people reading this. Something we all share however is the experience of living through exponential growth of AI capabilities.</p><p>What I can run on my home system (a Mac mini M2Pro with 32G) seems to be lagging in the capabilities of commercial APIs and end user AI products by about 6 months. For now I play in both worlds: state of the art commercial AI and what I can run locally.</p>]]></content:encoded></item><item><title><![CDATA[LLM Based Agents: Comparison Overview between LlamaIndex AgentWorkFlow and Microsoft AutoGen]]></title><description><![CDATA[Google Colab notebook for a talk I gave today]]></description><link>https://marklwatson.substack.com/p/llm-based-agents-comparison-overview</link><guid isPermaLink="false">https://marklwatson.substack.com/p/llm-based-agents-comparison-overview</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Wed, 05 Feb 2025 21:09:47 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have been experimenting with writing agents using small local LLMs, with mixed results. Experiments that perform poorly with small models running locally with Ollama usually work much better with larger models like OpenAI O1, etc. For my talk today I mostly used gpt-o1-mini, and ended with a simp,e example using Groq to run a distilled Deepseek R1 model.</p><p></p><p>Every thing is in this notebook: <a href="https://colab.research.google.com/drive/1hIa7Jgxe75AHYt2cvGCdcHSCGw8hGvd-?usp=sharing">My talk Colab Notebook</a></p>]]></content:encoded></item><item><title><![CDATA[Incredible capability advances of LLMs that I can run on my Mac: Deepseek-R1]]></title><description><![CDATA[Deepseek uses Reinforcement Learning as an alternative to using human supervised fine tuning]]></description><link>https://marklwatson.substack.com/p/incredible-capability-advances-of</link><guid isPermaLink="false">https://marklwatson.substack.com/p/incredible-capability-advances-of</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Tue, 21 Jan 2025 00:39:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Wow! I have been very pleased with the qwen2.5 and qwen2.5-coder models that easily run on my M2Pro 32G Mac. For reasoning I have been going back to using OpenAI O1 and Claude Sonnet, but after my preliminary tests with Deepseek-R1, I feel like I can do most everything now on my personal computer.</p><p>I am using: <strong>ollama run deepseek-r1:32b</strong></p><h3>A few resources:</h3><p>Download the research paper &#8220;DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning&#8221; from <a href="https://github.com/deepseek-ai/DeepSeek-R1/blob/main/DeepSeek_R1.pdf">https://github.com/deepseek-ai/DeepSeek-R1/blob/main/DeepSeek_R1.pdf</a></p><p>I recently published my new book &#8220;<strong>Ollama in Action: Building Safe, Private AI with LLMs, Function Calling and Agents</strong>&#8221; that can be read free online at <a href="https://leanpub.com/ollama/read">https://leanpub.com/ollama/read</a></p><p>While I sometimes enjoy tight integration of LLM tooling with editors like Emacs, VSCode, and PyCharm I also enjoy &#8216;pure&#8217; editing experiences and using a small script that you run in any source directory and pass a prompt on the command line: <a href="https://gist.github.com/mark-watson/8845cea9a38e2655a4b45a91400349c9">https://gist.github.com/mark-watson/8845cea9a38e2655a4b45a91400349c9</a></p><p>Fascinating interview from last year with the Deepseek CEO talking about his motivation for pure research towards AGI and his companies open source strategy: <a href="https://www.chinatalk.media/p/deepseek-ceo-interview-with-chinas">Deepseek: The Quiet Giant Leading China&#8217;s AI Race</a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Wow, Google's NotebookLM rocks for creating podcasts from text]]></title><description><![CDATA[I experimented with NotebookLM using the PDF from my Clojure AI book]]></description><link>https://marklwatson.substack.com/p/wow-googles-notebooklm-rocks-for</link><guid isPermaLink="false">https://marklwatson.substack.com/p/wow-googles-notebooklm-rocks-for</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Wed, 18 Sep 2024 21:22:05 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/149075296/739a571e3a4ae5b05c81af358f2573b5.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p>Today I took the PDF for my book "Practical Artificial Intelligence Programming With Clojure (<a href="https://leanpub.com/clojureai/read">you can read it free online here</a>) and used it to create a notebook in Google's&nbsp;<a href="https://notebooklm.google.com">NotebookLM</a>&nbsp;and asked for a generated 8 minute podcast. This experimental app created a podcast with two people discussing my book accurately and showing wonderful knowledge of technology. If you want to listen to the audio track that Google's NotebookLM created listen to the audio file attached to this blog article.</p>]]></content:encoded></item><item><title><![CDATA[New OpenAI gpt-o1-preview and gpt-o1-mini and one week experience with Replit.com AI Coding Agent]]></title><description><![CDATA[Too much fun...]]></description><link>https://marklwatson.substack.com/p/new-openai-gpt-o1-preview-and-gpt</link><guid isPermaLink="false">https://marklwatson.substack.com/p/new-openai-gpt-o1-preview-and-gpt</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Fri, 13 Sep 2024 17:27:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&nbsp;I have only spent a short while experimenting with the ne gtp-o1 models: so far very impressive for science, math, and instruction following. You need a ChatGPT Plus account to try it, or you can perform rate limited queries for half the monthly cost using&nbsp;<a href="https://apps.abacus.ai">Abacus AI</a></p><p>The thing I am most impressed with (this week!) is the&nbsp;<a href="https://replit.com">Replit.co AI coding agent</a>&nbsp;that after briefly trying it I pre-paid for a one year subscription. I quickly rewrote a complex Clojure web app in JavaScript making it much less expensive to host&nbsp;<a href="#">CookingSpace.com</a></p><p>I gave a live demo of Replit AI in my weekly AI demo and group chat. Please join:&nbsp;<a href="https://www.meetup.com/mark-watsons-informal-ai-presentations-and-group-chats">Mark Watson's informal AI presentations and group chats</a></p>]]></content:encoded></item><item><title><![CDATA[Code and notes from my talk today: Exploring the Future of AI: Introduction to using LLMs using Python]]></title><description><![CDATA[Topics: Large context prompts with LLMs vs. RAGs using embeddings vector stores. How to avoid LLM hallucination. 3 code demos.]]></description><link>https://marklwatson.substack.com/p/code-and-notes-from-my-talk-today</link><guid isPermaLink="false">https://marklwatson.substack.com/p/code-and-notes-from-my-talk-today</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Thu, 15 Aug 2024 20:36:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I started an informal code demo and group conversation <a href="https://www.meetup.com/mark-watsons-informal-ai-presentations-and-group-chats">Meetup group (link)</a> and today I gave a fifteen minute code demo followed by a conversation with the attendees. Here is a GitHub repo with the code examples: <a href="https://github.com/mark-watson/talk2_LLM_Python_intro">https://github.com/mark-watson/talk2_LLM_Python_intro</a></p><p>Here are my talk notes:<br><br><strong>Exploring the Future of AI: Introduction to using LLMs using Python</strong></p><p><strong>Riff on &#8216;AI grounding&#8217; and how LLMs help:</strong> LLMs, trained on vast amounts of text, excel at recognizing patterns and providing contextually relevant responses. They mimic grounded understanding by referencing large datasets that encompass a variety of real-world scenarios. For example, they can infer meanings from complex contexts by drawing on their training data. When LLMs are integrated with other modalities, such as vision or audio (e.g., vision-language models), the grounding improves. These models can associate text with images or sounds, making the connections more robust and closer to a human-like understanding of concepts.</p><p><strong>Tradeoffs between using large context LLMs</strong>: where a large body of text is added to a query prompt, to the alternative approach of breaking multiple documents into many separate chunks of text, calculating an embedding vector for each chunk, and then storing the chunks and their associated embedding vectors ins a vector data store.</p><p><strong>Long-Context LLMs:</strong>  designed to support processing large blocks of text, often an entire book, within a single prompt. These models can accommodate extended sequences of text, enabling them to consider more context at once. This is particularly useful for tasks that require maintaining continuity over long narratives or documents. However, long-context LLMs have limitations, such as performance degradation when the context becomes too long, which can lead to reduced accuracy in generating or retrieving relevant information. These models are also computationally expensive, as handling extensive sequences demands significant resources.</p><p>On the other hand, <strong>vector stores</strong> (or vector databases) work by converting text or other unstructured data into high-dimensional vectors using embeddings. These vectors are stored and can be retrieved based on their similarity to a query vector, allowing for efficient semantic search across vast datasets. This approach provides a form of &#8220;long-term memory&#8221; for LLMs, enabling them to access and retrieve relevant information from large collections of documents without needing to process the entire context at once. Vector stores are particularly useful in retrieval-augmented generation (RAG) systems, where they help the model to find and focus on the most relevant information, improving both efficiency and accuracy&nbsp; .</p><p>In essence, while long-context LLMs attempt to handle extensive information within the model&#8217;s processing window, vector stores offer an external memory solution that complements LLMs by efficiently managing and retrieving relevant information from larger datasets.</p><p><em><strong>&lt;Explain the code and run the three code demos now&gt;</strong></em></p><p><strong>What about LLM hallucinations?</strong></p><p>Long context windows and retrieval-augmented generation (RAG) data stores significantly reduce LLM hallucinations by improving the model's access to relevant and accurate information during the generation process.</p><p>1. Long Context Windows: When LLMs are equipped with long context windows, they can process and retain more information within a single session. This allows the model to maintain continuity and consistency over extended text, reducing the chances of fabricating information that doesn't align with the given context or user query. By having access to more surrounding context, the model can generate more coherent and accurate responses that are anchored in the actual input data.</p><p>2. RAG Embedding Vector Data Stores: In a RAG setup, an LLM is paired with a vector store that holds a vast amount of pre-processed, structured information. When a query is posed, the model retrieves relevant documents or data snippets from this store, which then informs the generation process. This retrieval step grounds the model's output in factual data, effectively reducing the likelihood of hallucinations. Since the model can rely on precise and contextually relevant information, it is less prone to generating plausible-sounding but incorrect or nonsensical content.</p><p>Together, these approaches enhance the reliability of LLM outputs. Long context windows allow the model to consider more of the input in a single pass, while RAG ensures that the model has access to verified information, leading to fewer instances of hallucination and more trustworthy results.</p>]]></content:encoded></item><item><title><![CDATA[Tools I am using: Aider+Anthropic and Rye]]></title><description><![CDATA[I have radically changed my workflows in the last few months.]]></description><link>https://marklwatson.substack.com/p/tools-i-am-using-aideranthropic-and</link><guid isPermaLink="false">https://marklwatson.substack.com/p/tools-i-am-using-aideranthropic-and</guid><dc:creator><![CDATA[Mark Watson]]></dc:creator><pubDate>Wed, 10 Jul 2024 22:43:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KZuU!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe482dc9f-5835-4907-9479-fc064854e367_4032x3024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Aider is AI pair programming in your terminal and Rye is my new driver for Python development.</p><p>I have a keen interest in the future of work and the automation of what I think of as &#8220;knowledge work.&#8221; Here I share my latest work setup for Python. Please add your own favorite tools in the comments. I am still experimenting with LLM-based tooling for Lisp languages.</p><p><strong>Aider</strong></p><p>Aider is a command-line tool for code refactoring and bug fixing, leveraging AI capabilities to improve code quality and development efficiency. It integrates with version control systems to understand the project&#8217;s history and provide contextual suggestions. Aider can analyze the codebase, identify potential issues, and recommend or automatically apply fixes, streamlining the development process and enhancing code maintainability. <a href="https://aider.chat">Aider documentation</a></p><p><strong>Rye</strong></p><p>Rye is a Python package manager and resolver designed to simplify dependency management and streamline the Python development workflow. It offers features like:</p><blockquote><p>&#8226; <strong>Dependency Resolution</strong>: Efficiently resolves and installs package dependencies, ensuring compatibility and minimizing conflicts.</p><p>&#8226; <strong>Environment Management</strong>: Supports the creation and management of isolated environments, similar to tools like virtualenv and pipenv.</p><p>&#8226; <strong>User-Friendly CLI</strong>: Provides a straightforward command-line interface for managing packages and environments.</p><p>&#8226; <strong>Project Configuration</strong>: Facilitates the definition and maintenance of project-specific configurations and dependencies.</p></blockquote><p>Rye is particularly useful for maintaining clean and reproducible development environments, making it easier to manage Python projects. <a href="https://rye.astral.sh/guide/">Rye documentation</a></p><p><strong>Work flow</strong></p><p>I have Emacs and VSCode configured to run Rye project targets and unit tests.</p><p>After you install Aider:</p><p><code>pip install aider-chat</code></p><p>You can just run <code>aider</code> on the command line. By default it looks for environment variables for commercial LLM hosts or a local Ollama server, for example:</p><pre><code><code>export ANTHROPIC_API_KEY=&lt;key&gt;
export OPENAI_API_KEY=&lt;key&gt;
export OLLAMA_API_BASE=http://127.0.0.1:11434</code></code></pre><p>It handles use cases like naming an existing function and asking for something similar with a new argument, new functionality, different functionality, etc. It shows git diffs of any changes it wants to make. The first time I used Aider, in ten minutes I added two new features to my project and generated test data and unit tests.</p><p>I find both Rye and Aider to make development very fast and pleasant.</p><p></p>]]></content:encoded></item></channel></rss>