<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Tutorial Savvy - Medium]]></title>
        <description><![CDATA[This blog is about web application development. Most of the post are on JavaScript,HTML and CSS related technologies.Each post is short and quick to help a developer to get a kick start of the technology early.The content in this blog are frequently updated with cutting edge - Medium]]></description>
        <link>https://tutorialsavvy.com?source=rss----ebf0231b0e88---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Tutorial Savvy - Medium</title>
            <link>https://tutorialsavvy.com?source=rss----ebf0231b0e88---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 21:29:02 GMT</lastBuildDate>
        <atom:link href="https://tutorialsavvy.com/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Animating Elements In With CSS @starting-style]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://tutorialsavvy.com/animating-elements-in-with-css-starting-style-4dcb7bedb0a5?source=rss----ebf0231b0e88---4"><img src="https://cdn-images-1.medium.com/max/1960/1*tIcgiyqOss76zvHamBpS0g.png" width="1960"></a></p><p class="medium-feed-snippet">@starting-style removes the last good reason to reach for JavaScript when an element appears</p><p class="medium-feed-link"><a href="https://tutorialsavvy.com/animating-elements-in-with-css-starting-style-4dcb7bedb0a5?source=rss----ebf0231b0e88---4">Continue reading on Tutorial Savvy »</a></p></div>]]></description>
            <link>https://tutorialsavvy.com/animating-elements-in-with-css-starting-style-4dcb7bedb0a5?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/4dcb7bedb0a5</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[style]]></category>
            <dc:creator><![CDATA[Sandeep Kumar Patel]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 06:51:49 GMT</pubDate>
            <atom:updated>2026-11-09T06:51:49.587Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[What Is Agent Accessibility?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://tutorialsavvy.com/what-is-agent-accessibility-15ddcf3c2a5d?source=rss----ebf0231b0e88---4"><img src="https://cdn-images-1.medium.com/max/1400/1*_ZVWsdH51BXEiVdOMJoIhg.png" width="1400"></a></p><p class="medium-feed-snippet">Software today has two kinds of users who can&#x2019;t see the screen the way most of us do: people who use assistive technology, and AI agents.</p><p class="medium-feed-link"><a href="https://tutorialsavvy.com/what-is-agent-accessibility-15ddcf3c2a5d?source=rss----ebf0231b0e88---4">Continue reading on Tutorial Savvy »</a></p></div>]]></description>
            <link>https://tutorialsavvy.com/what-is-agent-accessibility-15ddcf3c2a5d?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/15ddcf3c2a5d</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Sandeep Kumar Patel]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 03:43:52 GMT</pubDate>
            <atom:updated>2026-10-25T03:43:52.546Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Web Workers: What Actually Helps, and What Silently Breaks]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://tutorialsavvy.com/web-workers-what-actually-helps-and-what-silently-breaks-e0a54c6c3a9e?source=rss----ebf0231b0e88---4"><img src="https://cdn-images-1.medium.com/max/1310/1*EBAU3fBlIgqhZULLd4teCQ.png" width="1310"></a></p><p class="medium-feed-snippet">I went looking for one thing: a published before-and-after INP number from a team that moved work into a Web Worker.</p><p class="medium-feed-link"><a href="https://tutorialsavvy.com/web-workers-what-actually-helps-and-what-silently-breaks-e0a54c6c3a9e?source=rss----ebf0231b0e88---4">Continue reading on Tutorial Savvy »</a></p></div>]]></description>
            <link>https://tutorialsavvy.com/web-workers-what-actually-helps-and-what-silently-breaks-e0a54c6c3a9e?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/e0a54c6c3a9e</guid>
            <category><![CDATA[web-workers-in-javascript]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Sandeep Kumar Patel]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 03:42:38 GMT</pubDate>
            <atom:updated>2026-10-25T03:42:38.047Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Lit from First Principles: Everything I Wish I Knew Before Using It]]></title>
            <link>https://tutorialsavvy.com/lit-from-first-principles-everything-i-wish-i-knew-before-using-it-f38b99edc60b?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/f38b99edc60b</guid>
            <category><![CDATA[web-components]]></category>
            <category><![CDATA[litcomponent]]></category>
            <dc:creator><![CDATA[Birat Datta]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 05:26:50 GMT</pubDate>
            <atom:updated>2026-10-19T05:26:49.948Z</atom:updated>
            <content:encoded><![CDATA[<p>Oct 18, 2026 · @Birat Datta</p><p>Lit is not a framework in the way React or Angular is. It is a thin, roughly 5 KB layer that automates browser features you already have. Once that clicks, almost every confusing Lit behavior becomes obvious.</p><p>When I started with Lit, I treated it like “lightweight React.” I looked for a virtual DOM, expected synchronous renders, and fought the shadow DOM instead of using it. Most of my bugs came from that wrong mental model, not from Lit itself.</p><p>This article rebuilds Lit from the ground up. We start with the problem it solves, look at the browser primitives underneath, and then add Lit’s pieces one at a time. At the end is the list of gotchas I wish someone had handed me on day one.</p><h3>1. The problem: components without a library</h3><p>Browsers can already define their own HTML tags. The catch is that doing it by hand means writing all the plumbing yourself. Here is a simple counter with no library:</p><blockquote>class MyCounter extends HTMLElement {<br> static observedAttributes = [‘count’];<br> <br> constructor() {<br> super();<br> this.attachShadow({ mode: ‘open’ });<br> this._count = 0;<br> }<br> <br> connectedCallback() {<br> this.render();<br> }<br> <br> attributeChangedCallback(name, oldValue, newValue) {<br> if (name === ‘count’) {<br> this._count = Number(newValue);<br> this.render();<br> }<br> }<br> <br> render() {<br> this.shadowRoot.innerHTML = `<br> &lt;button&gt;Clicked ${this._count} times&lt;/button&gt;<br> `;<br> this.shadowRoot.querySelector(‘button’)<br> .addEventListener(‘click’, () =&gt; {<br> this._count++;<br> this.render();<br> });<br> }<br> }<br> <br> customElements.define(‘my-counter’, MyCounter);</blockquote><p>It works, but look at what we had to do manually:</p><p>• <strong>Re-render everything on every change.</strong> innerHTML throws away the whole DOM, including focus, selection and input state.</p><p>• <strong>Re-attach event listeners</strong> after every render, because the old button no longer exists.</p><p>• <strong>Sync attributes and properties by hand.</strong> Setting el.count = 5 from JavaScript does nothing here.</p><p>• <strong>Avoid render storms.</strong> Change three values in a row and you render three times.</p><p>• <strong>Escape user input yourself</strong>, or innerHTML becomes an XSS hole.</p><p>Every one of these is solvable. Lit is simply the collection of those solutions, done efficiently.</p><h3>2. The three browser primitives underneath</h3><p>Lit sits on top of three standards that ship in every modern browser. Lit does not replace any of them.</p><p><strong>Custom Elements</strong> let you register a class as a new tag with customElements.define(‘my-tag’, MyClass). The browser then calls lifecycle hooks on your class:</p><p>• constructor() when the element is created</p><p>• connectedCallback() when it is added to the document</p><p>• disconnectedCallback() when it is removed</p><p>• attributeChangedCallback() when an observed attribute changes</p><p>A LitElement is still an HTMLElement. These callbacks still fire, and you can still override them (just call super).</p><p><strong>Shadow DOM</strong> gives an element a private DOM subtree. Styles inside it do not leak out, and page styles do not leak in. Light DOM children are projected into it through &lt;slot&gt; elements. This is where Lit renders by default.</p><p><strong>HTML templates</strong> are inert chunks of DOM, parsed once and cloned cheaply. The browser can clone a &lt;template&gt; much faster than it can parse an HTML string. Lit leans on this heavily, as the next section shows.</p><p>The practical consequence: anything you know about these standards applies to Lit directly. When Lit docs feel thin on a topic, MDN usually has the answer.</p><h3>3. How lit-html actually renders</h3><p>This is the single most important idea in Lit: <strong>the static parts of a template are processed once, and only the dynamic values are touched on updates.</strong> There is no virtual DOM and no tree diffing.</p><p>It starts with a JavaScript feature called tagged template literals. When you write</p><blockquote>html`&lt;button class=${cls}&gt;Clicked ${count} times&lt;/button&gt;`</blockquote><p>the html function does not receive one string. It receives two things separately:</p><p>• strings: [‘&lt;button class=”’, ‘“&gt;Clicked ‘, ‘ times&lt;/button&gt;’]</p><p>• values: [cls, count]</p><p>The strings array is the same object every time that line of code runs. JavaScript guarantees it. Lit uses that array as a cache key.</p><p><strong>First render.</strong> Lit joins the strings with marker comments, builds a real &lt;template&gt; element, and walks it once to record where each value goes. Each of those spots becomes a <em>part</em>: an attribute part for class, a child part for the text. Lit then clones the template into the DOM and fills in the values.</p><p><strong>Every later render.</strong> Lit looks up the cached template by its strings array, skips parsing and cloning, and walks the list of parts. For each part, it compares the new value with the last one. If it is identical, nothing happens. If it changed, Lit updates exactly that attribute or text node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p6FLsLVnt9ZlAyXOxuzOyw.png" /></figure><p>lit-html render path · first render vs every later render</p><p>The expensive work (building and cloning the template) happens once; every later render is just a comparison per value.</p><p>Compare the cost:</p><p>Approach</p><p>Work on each update</p><p>innerHTML</p><p>Parse the whole string, rebuild every node</p><p>Virtual DOM</p><p>Build a new tree in memory, diff it against the old tree, patch</p><p>lit-html</p><p>Compare N values, touch only the ones that changed</p><p>This is also why Lit templates are safe by default. Values are set as text nodes or properties, never parsed as HTML, so ${userInput} cannot inject markup.</p><h3>4. Reactive properties and the update cycle</h3><p>Here is the same counter in Lit:</p><blockquote>import { LitElement, html, css } from ‘lit’;<br> import { customElement, property } from ‘lit/decorators.js’;<br> <br> @customElement(‘my-counter’)<br> export class MyCounter extends LitElement {<br> @property({ type: Number }) count = 0;<br> <br> render() {<br> return html`<br> &lt;button @click=${() =&gt; this.count++}&gt;<br> Clicked ${this.count} times<br> &lt;/button&gt;<br> `;<br> }<br> }</blockquote><p>Every problem from section 1 is gone. The interesting question is <em>how</em> this.count++ turns into a DOM update.</p><p><strong>Properties become accessors.</strong> @property replaces the class field with a getter/setter pair. The setter stores the value, checks whether it actually changed, and calls requestUpdate().</p><p><strong>Updates are asynchronous and batched.</strong> requestUpdate() does not render. It marks the element dirty and schedules one update in a microtask. Set ten properties in the same tick and you still get one render.</p><p><strong>@property vs @state.</strong> Both are reactive. @property is public API: it can be set from outside and can map to an attribute. @state is private internal state with no attribute. Use @state for anything a consumer should not set.</p><p>When the microtask runs, Lit walks this lifecycle in order:</p><p>1. shouldUpdate(changed): return false to skip this update.</p><p>2. willUpdate(changed): compute derived values before rendering. Setting properties here does not trigger another update.</p><p>3. update(changed): reflects properties to attributes, then calls render().</p><p>4. render(): returns the template. Keep it pure, with no side effects.</p><p>5. firstUpdated(changed): runs once, after the first render. Good for querying the shadow DOM.</p><p>6. updated(changed): runs after every render. Setting properties here schedules <em>another</em> update, so be careful.</p><p>7. updateComplete: a promise that resolves when the cycle finishes.</p><p>The changed argument is a Map of property names to their <em>previous</em> values. It is how you react only to specific changes:</p><p>willUpdate(changed: PropertyValues&lt;this&gt;) {<br> if (changed.has(‘items’)) {<br> this.sorted = […this.items].sort();<br> }<br> }</p><h3>5. Attributes vs properties</h3><p>This distinction causes more Lit confusion than anything else, and it comes straight from the DOM.</p><p>• <strong>Attributes</strong> live in HTML. They are always strings: &lt;my-counter count=”5&quot;&gt;.</p><p>• <strong>Properties</strong> live on the JavaScript object. They can be anything: el.count = 5, el.items = […].</p><p>By default, @property observes an attribute with the lowercased property name, and converts the string using type. So count=”5&quot; becomes the number 5. A few options control this:</p><p>@property({ type: Boolean, reflect: true }) open = false;<br> @property({ attribute: ‘max-items’ }) maxItems = 10;<br> @property({ attribute: false }) data: Item[] = [];</p><p>• reflect: true copies the property back to the attribute, which lets you style with :host([open]).</p><p>• attribute: ‘max-items’ uses a dash-case attribute name, since maxItems becomes maxitems by default.</p><p>• attribute: false skips the attribute entirely. Use it for objects and arrays, which should never round-trip through a string.</p><p>Inside templates, the binding prefix decides which one you set:</p><p>Syntax</p><p>Sets</p><p>Example</p><p>name=${v}</p><p>Attribute (as a string)</p><p>&lt;img src=${url}&gt;</p><p>.name=${v}</p><p>Property (any value)</p><p>&lt;my-list .items=${items}&gt;</p><p>?name=${v}</p><p>Boolean attribute (added or removed)</p><p>&lt;button ?disabled=${busy}&gt;</p><p>@name=${fn}</p><p>Event listener</p><p>&lt;button @click=${this.save}&gt;</p><p>The rule of thumb: pass primitives as attributes when they come from HTML, and pass everything else with a . property binding. Passing an array without the dot gives the child the string “[object Object]”.</p><h3>6. Styling in the shadow DOM</h3><p>Lit components declare styles once per class, not per instance:</p><p>static styles = css`<br> :host {<br> display: block;<br> padding: var( — card-padding, 16px);<br> }<br> :host([open]) .body { display: block; }<br> .body { display: none; }<br> `;</p><p>Under the hood, Lit turns this into a constructable stylesheet and shares it across every instance via adoptedStyleSheets. A thousand cards share one parsed stylesheet. That is why styles should be static: interpolating per-instance values into css is blocked on purpose.</p><p>Because the shadow root is encapsulated, your global CSS (Tailwind, Bootstrap, a reset) does not reach inside. That is the feature, not a bug. To let consumers customize a component, use the escape hatches the platform provides:</p><p>• <strong>CSS custom properties</strong> inherit through shadow boundaries. Expose — card-padding and let the page set it. This is the main theming mechanism.</p><p>• <strong>::part()</strong> lets you expose a specific internal element: &lt;div part=”header”&gt; can be styled from outside with my-card::part(header).</p><p>• <strong>::slotted()</strong> styles light DOM children projected into a slot, but only the top-level slotted nodes.</p><p>• <strong>:host and :host(…)</strong> style the element itself, and the page can still override them since outer styles win over :host.</p><p>For dynamic per-instance styling, use the classMap and styleMap directives in the template instead of building CSS strings.</p><h3>7. Composition: slots, events, controllers, directives</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dem_8CMx9aiIyzixpfTevQ.png" /></figure><p><strong>Data down, events up.</strong> Parents pass data to children through properties. Children report back by dispatching DOM events. There is no special Lit mechanism; it is just the DOM.</p><p>component communication · properties down, events up</p><p>The child never reaches up to change the parent’s state; it announces what happened and lets the parent decide.</p><p>// child<br> this.dispatchEvent(new CustomEvent(‘item-selected’, {<br> detail: { id: this.itemId },<br> bubbles: true,<br> composed: true,<br> }));<br> <br> // parent template<br> html`&lt;item-row .itemId=${id} @item-selected=${this.onSelect}&gt;&lt;/item-row&gt;`</p><p><strong>Slots vs properties.</strong> Use a &lt;slot&gt; when the consumer should supply markup (a card body, a button label, an icon). Use a property when the component needs data it will render itself. Named slots (&lt;slot name=”footer”&gt;) handle multiple insertion points.</p><p><strong>Reactive controllers</strong> are Lit’s answer to hooks or mixins. A controller is a plain object that attaches to a host, receives its lifecycle callbacks, and can call host.requestUpdate():</p><p>class ClockController implements ReactiveController {<br> value = new Date();<br> private timer?: number;<br> <br> constructor(private host: ReactiveControllerHost) {<br> host.addController(this);<br> }<br> hostConnected() {<br> this.timer = setInterval(() =&gt; {<br> this.value = new Date();<br> this.host.requestUpdate();<br> }, 1000);<br> }<br> hostDisconnected() {<br> clearInterval(this.timer);<br> }<br> }</p><p>Any component can now write clock = new ClockController(this). Setup and cleanup stay together, which is the main thing hooks gave React.</p><p><strong>Directives</strong> customize how a single binding renders. The built-ins worth knowing first:</p><p>• repeat(items, keyFn, template): keyed lists that move DOM nodes instead of rewriting them.</p><p>• classMap and styleMap: toggle classes and inline styles from objects.</p><p>• ifDefined: omit an attribute when the value is undefined.</p><p>• until: render a placeholder until a promise resolves.</p><p>• ref: get a handle to a rendered element.</p><p>• live: compare against the live DOM value, useful for inputs the user can edit.</p><p>• guard and cache: skip or keep expensive sub-templates.</p><h3>8. Gotchas I learned the hard way</h3><p><strong>Mutating arrays and objects does nothing.</strong> Lit compares values with !==. Pushing into an array keeps the same reference, so no update is scheduled.</p><p>this.items.push(newItem); // no re-render<br> this.items = […this.items, newItem]; // re-renders</p><p>Treat reactive properties as immutable, or call this.requestUpdate() after mutating.</p><p><strong>The DOM is not updated right after you set a property.</strong> Updates run in a microtask. If your next line measures or queries the DOM, it sees the old state.</p><p>this.open = true;<br> await this.updateComplete;<br> this.renderRoot.querySelector(‘input’)?.focus();</p><p><strong>Events stop at the shadow boundary.</strong> A CustomEvent without composed: true never leaves the shadow root, so the page never hears it. Native events like click are composed already, but they get <em>retargeted</em>: outside the component, event.target is the host element, not the inner button. Use event.composedPath() when you need the original target.</p><p><strong>Forms do not see your inputs.</strong> An &lt;input&gt; inside a shadow root is invisible to the surrounding &lt;form&gt;. To participate in forms, make the element form-associated with static formAssociated = true and this.attachInternals(), then call internals.setFormValue().</p><p><strong>IDs do not cross shadow roots.</strong> &lt;label for=”x”&gt; outside the component cannot point at id=”x” inside it, and aria-labelledby has the same problem. Keep labels and their targets in the same root, or accept a label through a property or slot.</p><p><strong>Class fields can shadow reactive properties.</strong> With TypeScript useDefineForClassFields: true (the default for modern targets), a plain class field overwrites Lit’s accessor. Use the declare keyword or accessor with standard decorators, and check the Lit docs for your compiler setup.</p><p><strong>Setting properties in updated() causes a second render.</strong> It works, but it is a render loop waiting to happen. Compute derived state in willUpdate() instead.</p><p><strong>Registering the same tag twice throws.</strong> If two bundles both include a component, the second customElements.define fails. This is common in micro-frontends. Guard with customElements.get() or make sure one copy owns the definition.</p><p><strong>SSR is a separate concern.</strong> @lit-labs/ssr renders declarative shadow DOM on the server, but it does not run browser-only code like connectedCallback the same way. Plan for hydration from the start rather than bolting it on.</p><h3>9. When Lit is (and isn’t) the right tool</h3><p>Lit’s strength follows directly from what it is: a standard custom element works anywhere HTML works.</p><p><strong>Lit shines for:</strong></p><p>• <strong>Design systems</strong> shared across teams using React, Angular, Vue or plain HTML. You write the button once.</p><p>• <strong>Embeddable widgets</strong> dropped into pages you do not control, where style isolation matters.</p><p>• <strong>Long-lived code.</strong> Web Components are a browser standard, so they do not get rewritten when a framework’s major version changes.</p><p>• <strong>Performance-sensitive UI</strong> where bundle size and update cost matter.</p><p><strong>Think twice for:</strong></p><p>• <strong>Large, state-heavy SPAs.</strong> Lit has no built-in router, global store or data-fetching layer. You can add them (Lit’s own @lit/task, @lit/context, signals), but you are assembling the stack yourself.</p><p>• <strong>Teams deep in a framework ecosystem</strong> that rely on its component libraries and tooling.</p><p>• <strong>Projects needing mature SSR today.</strong> It exists, but it is less battle-tested than Next.js or Nuxt.</p><p>A common and healthy pattern is both: Lit for the shared component library, and an app framework on top for routing and state.</p><h3>10. The mental model in one picture</h3><p>Read Lit as a stack of thin layers, each automating the one below it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*41cM9-hCJABeP3bLYI1dsw.png" /></figure><p>1. <strong>The browser</strong> provides Custom Elements, Shadow DOM and &lt;template&gt;.</p><p>2. <strong>lit-html</strong> turns tagged template literals into cached templates with parts, and updates only the values that changed.</p><p>3. <strong>ReactiveElement</strong> turns properties into accessors, batches changes into one async update, and runs the lifecycle.</p><p>4. <strong>LitElement</strong> connects the two: render() output goes into the shadow root, and static styles become shared stylesheets.</p><p>5. <strong>Your component</strong> declares properties, returns a template, and communicates through properties down and events up.</p><p>Lit’s layers · from the browser up to your component</p><p>LitElement is simply ReactiveElement and lit-html wired together on top of the platform.</p><p>When something behaves strangely, ask which layer it belongs to. An event that never arrives is a Shadow DOM question. A stale value is a reactivity question. A slow list is a lit-html question. Nine times out of ten, the answer is a browser standard doing exactly what it was designed to do.</p><p>That is the real lesson of Lit: learn the platform, and the library mostly explains itself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f38b99edc60b" width="1" height="1" alt=""><hr><p><a href="https://tutorialsavvy.com/lit-from-first-principles-everything-i-wish-i-knew-before-using-it-f38b99edc60b">Lit from First Principles: Everything I Wish I Knew Before Using It</a> was originally published in <a href="https://tutorialsavvy.com">Tutorial Savvy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AX Is the New UX]]></title>
            <link>https://tutorialsavvy.com/ax-is-the-new-ux-5ce22f7268bc?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/5ce22f7268bc</guid>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Birat Datta]]></dc:creator>
            <pubDate>Thu, 15 Oct 2026 12:30:43 GMT</pubDate>
            <atom:updated>2026-10-15T12:30:43.503Z</atom:updated>
            <content:encoded><![CDATA[<p>Oct 15, 2026 · @Birat Datta</p><p><em>Your next most important user will never see your homepage.</em></p><p>It is 9:14 on a Tuesday morning. Someone types one sentence into an AI assistant: “Book me a flight to Austin next Thursday, aisle seat, under $400, and add it to my calendar.”</p><p>Thirty seconds later it is done. The user never opened an airline app. They never saw the carousel your design team spent a quarter perfecting. They never hovered over the button your growth team A/B tested eleven times.</p><p>An agent did all of it. It read your docs, called your API, parsed your error messages, retried when your rate limiter pushed back, and moved on. If any of that had been confusing, it would have quietly picked a competitor instead.</p><p>That agent is your customer now. And how it experiences your product has a name: <strong>AX, or Agent Experience.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*sKMrdNT4ZNKTU5jxe8jgtQ.png" /></figure><p>The new chain of use: person → agent → product</p><h3>What is AX?</h3><p>Agent Experience is the holistic experience an AI agent has when it uses your product, platform, or service on behalf of a human.</p><p>The phrase gained traction in early 2025, when Netlify co-founder Mathias Biilmann argued that companies needed to design deliberately for agents the way they once designed for users and developers. The idea spread fast because it named something many teams were already feeling: a growing share of their traffic, signups, and API calls were not coming from people at all.</p><p>If UX asks <em>“Can a person understand and enjoy this?”</em> and DX asks <em>“Can a developer build with this?”</em>, AX asks a third question:</p><p>Can an autonomous agent discover, understand, and reliably act on this, without a human holding its hand?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*Bv6Nlrne5nSZCj3RXFGVSw.png" /></figure><p>UX, DX and AX: three users, three questions</p><h3>Why now?</h3><p>For twenty years, software had two kinds of users: people who clicked, and developers who coded. Agents are a third kind, and they arrived quickly.</p><p>Coding agents now open pull requests, run tests, and deploy to cloud platforms. Browsing agents fill in forms and compare prices. Workplace assistants read your tickets, draft your emails, and update your CRM. Protocols like the Model Context Protocol (MCP) have made it routine to plug an agent straight into a SaaS product.</p><p>This changes the funnel. When a developer asks an assistant to “set up auth for my app,” the agent effectively chooses the vendor. It picks the one whose docs it can parse, whose SDK it already knows, and whose signup does not stall on a CAPTCHA. Products that are hard for agents to use are becoming invisible, the same way sites that ignored mobile became invisible a decade ago.</p><p>The shift is subtle but real: <strong>you are no longer only designing for the person. You are designing for the delegate the person trusts.</strong></p><h3>Six principles of great AX</h3><p><strong>1. Make it discoverable.</strong> Agents cannot use what they cannot find. Publish clean, crawlable docs, an llms.txt file, OpenAPI specs, and an MCP server. If your best capabilities live behind a JavaScript-rendered dashboard, they effectively do not exist.</p><p><strong>2. Make it legible.</strong> Write for a reader that takes you literally. Use consistent names, explicit units, and examples for every endpoint. Clever marketing copy confuses agents; precise descriptions guide them.</p><p><strong>3. Make errors teach.</strong> “Error 400” is a dead end. “start_date must be ISO 8601, for example 2026–10–15” is a path forward. Every error message is now a prompt, so write it like one.</p><p><strong>4. Make actions safe.</strong> Agents make mistakes. Give them dry-run modes, idempotency keys, undo, and clear confirmation steps for anything destructive or expensive. Good AX makes the right action easy and the catastrophic one hard.</p><p><strong>5. Make identity and permission clear.</strong> An agent acts on someone’s behalf, so it needs scoped, revocable credentials, not a shared password. OAuth flows, fine-grained scopes, and audit logs let humans delegate without losing control.</p><p><strong>6. Make it predictable.</strong> Stable schemas, versioned APIs, and deterministic behavior matter more than ever. An agent that worked yesterday should work today. Silent changes break thousands of automated workflows at once.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*YST2H6t29MBDs_M1KnYhRA.png" /></figure><p>The six principles of AX at a glance</p><h3>What to do on Monday morning</h3><p>You do not need a new department to start. You need to watch an agent try to use your product, the same way you once watched users in a usability lab.</p><p>• ☒ Ask three different AI assistants to complete your product’s core task from scratch. Record where each one gets stuck.</p><p>• ☒ Audit your docs for content that only renders with JavaScript, lives in images, or hides behind a login.</p><p>• ☒ Publish an OpenAPI spec and an llms.txt file, and consider shipping an MCP server for your top workflows.</p><p>• ☒ Rewrite your 20 most common error messages so each one says what went wrong and how to fix it.</p><p>• ☒ Find every step that requires a human (CAPTCHAs, email verification, manual approval) and decide which ones truly need to stay.</p><p>• ☒ Add agent traffic to your analytics so you can see how much of your usage is already delegated.</p><p>• ☒ Name an owner. AX falls between product, design, and platform teams, so without one it belongs to no one.</p><h3>But wait, does UX still matter?</h3><p>Yes. “AX is the new UX” is a provocation, not an obituary.</p><p>Humans still decide what to delegate. They still review what the agent did, approve the purchase, and judge whether the result was any good. They still need to trust your brand enough to let a machine act in their name. And plenty of moments, like choosing a wedding venue or reading a story, are ones people want to experience themselves.</p><p>The better framing is this: <strong>AX is now part of UX.</strong> The human experience increasingly runs <em>through</em> an agent. If the agent struggles with your product, the human feels it as delay, error, or a vague sense that your product “didn’t work.” Good AX is how you deliver good UX in a delegated world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*o8ILEHVHQ-yIE5CLlFW7iA.png" /></figure><p>AX lives inside UX, not beside it</p><p>The work also overlaps more than it seems. Clear language, honest errors, safe defaults, and predictable behavior have always been good design. Agents just stopped letting us get away without them.</p><h3>The interface is becoming a conversation</h3><p>Every major platform shift created a new discipline. The web gave us information architecture. Mobile gave us touch-first design. APIs gave us developer experience.</p><p>Agents are giving us AX.</p><p>The companies that win the next decade will not just have beautiful screens. They will have products an agent can understand on the first try, act on safely, and recommend with confidence. Their users may never see the interface at all, and they will still have a great experience.</p><p>So the next time your team reviews a new feature, add one question to the checklist: <strong>“How would an agent use this?”</strong></p><p>If nobody knows the answer, you have found your next design problem.</p><p><em>If this resonated, give it a clap and share how your team is thinking about agent experience in the comments.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ce22f7268bc" width="1" height="1" alt=""><hr><p><a href="https://tutorialsavvy.com/ax-is-the-new-ux-5ce22f7268bc">AX Is the New UX</a> was originally published in <a href="https://tutorialsavvy.com">Tutorial Savvy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What If Neural Networks Came in Parts?]]></title>
            <link>https://tutorialsavvy.com/what-if-neural-networks-came-in-parts-574b20ccc490?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/574b20ccc490</guid>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Rithvik K]]></dc:creator>
            <pubDate>Sat, 03 Oct 2026 13:44:29 GMT</pubDate>
            <atom:updated>2026-10-03T13:44:29.607Z</atom:updated>
            <content:encoded><![CDATA[<p>You can build a website out of parts. I’ve shipped code that leaned on a dozen libraries written by people I’ll never meet, and it mostly just worked. My laptop takes a USB stick made years before the laptop existed. None of that works because anyone coordinated. It works because somebody agreed on an interface early, and then everyone stopped touching it.</p><p>Models don’t have that. If you want one that’s better at chemistry, you fine-tune the whole thing or train a new one. Two labs can’t each build a piece and snap them together, because every layer inside a trained model speaks a private dialect. It only makes sense next to the exact weights it grew up with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jxQ_vMZznqKqa3BhCDMoBQ.png" /></figure><h3>The one test that matters</h3><blockquote><em>Two people train two modules separately. They never see each other’s code or data. Then we plug both modules into the same model, and it does nearly as well as a model where everything was trained together.</em></blockquote><p>That’s it. If that works on a toy problem, I’ll believe there’s something here. If it doesn’t, at least it fails fast and cheap.</p><p>I like this test because of what it leaves out. The modules don’t need to be small or efficient. There’s no new training algorithm involved. It’s just asking whether two strangers can build parts that understand each other, because if they can’t, nothing else I’d want to build on top of this matters.</p><h3>A whiteboard everyone shares</h3><p>The first piece is a shared workspace: a fixed set of slots, say 64 vectors, that every module reads from and writes to.</p><p>The picture in my head is a whiteboard in a meeting room. Nobody whispers to anyone else. If you have something to say, you write it on the board, and if you want to know what’s going on, you read the board. Modules work the same way. They never call each other directly.</p><p>The board is the socket. Its shape doesn’t change: same number of slots, same width, same spot in the forward pass. As long as a module fits that shape, it can plug in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iuAcf8AuC5zQzSws-cHumg.png" /></figure><h3>What a module promises</h3><p>The second piece is a contract every module signs. It reads the workspace through attention, does some work, and writes results back.</p><p>The middle part is nobody’s business. A module could be a transformer, a CNN, a lookup table, or a hand-written symbolic solver. I only care about the read and the write. If you’ve written a function against someone else’s API, it’s the same deal: agree on what goes in and what comes out, and do whatever you want in between.</p><p>The whiteboard and the contract are the easy bits. This next one is where I think the whole idea lives or dies.</p><p>Agreeing on the shape of the board doesn’t mean agreeing on what’s written on it. Say two modules were trained apart, and both learned to use slot 12. One uses it to mean “the subject of the sentence.” The other uses it to mean “something red.” Plug them in together and they’ll happily read each other’s notes and get everything wrong. Same alphabet, different language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bDv8bn18kPLsEIesyXyP2w.png" /></figure><p>So something has to pin down what each slot means. The simplest version I can think of is a frozen reference model, an anchor. Every module trains against it: it learns from workspace states the anchor produced, and whatever it writes has to stay readable by the anchor. Since the anchor never changes, a module built this week and one built next year should still share a dictionary.</p><p>What I genuinely don’t know is whether that’s enough. A frozen anchor might also be a ceiling. If the anchor has no way to represent some concept, can a new module still get that idea across? Or does every module end up limited to the vocabulary of whatever we froze on day one? If I had to pick one question to spend a year on, it’d be this one.</p><h3>Who gets called</h3><p>The last piece is a router that decides which modules run for a given input. Routers aren’t new. The awkward requirement here is that this one has to accept modules that didn’t exist when it was trained. If you need to retrain the router every time someone ships a module, you’ve lost most of the point.</p><p>One way I can imagine it working: each module publishes a small key, a vector living in the same space as the workspace. The router compares the current state of the board against those keys and picks the closest matches. Joining means registering a key. Nobody retrains anything.</p><h3>How I’d test it</h3><p>Putting it together, the first experiment looks something like this:</p><p>Two teams, separate data, separate code. The only thing they share is the frozen anchor. Plug both modules in, then compare against a baseline with the same parts trained together. A small gap means the idea works. A big gap tells us where it breaks, which is useful too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KAoNv_NGB4nFjkIxFsgxQw.png" /></figure><h3>Hasn’t someone done this?</h3><p>Sort of, and I’d be surprised if nobody had come close. The nearest work I know of:</p><ul><li><strong>“Coordination Among Neural Modules Through a Shared Global Workspace”</strong> (Goyal et al., 2021). This is almost exactly the whiteboard idea. But the modules are trained together.</li><li><strong>Recurrent Independent Mechanisms</strong> (Goyal et al., 2019). Separate modules that compete to update a shared state. Also trained jointly.</li><li><strong>Perceiver</strong> (Jaegle et al., 2021). Reads and writes through a fixed latent array, which is very close to how I picture the workspace.</li></ul><p>There’s also a nearby line of work on model stitching and on aligning representations between separately trained networks, plus methods that train expert models in parallel and merge them afterward. Those feel relevant to the anchor question in particular.</p><p>As far as I can tell, none of them tests the specific thing I care about: modules trained independently, by people who never coordinated, plugged in after the fact. That looks like the gap. I’m going from memory on these citations, though, so if you know of work that already does this, please tell me. I’d honestly rather find out now.</p><h3>The stuff I’m deliberately ignoring</h3><p>There are two bigger ideas sitting behind this one, and I’m parking both on purpose.</p><p>The first is training without backpropagation. Backprop needs the whole network held in memory while gradients flow backward, which makes training expensive and pretty much rules out a device learning on the fly. The dream is a network where each layer learns from local signals only, so layers can train in parallel and out of sync, a bit like the brain seems to. Hinton’s Forward-Forward algorithm and predictive coding networks are early steps, but as far as I know nothing matches backprop at scale yet. Whoever cracks that changes what hardware we build.</p><p>The second is an asynchronous framework where modules update on their own schedules</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=574b20ccc490" width="1" height="1" alt=""><hr><p><a href="https://tutorialsavvy.com/what-if-neural-networks-came-in-parts-574b20ccc490">What If Neural Networks Came in Parts?</a> was originally published in <a href="https://tutorialsavvy.com">Tutorial Savvy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude Is Learning to Sleep: A Deep Dive into “Dreaming,” Memory Decay, and How AI Agents Keep…]]></title>
            <link>https://tutorialsavvy.com/claude-is-learning-to-sleep-a-deep-dive-into-dreaming-memory-decay-and-how-ai-agents-keep-12387fe547dc?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/12387fe547dc</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[dreams]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Birat Datta]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 11:02:08 GMT</pubDate>
            <atom:updated>2026-10-01T11:02:09.281Z</atom:updated>
            <content:encoded><![CDATA[<h3>Claude Is Learning to Sleep: A Deep Dive into “Dreaming,” Memory Decay, and How AI Agents Keep Their Knowledge Clean</h3><p><em>Persistent memory made AI coding agents useful across sessions. Without maintenance, that memory slowly turns against you. Here’s how Claude’s reported Auto Dream feature works, how it compares to other approaches, and what it teaches us about designing agent memory.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PzBVO3oAXoVU4TkgAlPOgg.png" /></figure><h3>TL;DR</h3><ul><li><strong>The problem:</strong> AI agents that write their own notes accumulate contradictions, stale facts, and meaningless time references, so memory quality degrades with every session.</li><li><strong>The fix:</strong> Auto Dream is a periodic background pass in which Claude reviews, merges, prunes, and re-indexes its memory files, much like the brain consolidating memories during sleep.</li><li><strong>How it works (reportedly):</strong> A four-phase cycle (Orient → Gather Signal → Consolidate → Prune &amp; Index), triggered when 24+ hours and 5+ sessions have passed since the last run.</li><li><strong>Safety:</strong> It writes only to memory files, never your code, and runs in the background with a lock against concurrent runs.</li><li><strong>The bigger lesson:</strong> Agent memory needs separate collection and maintenance layers, the same way databases need writes and compaction.</li></ul><h3>1. The Problem: Memory That Only Grows</h3><p>Claude Code’s <strong>auto memory</strong> lets the agent write notes about your project as it works: build quirks, debugging insights, architecture decisions, and your preferences. Early on, this feels like a superpower.</p><p>But memory that only grows has a predictable lifecycle</p><pre>Usefulness<br>   ^<br>   |        .------.<br>   |      .-&#39;      &#39;--.                &lt;- Without consolidation:<br>   |    .-&#39;           &#39;---.               useful early, then noise<br>   |   .&#39;                 &#39;----.          overwhelms signal<br>   |  .&#39;                       &#39;----------<br>   | .&#39;<br>   |.&#39;     .--.   .--.   .--.   .--.   .--.<br>   |&#39;   ---&#39;  &#39;---&#39;  &#39;---&#39;  &#39;---&#39;  &#39;---&#39;  &#39;-- &lt;- With consolidation:<br>   |                                          quality resets each cycle<br>   +------------------------------------------&gt; Sessions<br>     1     5     10    15    20    25    30</pre><p>After roughly 20 or more sessions, memory files typically develop four kinds of rot:</p><pre>FAILURE MODE    EXAMPLE                          WHY IT HURTS<br>--------------  -------------------------------  ------------------------<br>Contradiction   &quot;API uses Express&quot; AND           Agent picks the wrong<br>                &quot;API uses Fastify&quot;               one, or hedges</pre><pre>Staleness       Fix notes for auth-legacy.ts,    Wastes tokens, suggests<br>                which was deleted                dead paths</pre><pre>Temporal rot    &quot;Yesterday we decided to         &quot;Yesterday&quot; means<br>                use Redis&quot;                       nothing a week later</pre><pre>Duplication     Same build quirk recorded        Bloats the index past<br>                in three sessions                what loads at startup</pre><p>The underlying insight is one every engineer building agentic systems eventually learns: <strong>the hard part of memory isn’t storage, it’s curation.</strong></p><h3>2. Why “Dreaming”? The Neuroscience Parallel</h3><p>The name is a deliberate analogy, and it maps surprisingly well.</p><pre>HUMAN BRAIN                        CLAUDE CODE<br>---------------------------------  ---------------------------------<br>Waking experience -&gt; short-term    Each session writes new notes<br>Sleep replays the day&#39;s events     Dream scans recent sessions<br>Important connections strengthen   Relevant facts merged into files<br>Irrelevant details fade            Stale/contradicted notes deleted<br>Filed into long-term storage       MEMORY.md rebuilt as clean index<br>Sleep deprivation hurts memory     No consolidation = memory decay</pre><p>Before Auto Dream, Claude Code was effectively <strong>sleep-deprived</strong>: it kept taking notes and never processed them.</p><h3>3. How Auto Dream Works: The Four Phases</h3><pre>+--------------------------------+<br>              |  TRIGGER: 24h + 5 sessions     |<br>              |  (or manual: &quot;dream&quot;)          |<br>              +---------------+----------------+<br>                              |<br>                              v<br>+------------------------------------------------------------+<br>| PHASE 1: ORIENT                                            |<br>| ls memory dir -&gt; read MEMORY.md -&gt; skim topic files        |<br>| &quot;What do I already know, and how is it organized?&quot;         |<br>+-----------------------------+------------------------------+<br>                              v<br>+------------------------------------------------------------+<br>| PHASE 2: GATHER SIGNAL                                     |<br>| Daily logs -&gt; drifted facts -&gt; narrow grep of transcripts  |<br>| Targets: corrections, &quot;remember this&quot;, themes, decisions   |<br>+-----------------------------+------------------------------+<br>                              v<br>+------------------------------------------------------------+<br>| PHASE 3: CONSOLIDATE                                       |<br>| Merge into existing files, relative -&gt; absolute dates      |<br>| Delete contradicted facts, drop stale notes, dedupe        |<br>+-----------------------------+------------------------------+<br>                              v<br>+------------------------------------------------------------+<br>| PHASE 4: PRUNE &amp; INDEX                                     |<br>| Keep MEMORY.md under ~200 lines, fix dead links            |<br>| Move verbose entries to topic files, resolve conflicts     |<br>+-----------------------------+------------------------------+<br>                              v<br>              +--------------------------------+<br>              |  Summary: what was merged,     |<br>              |  updated, or pruned            |<br>              +--------------------------------+</pre><p><strong>Phase 1: Orient</strong></p><p>Claude lists the memory directory, reads the MEMORY.md index, and skims existing topic files. The goal is to <strong>improve what exists rather than create near-duplicates</strong>, which is the most common failure of naive memory systems.</p><p><strong>Phase 2: Gather Signal</strong></p><p>This is where the design gets clever. Claude stores every session as a local JSONL transcript, and active projects can have hundreds of them. Reading them all would be slow and token-expensive, so Auto Dream reportedly searches <strong>narrowly</strong>, in a rough priority order:</p><pre>PRIORITY  SOURCE                  WHAT IT LOOKS FOR<br>--------  ----------------------  -----------------------------------<br>1         Daily logs (if any)     Append-only stream of recent work<br>2         Existing memories       Facts that now contradict the code<br>3         Transcript search       Targeted grep for specific terms</pre><p>The high-value signals it targets:</p><ul><li><strong>User corrections</strong>, the moments you told Claude it was wrong</li><li><strong>Explicit saves</strong>, such as “remember this” or “save to memory”</li><li><strong>Recurring themes</strong>, patterns that show up across multiple sessions</li><li><strong>Decisions</strong>, including architecture, tooling, and workflow changes</li></ul><p>The instruction is roughly “look only for things you already suspect matter.” That’s a retrieval strategy, not a reading strategy, and it’s a big reason the process scales.</p><p><strong>Phase 3: Consolidate</strong></p><p>The core cleanup step performs four operations:</p><pre>OPERATION        BEFORE                        AFTER<br>---------------  ----------------------------  -----------------------<br>Absolute dates   &quot;Yesterday we chose Redis&quot;    &quot;On 2026-03-15 we<br>                                               chose Redis&quot;</pre><pre>Contradictions   &quot;API uses Express&quot; +          &quot;API uses Fastify&quot;<br>                 &quot;Migrated to Fastify&quot;</pre><pre>Staleness        Debug notes for deleted file  (removed)</pre><pre>Merging          3 entries, same build quirk   1 clean entry</pre><p>Notably, contradictions are <strong>fixed at the source</strong> rather than flagged for a human. The wrong file gets corrected directly.</p><p><strong>Phase 4: Prune &amp; Index</strong></p><p>MEMORY.md is the file loaded at startup, and reportedly only about the first 200 lines make it in. Everything past that line is effectively invisible to the next session, so this phase:</p><ul><li>Removes pointers to deleted or superseded topic files</li><li>Adds pointers to newly important ones</li><li>Moves verbose detail out of the index and into topic files</li><li>Resolves disagreements between the index and the files it points to</li></ul><p>Files that don’t need changes are left alone. The process is surgical, not a full rewrite.</p><h3>4. When It Runs: The Dual-Gate Trigger</h3><p>A dream cycle reportedly runs only when <strong>both</strong> conditions are true:</p><pre>+--------------------------+<br>            | 24h+ since last dream?   |<br>            +------------+-------------+<br>                 no &lt;----+----&gt; yes<br>                 |              |<br>                 v              v<br>             +------+   +--------------------------+<br>             | wait |   | 5+ sessions since last?  |<br>             +------+   +------------+-------------+<br>                             no &lt;----+----&gt; yes<br>                             |              |<br>                             v              v<br>                         +------+      +---------+<br>                         | wait |      |  DREAM  |<br>                         +------+      +---------+</pre><p>Here’s how that plays out across realistic usage patterns:</p><pre>SCENARIO                         TIME   SESSIONS  DREAMS?  WHY<br>-------------------------------  -----  --------  -------  ------------<br>One long session over 2 days     48h    1         NO       Too few<br>                                                           sessions<br>10 quick sessions, 1 afternoon   3h     10        NO       Too little<br>                                                           time<br>Daily work, ~2 sessions a day    72h    6         YES      Both gates<br>Side project touched weekly      7d     2         NO       Too few<br>                                                           sessions<br>Heavy sprint week                5d     25        YES      Both gates</pre><p>The dual gate avoids wasted runs on lightly used projects while making sure active projects get regular cleanup.</p><h3>5. By the Numbers</h3><p>The write-up reports one consolidation covering <strong>913 sessions in roughly 8–9 minutes</strong>. That works out to about 100 sessions per minute, which is only feasible because Phase 2 greps narrowly instead of reading transcripts in full.</p><p>It also reports an index that shrank from <strong>280 lines to 142</strong>, bringing it back under the roughly 200-line startup limit:</p><pre>MEMORY.md size vs. startup load limit</pre><pre>Before |######################################## 280 lines<br>Limit  |############################|            200 lines (loads)<br>After  |####################                      142 lines<br>       +------------------------------------------&gt;<br>        0         100        200        300</pre><pre>Before: ~80 lines (29%) never reached the model at startup<br>After:  everything loads, with ~58 lines of headroom</pre><p>That 29% figure is the hidden cost of unmaintained memory: <strong>knowledge the agent technically has but never sees.</strong></p><h3>6. Before and After</h3><pre>BEFORE (30+ sessions, no consolidation)<br>~/.claude/projects/&lt;project&gt;/memory/<br>|-- MEMORY.md            [!] 280 lines, over the load limit<br>|-- debugging.md         [!] 3 contradictory API error entries<br>|-- api-conventions.md   [!] still says Express (migrated 2 wks ago)<br>|-- random-notes.md      [!] mix of stale and current info<br>|-- build-commands.md    [!] &quot;yesterday&quot; x6, no dates<br>`-- user-preferences.md  [!] duplicates MEMORY.md entries</pre><pre>AFTER (one dream cycle)<br>~/.claude/projects/&lt;project&gt;/memory/<br>|-- MEMORY.md            [ok] 142 lines, clean index<br>|-- debugging.md         [ok] deduplicated, current fixes only<br>|-- api-conventions.md   [ok] reflects Fastify migration<br>|-- build-commands.md    [ok] absolute dates, no duplicates<br>`-- user-preferences.md  [ok] merged with relevant index entries</pre><pre>random-notes.md -&gt; dissolved (merged into topic files or pruned)</pre><h3>7. Safety: What a Dream Can and Can’t Touch</h3><ul><li><strong>Will it change my code?</strong> No. Writes are limited to the memory directory.</li><li><strong>What if two sessions are open?</strong> A lock file allows only one dream at a time.</li><li><strong>Will it block my work?</strong> No. It runs in a separate background process.</li><li><strong>Can I undo its choices?</strong> Yes. Memory files are plain Markdown you can edit.</li><li><strong>Does it override my rules?</strong> No. CLAUDE.md remains the human-owned source of truth.</li></ul><h3>8. Auto Memory vs. Auto Dream</h3><p>These aren’t competing features. They’re two layers of one system.</p><pre>ASPECT            AUTO MEMORY                 AUTO DREAM<br>----------------  --------------------------  ---------------------------<br>Role              Collection                  Maintenance<br>Runs              Continuously, in sessions   Periodically (24h + 5)<br>Output            New notes                   Merged, pruned, re-indexed<br>Reads transcripts No (writes as it goes)      Yes, narrowly via grep<br>Trigger           Automatic                   Automatic or manual<br>If skipped        Lose useful learnings       Memory quality decays<br>Analogy           Taking notes in class       Rewriting notes for exam</pre><h3>9. The Full Memory Stack in Claude Code</h3><p>With Auto Dream, Claude Code reportedly has four memory mechanisms:</p><pre>CLAUDE.md     AUTO MEMORY   SESSION MEM.   AUTO DREAM<br>-------------  ------------  ------------  -------------  ------------<br>Written by     You           Claude        Claude         Claude<br>Purpose        Rules         Learnings     Continuity     Consolidation<br>Cadence        Manual        Every session ~Every 5K tok  24h + 5 sess.<br>Scope          Project/      Project       Session        Project<br>               global<br>At startup     Full file     First ~200    Relevant past  N/A (runs<br>                             index lines   sessions       between)<br>Authority      Highest       Learned       Contextual     Maintenance<br>Analogy        Manual        Day notes     Short-term     REM sleep</pre><pre>Authority / priority<br>                      ^<br>  CLAUDE.md           |  ############  You own it. Always wins.<br>                      |<br>  Auto Memory         |  ########      What Claude learned.<br>                      |      ^<br>  Auto Dream          |      | maintains -- keeps Auto Memory accurate<br>                      |<br>  Session Memory      |  #####         What happened recently.<br>                      +----------------------------------------&gt;</pre><h3>10. How It Compares to Other Agent Memory Strategies</h3><p>Auto Dream isn’t the only way to manage long-running agent memory. Here’s how the common approaches stack up:</p><pre>STRATEGY             HOW IT WORKS           STRENGTH          WEAKNESS<br>-------------------  ---------------------  ----------------  ----------------<br>Append-only notes    Keep adding entries    Simple, no loss   Unbounded bloat,<br>                                                              contradictions</pre><pre>Rolling summaries    Summarize and replace  Bounded size      Lossy; details<br>                     old context                              vanish silently</pre><pre>Vector retrieval     Embed notes, fetch     Scales to huge    Returns stale and<br>(RAG)                by similarity          stores            current alike</pre><pre>Human-curated rules  Engineer maintains     Accurate,         Misses what the<br>                     a rules file           authoritative     agent learns</pre><pre>Periodic             Review, merge, prune   Bounded AND       Token cost per<br>consolidation        on a schedule          current           cycle; can err<br>(Auto Dream)</pre><p>The key distinction is that most approaches handle <strong>size</strong>, but few handle <strong>truth</strong>. Retrieval systems will happily surface an outdated fact if it’s semantically similar to your query. Consolidation actively deletes facts that the codebase has disproven.</p><h3>11. An Engineer’s Lens: This Is Compaction</h3><p>If you’ve worked with storage systems, Auto Dream will look familiar. It’s <strong>compaction for agent memory</strong>.</p><pre>SYSTEM          WRITE PATH          MAINTENANCE PATH     WHY IT EXISTS<br>--------------  ------------------  -------------------  ------------------<br>LSM-tree DBs    Append SSTables     Compaction merges,   Reads slow as<br>                                    drops tombstones     files pile up</pre><pre>PostgreSQL      MVCC row versions   VACUUM reclaims      Dead rows bloat<br>                                    dead tuples          tables</pre><pre>Git             Loose objects       git gc packs and     Repo slows with<br>                                    prunes               loose objects</pre><pre>GC runtimes     Allocate objects    GC frees             Memory fills up<br>                                    unreachable ones</pre><pre>Claude Code     Auto memory notes   Auto Dream           Context fills<br>                                    consolidation        with noise</pre><p>The pattern is universal: <strong>any system with a cheap append path eventually needs an expensive cleanup path.</strong> Agent memory is no exception. The difference is that here the “garbage” isn’t just wasted space. It’s actively misleading information that shapes what the model does next.</p><h3>12. Practical Recommendations</h3><ul><li><strong>Normal active development:</strong> Let it run automatically. The defaults are sensible.</li><li><strong>Right after a framework migration:</strong> Trigger a dream manually by saying “dream” or “consolidate my memory files.”</li><li><strong>After a large rename or refactor:</strong> Trigger manually, since stale file references do the most damage here.</li><li><strong>Every few weeks:</strong> Skim MEMORY.md and correct any consolidation choices you disagree with.</li><li><strong>Team-wide conventions:</strong> Put them in CLAUDE.md, not memory. Rules belong to humans.</li><li><strong>Checking your setup:</strong> Run /memory and look for the auto-dream toggle.</li></ul><pre># Check whether Auto Dream is enabled<br>/memory</pre><pre># Look for:<br># Auto-dream: on</pre><h3>13. Design Lessons for Anyone Building Agents</h3><p>Even if you never use Claude Code, Auto Dream encodes useful principles for agent memory design:</p><ol><li><strong>Separate collection from maintenance.</strong> Writing memories and cleaning them are different jobs with different cadences.</li><li><strong>Retrieve narrowly, not exhaustively.</strong> Searching for known high-value signals beats replaying full history.</li><li><strong>Normalize time.</strong> Relative dates are a bug waiting to happen, so store absolute timestamps.</li><li><strong>Fix at the source.</strong> Don’t just flag contradictions. Resolve them where they live.</li><li><strong>Respect the context budget.</strong> If only about 200 lines load at startup, everything past that line doesn’t exist.</li><li><strong>Keep a human-owned layer on top.</strong> Learned memory should never outrank explicit rules.</li><li><strong>Gate maintenance on activity.</strong> Time-plus-usage triggers avoid wasting compute on idle projects.</li></ol><h3>Closing Thought</h3><p>We’ve spent a lot of effort making AI agents remember <em>more</em>. Auto Dream points to the harder and more important goal of making them remember <em>better</em>. Forgetting the right things, resolving contradictions, and keeping knowledge aligned with reality isn’t a polish feature for long-running agents. It’s what stops memory from becoming a liability.</p><p>Even AI, it turns out, needs a good night’s sleep.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12387fe547dc" width="1" height="1" alt=""><hr><p><a href="https://tutorialsavvy.com/claude-is-learning-to-sleep-a-deep-dive-into-dreaming-memory-decay-and-how-ai-agents-keep-12387fe547dc">Claude Is Learning to Sleep: A Deep Dive into “Dreaming,” Memory Decay, and How AI Agents Keep…</a> was originally published in <a href="https://tutorialsavvy.com">Tutorial Savvy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Large World Models(LWM): Teaching AI to Imagine the World]]></title>
            <link>https://tutorialsavvy.com/large-world-models-lwm-teaching-ai-to-imagine-the-world-1f1e6a73091a?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/1f1e6a73091a</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[lwm]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Rithvik K]]></dc:creator>
            <pubDate>Wed, 30 Sep 2026 01:11:10 GMT</pubDate>
            <atom:updated>2026-09-30T01:11:11.855Z</atom:updated>
            <content:encoded><![CDATA[<h3>What LWMs are, how they work under the hood, who’s building them in 2026, and why your production stack still runs on LLMs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N7O4EmtOarZo1TyVx3Tc-A.png" /></figure><p>Ask a good LLM what happens if you nudge a glass off the edge of a table and you’ll get a flawless answer: it falls, it probably shatters, there’s water on the floor. Now ask it to <em>show</em> you the next three seconds, from the other side of the room, after you’ve nudged the glass two centimetres to the left instead. It can’t. It knows the sentence. It doesn’t have the scene.</p><p>That gap is what large world models are trying to close.</p><p>In the last 18 months, world models have gone from a research curiosity to one of the most heavily funded ideas in AI. Google DeepMind’s Genie 3 generates explorable worlds in real time. Fei-Fei Li’s World Labs raised $1 billion in February 2026 and, on September 28, agreed to join AMD. Yann LeCun left Meta to found AMI Labs, which raised $1.03 billion to build world models. NVIDIA’s Cosmos models, trained on 20 million hours of video, are being used to train robots and self-driving cars. Gartner put “physical AI” on its list of top strategic technology trends for 2026.</p><p>This post is a practical guide. We’ll cover:</p><ul><li>what a world model is, and what makes one “large”</li><li>how LWMs work under the hood, with block diagrams</li><li>the four families of world models and the flagship systems in each</li><li>where they’re used today, and what’s still hard</li><li>how LWMs differ from LLMs, and why nearly every AI product you use still runs on an LLM</li></ul><blockquote><strong><em>TL;DR:</em></strong><em> An LLM predicts the next token of text. An LWM predicts the next state of a world (video frames, a 3D scene or an abstract latent state) given an action. That makes LWMs the right tool for robotics, driving, games and simulation, and the wrong (and far more expensive) tool for most knowledge work. The future isn’t one replacing the other. It’s a stack where each does what it’s best at.</em></blockquote><h3>1. What is a world model?</h3><p>A world model is a learned simulator. Give it the current state of an environment and an action, and it predicts what happens next:</p><pre>next_state = f(current_state, action)</pre><p>The idea is older than deep learning. In 1943 the psychologist Kenneth Craik suggested that the mind carries a “small-scale model” of external reality, which lets us try out alternatives before committing to one. You use yours constantly. To catch a ball, you predict where it <em>will</em> be, not where it is. To cross a dark room, you remember where the coffee table was.</p><p>A machine world model has three jobs:</p><ol><li><strong>Represent.</strong> Compress raw observations (pixels, depth, lidar, joint angles) into a compact state.</li><li><strong>Predict.</strong> Roll that state forward in time, conditioned on actions.</li><li><strong>Stay consistent.</strong> Remember what it has seen, so the wall you walked past is still there when you turn around.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R0WPFMukniRRDQVUm4RodQ.png" /></figure><p><em>The core loop. The agent imagines many futures cheaply, then acts on the best one in the real world.</em></p><p>The payoff is imagination. An agent with a good world model can try a thousand candidate actions “in its head” and execute only the one that looks best. In 2018, David Ha and Jürgen Schmidhuber showed that an agent could learn to play a video game entirely inside “its own hallucinated dream,” then carry that skill back to the real game. They split the system into Vision (V), Memory (M) and Controller ©. That three-part shape still describes most world models today.</p><h3>2. So what makes it “large”?</h3><p>Classic world models were small and narrow: one model per game or robot, trained on that environment’s data. Large world models apply the recipe that made LLMs work:</p><ul><li><strong>Internet-scale data:</strong> millions of hours of video instead of one game’s replays.</li><li><strong>Big transformer backbones:</strong> billions of parameters.</li><li><strong>Pretrain, then adapt:</strong> one general model, then fine-tune or prompt it for driving, robotics or games.</li><li><strong>Prompting:</strong> describe a world in text, or hand it a photo, and it generates one.</li></ul><p>A note on naming, because it’s messy. World Labs describes its work as building “large world models.” NVIDIA calls Cosmos “world foundation models.” DeepMind called Genie 2 a “foundation world model.” And a 2024 Berkeley paper literally named “Large World Model” (LWM) was a long-context model that reads video and text across a million-token window, which is closer to a multimodal LLM than to a simulator. In this post, <strong>LWM</strong> means the broad category: large, general-purpose models that learn how worlds look and behave.</p><h3>3. A short history</h3><p><em>World models have deep roots in cognitive science and reinforcement learning, but most of the progress has happened since 2024.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tpTVv7PBpA6LnUQwWJYC9Q.png" /></figure><p>Three threads came together.</p><p><strong>Model-based reinforcement learning gave us the loop.</strong> Richard Sutton’s Dyna (1990) learned a model of the environment and planned inside it. Ha and Schmidhuber (2018) trained agents in their dreams. DeepMind’s MuZero mastered Go, chess and Atari by planning with a learned model it was never told the rules of. DreamerV3 used one configuration across more than 150 tasks and became the first algorithm to collect diamonds in Minecraft from scratch, with no human data. It was published in <em>Nature</em> in 2025.</p><p><strong>Video generation gave us scale.</strong> OpenAI’s February 2024 Sora report argued that scaling video models is “a promising path towards building general purpose simulators of the physical world.”</p><p><strong>Interactivity tied them together.</strong> DeepMind’s Genie (February 2024, 11 billion parameters) learned playable 2D worlds from unlabeled internet video, without any action labels. Genie 2 (December 2024) made playable 3D worlds from a single image, consistent for up to a minute. Genie 3 (August 2025) made them real-time.</p><h3>4. Inside a large world model</h3><p>There’s no single LWM architecture, but most systems fill the same four slots: inputs, tokenizers, a prediction backbone and outputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFpx09bKvqSJlGjf5acQxg.png" /><figcaption><em>A generic blueprint. Different labs make different choices in each column.</em></figcaption></figure><h3>Step 1: Tokenize the world</h3><p>Raw video is enormous. One minute of 720p video at 24 frames per second is 1,440 frames and more than 1.3 billion pixels. So the first job is compression. A video tokenizer (usually a VAE or a vector-quantized encoder) chops a clip into small space-time patches and maps each one to a compact latent token. The rest of the model never sees raw pixels; it works in this compressed space.</p><p>Other inputs get their own encoders: depth and camera pose, text prompts (often via a pretrained language model), and, most importantly, actions.</p><h3>Step 2: Condition on actions</h3><p>This is what separates a world model from a video generator. A video model answers “what might happen next?” A world model answers “what happens next <em>if I do this</em>?”</p><p>Actions can be explicit: key presses, steering angles, robot joint commands. But most internet video has no action labels. Nobody logged which buttons the player pressed. Genie’s clever trick was a <strong>latent action model</strong> that watches consecutive frames and infers a small set of discrete actions that explain the change. Train it on enough gameplay footage and those latent actions end up meaning things like “jump” or “move left,” without anyone labeling them.</p><h3>Step 3: Predict the next state</h3><p>The backbone is usually a large spatiotemporal transformer. It attends within each frame (space), across frames (time, usually causally so the future can’t leak into the past), and to the actions and text it’s conditioned on. Three training objectives dominate:</p><ul><li><strong>Autoregressive prediction:</strong> predict the next video tokens one step at a time, the way an LLM predicts the next word. Genie’s dynamics model works this way.</li><li><strong>Diffusion or flow matching:</strong> start from noise and iteratively denoise the next frames, conditioned on history and actions. Most photoreal video world models work this way. NVIDIA released Cosmos in both diffusion and autoregressive versions.</li><li><strong>Embedding prediction (JEPA):</strong> don’t predict pixels at all. Predict the <em>representation</em> of the future.</li></ul><p>That last choice is one of the biggest philosophical splits in the field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0oZHMz6ZwAVBFTBOikFWBg.png" /></figure><p>Yann LeCun’s case for JEPA (Joint-Embedding Predictive Architecture) is that the world is full of details nobody can predict, like the exact pattern of leaves in the wind or ripples on a pond, and forcing a model to generate them wastes capacity. Predict an abstract summary instead, and the model can focus on what matters: the glass is falling, the car is braking. The trade-off is that you can’t watch a JEPA model’s imagination. There’s no video to inspect.</p><h3>Step 4: Remember</h3><p>Memory is the hardest part. Generate a world frame by frame and small errors compound: a door drifts, a sign changes, a building disappears when you look away. There are three main approaches:</p><ul><li><strong>Frame cache:</strong> attend to recent frames. Genie 3’s visual memory reaches back about a minute.</li><li><strong>Pose-indexed spatial memory:</strong> store frames along with the camera position they were taken from, and retrieve the nearby ones when you come back. World Labs’ RTFM model does this and runs at interactive frame rates on a single H100 GPU.</li><li><strong>Explicit 3D:</strong> build a persistent 3D scene (Gaussian splats or meshes) so the world can’t forget. World Labs’ Marble takes this route.</li></ul><h3>The imagination loop, in code</h3><p>Once you have a world model, planning is surprisingly simple. Here’s the core idea in pseudocode. It’s roughly how Meta’s V-JEPA 2-AC plans robot arm movements toward a goal image:</p><pre># Planning with a world model (simplified pseudocode)<br>z    = encoder(camera_frame)       # 1. compress what you see<br>goal = encoder(goal_image)         #    ...and what you want to see</pre><pre>best_plan, best_score = None, float(&quot;-inf&quot;)<br>for plan in sample_action_sequences(n=256, horizon=10):<br>    z_sim = z<br>    for action in plan:            # 2. imagine; don&#39;t act yet<br>        z_sim = dynamics(z_sim, action)<br>    score = -distance(z_sim, goal) # 3. how close did we get?<br>    if score &gt; best_score:<br>        best_plan, best_score = plan, score</pre><pre>robot.execute(best_plan[0])        # 4. take one step, observe, repeat</pre><p>No hand-written reward function and no real-world trial and error. The robot rehearses in latent space, takes one step, looks again, and replans.</p><h3>5. The four families of world models</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zPxi_oxevspbeWssOW4DBw.png" /></figure><p><em>What a model predicts determines what it’s good at.</em></p><p><strong>Interactive video world models</strong> (Genie 3, Runway GWM, Odyssey, Decart, Cosmos Predict, Waymo’s world model, Wayve GAIA) generate pixels in response to actions. They’re the most visually impressive and the most general. They’re also the most expensive to run, and they drift over time.</p><p><strong>Spatial or 3D world models</strong> (World Labs Marble, Tencent HunyuanWorld) produce an explicit 3D scene you can walk through, edit and export to other tools. Persistence comes for free. Rich dynamics don’t.</p><p><strong>Latent predictive models</strong> (Meta’s V-JEPA 2, AMI Labs) predict in embedding space. They’re efficient and good for planning, but hard to show off, since there’s nothing to watch.</p><p><strong>Agent-centric RL world models</strong> (DreamerV3, MuZero) learn compact dynamics for one environment. They’re narrow but proven, and they’re the source of most of the field’s core ideas.</p><p>Real systems increasingly mix families. Cosmos pairs video models with a reasoning vision-language model, and World Labs’ RTFM renders frames in real time on top of a spatial memory.</p><h3>6. The flagship systems, as of September 2026</h3><h3>Google DeepMind: Genie 3 and Project Genie</h3><p>Genie 3, announced in August 2025, generates worlds from a text prompt in real time at 720p and 24 fps, and keeps them consistent for a few minutes. It introduced “promptable world events”: type a text command to change the weather or add a new object or character, and the world changes mid-session. DeepMind also uses Genie 3 worlds as a training ground. Its SIMA 2 agent plays and improves itself inside them.</p><p>In January 2026, Google opened <strong>Project Genie</strong>, a prototype for US Google AI Ultra subscribers with a 60-second limit per world. In May it added Street View, so you can generate worlds from real streets. DeepMind’s Jack Parker-Holder was candid about where it stands, calling it “maybe six to 12 months behind video” in quality. And in February, Waymo unveiled the <strong>Waymo World Model</strong>, built on Genie 3. It generates both camera and lidar data and can simulate rare events like a tornado or an elephant on the road.</p><h3>World Labs: Marble, RTFM and the AMD deal</h3><p>Fei-Fei Li’s World Labs came out of stealth in September 2024 with $230 million to build “large world models” with spatial intelligence. Its product <strong>Marble</strong> (generally available since November 2025) turns text, images, video or rough 3D layouts into persistent 3D worlds, and exports them as Gaussian splats, meshes or video. <strong>RTFM</strong>, its real-time frame model, renders explorable worlds on a single H100.</p><p>In 2026 World Labs launched a World API, raised $1 billion from backers including AMD, Autodesk and NVIDIA, and released <strong>Atlas</strong>, which generates up to a minute of 1440p video. On September 28, 2026, it announced an agreement to join AMD, with Fei-Fei Li set to become AMD’s Chief Scientist. The deal is expected to close by the end of 2026. TechCrunch reports its value at $8.2 billion.</p><h3>NVIDIA: Cosmos</h3><p>NVIDIA launched <strong>Cosmos</strong> at CES in January 2025 as a platform of open world foundation models for “physical AI,” trained on 9,000 trillion tokens drawn from 20 million hours of real-world data. The family grew into three lines: <strong>Predict</strong> (generate future video), <strong>Transfer</strong> (turn structured inputs like depth maps, segmentation or simulator output into photoreal video) and <strong>Reason</strong> (a vision-language model that reasons about physical scenes). <strong>Cosmos 3</strong>, released in May 2026, merges text, image, video, sound and action into one “omnimodel” in 4B, 16B and 64B sizes.</p><p>Cosmos’s pitch is less “play a world” and more “make training data for robots and cars.”</p><h3>Meta and AMI Labs: the JEPA bet</h3><p>Meta’s <strong>V-JEPA 2</strong> (June 2025) is a 1.2-billion-parameter model trained on more than a million hours of video. Its action-conditioned version, V-JEPA 2-AC, was trained on just 62 hours of robot data and then planned pick-and-place tasks zero-shot in new labs, with 65–80% success. <strong>V-JEPA 2.1</strong> (March 2026) improved real-robot grasping by about 20 points.</p><p>Yann LeCun, who championed JEPA at Meta, left to found <strong>AMI Labs</strong> in Paris. In March 2026 it raised $1.03 billion at a $3.5 billion pre-money valuation to build JEPA-style world models. As of September 2026, it hasn’t released a product and describes itself as still in a research and building phase.</p><h3>Driving: Waymo, Wayve and Tesla</h3><p>Self-driving is the most mature commercial use of world models. Besides Waymo’s Genie-based model, Wayve’s <strong>GAIA-3</strong> (15 billion parameters, December 2025) and <strong>GAIA-4</strong> (August 2026, closed-loop simulation) generate driving scenarios for training and testing, and Tesla has described a “neural world simulator” for evaluating its driving software. The value is obvious: you can’t wait for a real child to run into a real road to test your car, but you can simulate it a million times.</p><h3>Also worth knowing</h3><p>Runway’s GWM-1 (December 2025) and GWM Worlds 2 (September 2026) target media and robotics. Microsoft’s Muse, published in <em>Nature</em>, generates gameplay from a real game’s data. Odyssey-3 (September 2026) aims to cover robots, cars and games in one model. Tencent’s HunyuanWorld line offers open-source 3D world generation. And OpenAI, whose Sora report helped popularize the “world simulator” framing, discontinued the Sora app in April 2026.</p><h3>7. Where world models are used today</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jXPinNdtSy4WUH_3Xvq0fw.png" /></figure><p>The common thread is that reality is a slow and expensive teacher. With a world model, robots can rehearse before they move, cars can crash safely, agents can train on endless worlds, and game studios and VFX teams can prototype in minutes instead of weeks.</p><h3>8. What’s still hard</h3><ul><li><strong>Long-horizon consistency.</strong> DeepMind describes Genie 3 as supporting “a few minutes of continuous interaction, rather than extended hours.” Small errors compound.</li><li><strong>Physics that looks right but isn’t.</strong> Visual plausibility is not physical accuracy. TechCrunch described Project Genie as “not yet physics-aware.” A robot trained on subtly wrong physics learns subtly wrong skills.</li><li><strong>Limited actions and multiple agents.</strong> DeepMind lists a limited action space and interactions between multiple agents as Genie 3 limitations, along with text legibility and geographic accuracy.</li><li><strong>Data.</strong> There’s plenty of video, but very little <em>action-labeled</em> video that records what caused each change.</li><li><strong>Evaluation.</strong> There’s no MMLU for worlds. Meta released three new benchmarks (IntPhys 2, MVPBench and CausalVQA) alongside V-JEPA 2 because existing ones didn’t measure physical understanding well.</li><li><strong>Compute.</strong> This is the biggest reason LWMs aren’t everywhere yet. More on it below.</li><li><strong>Trust and safety.</strong> Photoreal, controllable video of real places raises obvious questions about deepfakes and misuse.</li></ul><h3>9. LLMs vs LWMs: what’s actually different?</h3><p>At a high level they share a recipe: big transformers, scaling laws, and pretraining on huge datasets followed by post-training. The difference is <em>what they predict</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uok5KO-LuKiWR_2G2ytTgQ.png" /></figure><p>An LLM lives in a one-dimensional world of text. Its state is the text so far, its unit of prediction is a sub-word token, and a hundred tokens a second feels instant. An LWM lives in space and time. Its state is a whole scene, including whatever is currently off-screen. Its unit is a space-time patch, and it has to produce 24 to 60 frames every second to feel real.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TbThAY2lnPcBERbveGfT0g.png" /></figure><p>The most important differences, in words:</p><ul><li><strong>The core question.</strong> An LLM asks “what word comes next?” An LWM asks “what happens next if I do this?”</li><li><strong>Training data.</strong> Recent open LLMs train on roughly 15 to 36 trillion tokens of text and code (Llama 3 used 15T+, Qwen3 about 36T). Cosmos trained on about 9,000 trillion tokens from 20 million hours of video. Each video token carries far less meaning than a text token, so the numbers aren’t directly comparable.</li><li><strong>The scarce ingredient.</strong> For LLMs, it’s fresh, high-quality human text. For LWMs, it’s action-labeled data.</li><li><strong>What they understand.</strong> LLMs: language, facts, code and symbolic reasoning. LWMs: geometry, intuitive physics, cause and effect, object permanence.</li><li><strong>Time.</strong> LLMs are turn-based, and a second of latency is fine. LWMs are continuous and real-time.</li><li><strong>How they fail.</strong> LLMs hallucinate facts. LWMs hallucinate physics: drift, melting objects, things that vanish.</li><li><strong>Maturity.</strong> LLMs are everywhere, with mature APIs and tooling. LWMs are mostly research previews and early APIs.</li></ul><p><strong>Don’t LLMs already have a world model?</strong> Partly. Trained on enough text, LLMs absorb a lot about how the world works, which is why they can explain why a glass breaks. But that knowledge comes from <em>descriptions</em> of the world, not from observing it, and it isn’t spatial, continuous or tied to actions. An LLM knows the glass falls. An LWM can show you where the shards land.</p><h3>10. So why do we still use LLMs, not LWMs?</h3><p>If world models are closer to how intelligence works in the physical world, why does nearly every AI product (chat assistants, coding tools, support bots, search) still run on LLMs? There are seven reasons.</p><h3>1. Most valuable digital work is language-shaped</h3><p>Code, contracts, emails, tickets, spreadsheets, reports: most knowledge work is text in, text out. A world model can simulate a kitchen, but it can’t write your SQL query, summarize a contract or fix a failing test. The problem picks the model, and most software problems are language problems.</p><h3>2. Text is pre-compressed meaning</h3><p>“The glass fell and shattered” is five words. Rendering it as video takes hundreds of thousands of tokens. When people write, they’ve already done the hard work of abstraction: deciding what matters and naming it. That’s why an LLM learns so much per token, and why a world model has to wade through huge volumes of redundant pixels to learn the same concept. Worse, most video lacks the thing a world model needs most: a record of the action that caused each change.</p><h3>3. Serving a world costs orders of magnitude more</h3><p><em>World-model figures from World Labs’ RTFM post (October 2025). LLM figures are typical 2026 values.</em></p><p>A chatbot streams about a hundred tokens a second and can pause to think. A world model has to generate frames continuously, for every user, against hard real-time deadlines. World Labs has written that world models “will be very computationally demanding, much more so than LLMs today.” By its estimate, 4K video at 60 fps needs more than 100,000 tokens per second, and keeping a world consistent for an hour would take more than 100 million tokens of context, which it calls “neither feasible nor economically viable” today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c0KDnPU91qLU7wjZPiLMZw.png" /></figure><p>You can see the economics in how these systems are offered. Genie 3 launched as a limited research preview, and Project Genie caps each world at 60 seconds for top-tier subscribers.</p><h3>4. You can check an LLM’s work</h3><p>When an LLM writes code, you run the tests. When it states a fact, you can look it up. Checking whether a simulated world obeys physics is much harder, and the benchmarks to do it are still being invented. For a business, being able to verify output is what turns a demo into a product.</p><h3>5. The ecosystem is years ahead</h3><p>LLMs come with everything a team needs to ship: stable APIs, fine-tuning, retrieval, function calling, agent frameworks, evaluation harnesses, guardrails, and lots of engineers who know how to use them. LWMs mostly offer research previews, waitlists and first-generation APIs. AMI Labs, with more than a billion dollars raised, hasn’t released a product yet.</p><h3>6. Language is still the interface</h3><p>People specify goals in words. Even world models are prompted in text (“a rainy street in Tokyo”), and many use a pretrained language model as their text encoder. NVIDIA built Cosmos Reason, a vision-language model, because a physical-AI system still needs something that can follow instructions and explain its reasoning. Here LLMs aren’t competing with world models; they’re a component inside them.</p><h3>7. They aren’t substitutes</h3><p>“Why LLMs and not LWMs?” assumes one should replace the other. They do different jobs. Asking an LWM to draft a strategy memo is like asking a flight simulator to write the pilot’s manual. The useful question is where each one fits.</p><h3>11. Which one should you reach for?</h3><p>A practical rule of thumb:</p><ul><li><strong>Use an LLM</strong> when the input and output are language, code or structured data, and the job is reasoning, retrieval, writing or tool use.</li><li><strong>Use a vision-language model</strong> when you need to <em>understand</em> images or video but can answer in text: inspection, captioning, visual Q&amp;A.</li><li><strong>Use a world model</strong> when you need to <em>predict what physically happens next</em> under different actions: generating training data, testing robot or driving policies, rehearsing plans, or building explorable 3D and interactive media.</li><li><strong>Use both</strong> when an agent has to act in the physical world. That’s where the field is heading.</li></ul><h3>12. The future is a stack, not a winner</h3><p><em>Each layer does the job it’s best at. The loop between imagination and action is the key idea.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PtZ-4jN1ggGKgtFvHnIYEQ.png" /></figure><p>The emerging architecture for physical AI looks less like one giant model and more like a team. A language model understands the request and plans the steps. A world model imagines what each candidate step would do. An action model, often a vision-language-action (VLA) model like Physical Intelligence’s π series, turns the chosen plan into motor commands. Sensors stream back, and the loop repeats.</p><p>You can already see the pieces converging. Cosmos 3 folds text, video, sound and action into one model. DeepMind trains SIMA 2 agents inside Genie 3 worlds. Waymo tests its cars against Genie-based simulations of events it may never record in reality. The lines between “language model,” “video model” and “world model” get blurrier every quarter.</p><h3>References</h3><ol><li>Google DeepMind, “Genie 3: A new frontier for world models” (Aug 2025): <a href="https://deepmind.google/discover/blog/genie-3-a-new-frontier-for-world-models/">https://deepmind.google/discover/blog/genie-3-a-new-frontier-for-world-models/</a></li><li>Google DeepMind, “Genie 2: A large-scale foundation world model” (Dec 2024): <a href="https://deepmind.google/discover/blog/genie-2-a-large-scale-foundation-world-model/">https://deepmind.google/discover/blog/genie-2-a-large-scale-foundation-world-model/</a></li><li>Bruce et al., “Genie: Generative Interactive Environments” (Feb 2024): <a href="https://arxiv.org/abs/2402.15391">https://arxiv.org/abs/2402.15391</a></li><li>Google, “Project Genie” (Jan 2026): <a href="https://blog.google/innovation-and-ai/models-and-research/google-deepmind/project-genie/">https://blog.google/innovation-and-ai/models-and-research/google-deepmind/project-genie/</a></li><li>TechCrunch, “Google’s Genie world model can now simulate real streets with Street View” (May 2026): <a href="https://techcrunch.com/2026/05/19/googles-genie-world-model-can-now-simulate-real-streets-with-street-view/">https://techcrunch.com/2026/05/19/googles-genie-world-model-can-now-simulate-real-streets-with-street-view/</a></li><li>Google DeepMind, “SIMA 2” (Nov 2025): <a href="https://deepmind.google/blog/sima-2-an-agent-that-plays-reasons-and-learns-with-you-in-virtual-3d-worlds/">https://deepmind.google/blog/sima-2-an-agent-that-plays-reasons-and-learns-with-you-in-virtual-3d-worlds/</a></li><li>Waymo, “The Waymo World Model” (Feb 2026): <a href="https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simulation">https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simulation</a></li><li>World Labs, “Marble” (Nov 2025): <a href="https://www.worldlabs.ai/blog/marble-world-model">https://www.worldlabs.ai/blog/marble-world-model</a></li><li>World Labs, “RTFM: A Real-Time Frame Model” (Oct 2025): <a href="https://www.worldlabs.ai/blog/rtfm">https://www.worldlabs.ai/blog/rtfm</a></li><li>World Labs, 2026 funding announcement: <a href="https://www.worldlabs.ai/blog/funding-2026">https://www.worldlabs.ai/blog/funding-2026</a></li><li>World Labs, AMD announcement (Sep 2026): <a href="https://www.worldlabs.ai/blog/amd-announcement">https://www.worldlabs.ai/blog/amd-announcement</a></li><li>TechCrunch, “AMD will acquire Fei-Fei Li’s World Labs for $8.2 billion” (Sep 2026): <a href="https://techcrunch.com/2026/09/28/amd-will-acquire-fei-fei-lis-world-labs-for-8-2-billion/">https://techcrunch.com/2026/09/28/amd-will-acquire-fei-fei-lis-world-labs-for-8-2-billion/</a></li><li>TechCrunch, World Labs comes out of stealth (Sep 2024): <a href="https://techcrunch.com/2024/09/13/fei-fei-lis-world-labs-comes-out-of-stealth-with-230m-in-funding/">https://techcrunch.com/2024/09/13/fei-fei-lis-world-labs-comes-out-of-stealth-with-230m-in-funding/</a></li><li>NVIDIA, Cosmos launch (Jan 2025): <a href="https://nvidianews.nvidia.com/news/nvidia-launches-cosmos-world-foundation-model-platform-to-accelerate-physical-ai-development">https://nvidianews.nvidia.com/news/nvidia-launches-cosmos-world-foundation-model-platform-to-accelerate-physical-ai-development</a></li><li>NVIDIA, “What are world foundation models?”: <a href="https://blogs.nvidia.com/blog/cosmos-world-foundation-models/">https://blogs.nvidia.com/blog/cosmos-world-foundation-models/</a></li><li>NVIDIA, Cosmos 3 launch (May 2026): <a href="https://nvidianews.nvidia.com/news/nvidia-launches-cosmos-3-the-open-frontier-foundation-model-for-physical-ai">https://nvidianews.nvidia.com/news/nvidia-launches-cosmos-3-the-open-frontier-foundation-model-for-physical-ai</a></li><li>Meta AI, “V-JEPA 2” (Jun 2025): <a href="https://ai.meta.com/blog/v-jepa-2-world-model-benchmarks/">https://ai.meta.com/blog/v-jepa-2-world-model-benchmarks/</a></li><li>V-JEPA 2.1 (Mar 2026): <a href="https://arxiv.org/abs/2603.14482">https://arxiv.org/abs/2603.14482</a></li><li>TechCrunch, “Yann LeCun’s AMI Labs raises $1.03 billion to build world models” (Mar 2026): <a href="https://techcrunch.com/2026/03/09/yann-lecuns-ami-labs-raises-1-03-billion-to-build-world-models/">https://techcrunch.com/2026/03/09/yann-lecuns-ami-labs-raises-1-03-billion-to-build-world-models/</a></li><li>TechCrunch, “World model companies are keeping a lot of secrets” (Sep 2026): <a href="https://techcrunch.com/2026/09/20/world-model-companies-are-keeping-a-lot-of-secrets/">https://techcrunch.com/2026/09/20/world-model-companies-are-keeping-a-lot-of-secrets/</a></li><li>OpenAI, “Video generation models as world simulators” (Feb 2024): <a href="https://openai.com/index/video-generation-models-as-world-simulators/">https://openai.com/index/video-generation-models-as-world-simulators/</a></li><li>OpenAI, “Sora 2 is here” (Sep 2025; product discontinued Apr 2026): <a href="https://openai.com/index/sora-2/">https://openai.com/index/sora-2/</a></li><li>Wayve, GAIA-3 (Dec 2025): <a href="https://wayve.ai/thinking/gaia-3/">https://wayve.ai/thinking/gaia-3/</a> and GAIA-4 (Aug 2026): <a href="https://wayve.ai/thinking/gaia-4/">https://wayve.ai/thinking/gaia-4/</a></li><li>Runway, “Introducing GWM-1” (Dec 2025): <a href="https://runwayml.com/research/introducing-runway-gwm-1">https://runwayml.com/research/introducing-runway-gwm-1</a></li><li>Microsoft Research, “Introducing Muse” (Feb 2025): <a href="https://www.microsoft.com/en-us/research/blog/introducing-muse-our-first-generative-ai-model-designed-for-gameplay-ideation/">https://www.microsoft.com/en-us/research/blog/introducing-muse-our-first-generative-ai-model-designed-for-gameplay-ideation/</a></li><li>Odyssey, “Introducing Odyssey-3” (Sep 2026): <a href="https://odyssey.systems/introducing-odyssey-3">https://odyssey.systems/introducing-odyssey-3</a></li><li>Liu et al., “World Model on Million-Length Video and Language with Blockwise RingAttention” (Feb 2024): <a href="https://arxiv.org/abs/2402.08268">https://arxiv.org/abs/2402.08268</a></li><li>Ha &amp; Schmidhuber, “World Models” (2018): <a href="https://arxiv.org/abs/1803.10122">https://arxiv.org/abs/1803.10122</a></li><li>Hafner et al., “Mastering diverse control tasks through world models,” <em>Nature</em> (2025): <a href="https://www.nature.com/articles/s41586-025-08744-2">https://www.nature.com/articles/s41586-025-08744-2</a></li><li>Schrittwieser et al., “Mastering Atari, Go, Chess and Shogi by Planning with a Learned Model” (MuZero): <a href="https://arxiv.org/abs/1911.08265">https://arxiv.org/abs/1911.08265</a></li><li>Meta, “Introducing Meta Llama 3”: <a href="https://ai.meta.com/blog/meta-llama-3/">https://ai.meta.com/blog/meta-llama-3/</a> · Qwen, “Qwen3”: <a href="https://qwenlm.github.io/blog/qwen3/">https://qwenlm.github.io/blog/qwen3/</a></li><li>Gartner, “Top Strategic Technology Trends for 2026” (Oct 2025): <a href="https://www.gartner.com/en/newsroom/press-releases/2025-10-20-gartner-identifies-the-top-strategic-technology-trends-for-2026">https://www.gartner.com/en/newsroom/press-releases/2025-10-20-gartner-identifies-the-top-strategic-technology-trends-for-2026</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f1e6a73091a" width="1" height="1" alt=""><hr><p><a href="https://tutorialsavvy.com/large-world-models-lwm-teaching-ai-to-imagine-the-world-1f1e6a73091a">Large World Models(LWM): Teaching AI to Imagine the World</a> was originally published in <a href="https://tutorialsavvy.com">Tutorial Savvy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Animating a 3D Gift Box with WebGPU]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://tutorialsavvy.com/animating-a-3d-gift-box-with-webgpu-80acd1d38842?source=rss----ebf0231b0e88---4"><img src="https://cdn-images-1.medium.com/max/1400/1*YlQP-vTAlNarY3gVYzHwuQ.png" width="1400"></a></p><p class="medium-feed-snippet">A hands-on intro to WebGPU: shaders, draw calls, and a live stats panel, in one HTML file with no libraries</p><p class="medium-feed-link"><a href="https://tutorialsavvy.com/animating-a-3d-gift-box-with-webgpu-80acd1d38842?source=rss----ebf0231b0e88---4">Continue reading on Tutorial Savvy »</a></p></div>]]></description>
            <link>https://tutorialsavvy.com/animating-a-3d-gift-box-with-webgpu-80acd1d38842?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/80acd1d38842</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[webgpu]]></category>
            <dc:creator><![CDATA[Sandeep Kumar Patel]]></dc:creator>
            <pubDate>Tue, 29 Sep 2026 17:04:50 GMT</pubDate>
            <atom:updated>2026-09-29T17:04:50.825Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why LLMs Hallucinate (and What Actually Helps)]]></title>
            <link>https://tutorialsavvy.com/why-llms-hallucinate-and-what-actually-helps-01f5267375ac?source=rss----ebf0231b0e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/01f5267375ac</guid>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Rithvik K]]></dc:creator>
            <pubDate>Tue, 29 Sep 2026 02:21:53 GMT</pubDate>
            <atom:updated>2026-09-29T02:21:51.942Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>Why a model makes things up, what’s going on inside it, and which fixes are worth your engineering time.</em></blockquote><p>Anyone who has shipped something built on an LLM has had this happen. You ask a simple question, like which API version added a certain endpoint, and you get a clean, confident, nicely formatted answer.</p><p>It’s wrong. The version number doesn’t exist, and the function it cites was never in the SDK. What bothered me most the first time was the tone: the model sounded exactly as sure as it does when it’s right.</p><p>For a while I treated hallucination as a bug that the next model release would fix. It hasn’t gone away, and I now think that’s expected. Hallucination is a side effect of how these models are trained and evaluated. Once you see where it comes from, it’s much easier to tell which mitigations actually work and which ones just make you feel better.</p><p>This post covers both. First the <em>why</em>, then the fixes that have held up for me and in the research, and a few that are overrated.</p><h3>First, what are we actually talking about?</h3><p>“Hallucination” has turned into a catch-all for “the AI said something wrong,” and that’s too broad to be useful. OpenAI’s definition is the one I like best: <em>plausible but false statements generated by language models.</em> The key word is plausible. A typo is a mistake. A made-up but perfectly formatted citation is a hallucination.</p><p><strong>So why do models make things up?</strong></p><p>Short version: next-word prediction produces hallucinations naturally, and the way we grade models keeps them around. There’s no single cause. Each stage of a model’s life adds a bit of pressure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yFkqrX4kJ5SXfXHD6FkdTA.png" /></figure><h3>1. Next-word prediction has no concept of “false”</h3><p>During pretraining the model learns one thing: given this text, what comes next? Nobody labels any sentence as true or false. All it ever sees are examples of fluent language.</p><p>The <a href="https://arxiv.org/abs/2509.04664">OpenAI paper by Kalai et al.</a> uses an analogy that made this click for me. Train an image model to label photos as “cat” or “dog” and it gets very good. Train it to label each pet photo with <em>the pet’s birthday</em> and it will always make mistakes, because nothing in the photo predicts the birthday.</p><p>Lots of facts work like birthdays. Spelling and bracket-matching follow consistent patterns, so those errors go away with scale. A specific person’s birth date, a niche API parameter, or the exact title of a paper doesn’t follow a pattern. Either the model saw it enough times to memorise it or it didn’t.</p><p>The paper makes this concrete. If 20% of birthday facts appear exactly once in the training data, you should expect a base model to hallucinate on at least 20% of birthday questions. So hallucination isn’t a mysterious glitch. It’s a predictable statistical error rate.</p><h3>2. The scoreboards reward bluffing</h3><p>This is the part people usually miss. Think back to multiple-choice exams with no negative marking. If you don’t know the answer, you guess, because a blank is guaranteed zero and a guess sometimes pays off.</p><p>Models get graded the same way. Most benchmarks score plain accuracy, so a model that says “I don’t know” scores the same as one that’s wrong. Over thousands of questions, the model that always guesses climbs the leaderboard. Train against that leaderboard and you’re effectively teaching the model to bluff.</p><p>OpenAI’s own numbers show this clearly. On the SimpleQA benchmark, the older o4-mini edges out the newer model on accuracy, 24% vs 22%. But it answers almost everything, so it’s wrong 75% of the time. The newer model says “I don’t know” on about half the questions and cuts its error rate to 26%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A0_s8mGcWWYC4sOKJJRhgA.png" /></figure><p>An accuracy-only leaderboard would rank o4-mini higher. As a user, I’d much rather have the other one.</p><p>The math behind this is simple. Suppose a correct answer scores 1, an abstention scores 0, and a wrong answer costs λ points. If the model’s confidence is p, answering is worth taking only when:</p><pre>p \cdot 1 - (1 - p) \cdot \lambda &gt; 0 \quad \Longleftrightarrow \quad p &gt; \frac{\lambda}{1 + \lambda}</pre><p>With plain accuracy scoring, λ = 0 and the threshold is zero, so guessing always pays. Set λ = 1 and the model should answer only when it’s more than 50% sure. Set λ = 3 and the bar is 75%. That’s the fix Kalai et al. argue for: change how the <em>main</em> benchmarks are scored, rather than adding yet another hallucination benchmark that nobody optimises for.</p><h3>3. Fine-tuning on facts the model doesn’t know</h3><p><a href="https://arxiv.org/abs/2405.05904">Gekhman et al. (EMNLP 2024)</a> ran a controlled experiment and found that fine-tuning examples with <em>new</em> facts are learned much more slowly than examples the model already agrees with. Once those new facts are learned, the model’s tendency to hallucinate goes up roughly linearly.</p><p>Their explanation is that models get most of their factual knowledge in pretraining. Fine-tuning mostly teaches them how to use what they already know. If you push brand-new facts in through SFT, what the model really learns is “answer confidently even when you don’t actually know.”</p><h3>4. Decoding and context</h3><p>The last push comes at inference time. Sampling with temperature above zero will sometimes pick a lower-probability token, and every token after that is conditioned on it. <a href="https://arxiv.org/abs/2305.13534">Zhang et al.</a> call this <em>hallucination snowballing</em>. They found GPT-4 could recognise 87% of its own mistakes when asked separately, yet it still defended them once they were in the answer.</p><p>Context causes problems too. If the retrieved documents are missing the answer, or the answer sits in the middle of a long prompt, the model falls back on memory. <a href="https://arxiv.org/abs/2307.03172">Liu et al.</a> showed that accuracy drops noticeably when the relevant passage is in the middle of a long context rather than at the start or end.</p><h3>Mitigations that actually help</h3><p>Nothing gets you to zero. What works in practice is layering: give the model the facts, make abstaining a legitimate option, then check the output before a user sees it. Here’s the pipeline I’d build today:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IvCmgSzraJe2M5G0nqb_ug.png" /></figure><p>Each step deals with one of the causes above. Here they are in order of how much they bought me for the effort.</p><h3>1. Ground the model in real sources (RAG, done properly)</h3><p>If pretraining can’t reliably store rare facts, don’t ask the model to recall them. Retrieve them. The original <a href="https://arxiv.org/abs/2005.11401">RAG paper by Lewis et al.</a> showed that pairing a generator with a retrieval index gives “more specific, diverse and factual language” than a model working from memory alone.</p><p>What the diagrams on vendor slides leave out is that <strong>retrieval quality is the ceiling.</strong> If the right chunk isn’t retrieved, the model will still produce an answer, just a made-up one. The details that made the biggest difference for me:</p><ul><li><strong>Measure retrieval separately.</strong> Track recall@k on a labelled set before you look at a single generated answer.</li><li><strong>Put the best evidence at the start or end of the context,</strong> not buried in the middle.</li><li><strong>Say it explicitly:</strong> “Answer only using the sources below. If they don’t contain the answer, say so.”</li><li><strong>Require citations per claim,</strong> so every sentence points back to a chunk you can check.</li></ul><h3>2. Make “I don’t know” a first-class answer</h3><p>This follows straight from the scoring argument. If your prompt, your eval, and your product all treat abstaining as failure, you’ll get bluffing. So:</p><ul><li>Tell the model in the system prompt that abstaining is acceptable, and show an example of it doing so.</li><li>Score your internal evals with a penalty for wrong answers (the λ from earlier), not plain accuracy.</li><li>Design the UI so “I couldn’t find this in our docs, here’s who to ask” is a normal outcome, not an error screen.</li></ul><h3>3. Detect uncertainty by sampling</h3><p>This is my favourite technique because it’s so simple. Ask the same question several times at a non-zero temperature. If the model knows the answer, the samples agree. If it’s guessing, they scatter.</p><p><a href="https://www.nature.com/articles/s41586-024-07421-0">Farquhar et al. (Nature, 2024)</a> formalised this as <strong>semantic entropy.</strong> You sample several answers, cluster them by <em>meaning</em> rather than exact wording (“Paris” and “It’s Paris, France” count as the same answer), and compute entropy over the clusters. High entropy flags a likely confabulation. It costs N times the inference, so I only run it on high-stakes questions.</p><h3>4. Verify after generating, independently</h3><p><a href="https://arxiv.org/abs/2309.11495">Chain-of-Verification (CoVe)</a> from Meta works in four steps: draft an answer, plan verification questions, answer those questions <em>independently</em>, then write a revised final answer.</p><p>The word “independently” is doing the heavy lifting. Remember the snowballing result: once a model has committed to a claim, it tends to defend it. Answering the checks in a fresh context, without the draft visible, breaks that loop. In RAG systems I do a lighter version: a second, cheaper call checks each cited claim against its source chunk and drops the claims that aren’t supported.</p><h3>5. Hand deterministic work to tools</h3><p>Dates, arithmetic, ID lookups, current prices, and user permissions shouldn’t be generated from memory. Give the model a tool and have it call the tool. A function call either returns the right value or fails with an error. It never invents a plausible number.</p><h3>6. Fine-tune for behaviour, not facts</h3><p>Given the Gekhman result, I’ve stopped trying to put knowledge into weights through SFT. Fine-tuning is great for format, tone, and teaching the model <em>when</em> to abstain. Facts belong in retrieval, where you can update them, cite them, and audit them.</p><h3>Mitigations that are overrated</h3><p>Some fixes get recommended a lot and don’t do much.</p><p><strong>“Do not hallucinate” in the system prompt.</strong> The model has no switch to turn off. Explicit <em>permission</em> to abstain helps, as covered above. A bare instruction not to make things up does almost nothing.</p><p><strong>Temperature 0 as a fix.</strong> Greedy decoding makes the output <em>repeatable</em>, not <em>correct</em>. A model that’s confidently wrong at temperature 0.7 is usually confidently wrong at 0 too, just the same way every time. You also lose the variation between samples</p><p><strong>“Just wait for a bigger model.”</strong> Bigger models know more, so they hallucinate less on common facts. But OpenAI’s paper makes a point that stuck with me: some questions can’t be answered, so accuracy will never reach 100%. And knowing your own limits can actually be <em>easier</em> for a small model. Calibration comes from training incentives, not parameter count.</p><p><strong>Asking “Are you sure?” in the same chat.</strong> Because of snowballing, the model tends to double down, or swing the other way and apologise for a correct answer. Verification works when it runs in a fresh context, not as a follow-up turn.</p><p><strong>Treating RAG as done.</strong> Retrieval addresses factuality. It does nothing for faithfulness, where the model has the right document and still paraphrases it wrongly. You need the verification step for that.</p><h3>Checklist</h3><p>If you’re putting an LLM feature in front of users, run through this list. It’s short on purpose.</p><ul><li>Build an eval set of 100 to 200 real questions, including ones your sources <strong>can’t</strong> answer</li><li>Score it three ways (correct, wrong, abstained), with a penalty for wrong answers</li><li>Measure retrieval recall on its own, before measuring generation</li><li>Tell the model it’s allowed to abstain, and give it an example</li><li>Require a citation for every factual claim, and check the citations automatically</li><li>Route dates, math, lookups, and permissions through tools, not generation</li><li>Add a verification pass (CoVe-style or a claim-vs-source check) for high-stakes answers</li><li>Use sampling consistency or semantic entropy where the extra cost is worth it</li><li>Log every abstention and flagged answer, since they show you where your knowledge base has gaps</li><li>Design the “I don’t know” state in the UI as carefully as the answer state</li></ul><h3>References</h3><ol><li>Kalai, Nachum, Vempala &amp; Zhang, <a href="https://arxiv.org/abs/2509.04664">Why Language Models Hallucinate</a> (OpenAI, 2025). Also see OpenAI’s <a href="https://openai.com/index/why-language-models-hallucinate/">summary post</a>, which has the SimpleQA numbers.</li><li>Huang et al., <a href="https://arxiv.org/abs/2311.05232">A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questions</a> (ACM TOIS, 2024)</li><li>Lewis et al., <a href="https://arxiv.org/abs/2005.11401">Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks</a> (NeurIPS 2020)</li><li>Farquhar, Kossen, Kuhn &amp; Gal, <a href="https://www.nature.com/articles/s41586-024-07421-0">Detecting hallucinations in large language models using semantic entropy</a> (Nature, 2024)</li><li>Dhuliawala et al., <a href="https://arxiv.org/abs/2309.11495">Chain-of-Verification Reduces Hallucination in Large Language Models</a> (Meta AI, 2023)</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01f5267375ac" width="1" height="1" alt=""><hr><p><a href="https://tutorialsavvy.com/why-llms-hallucinate-and-what-actually-helps-01f5267375ac">Why LLMs Hallucinate (and What Actually Helps)</a> was originally published in <a href="https://tutorialsavvy.com">Tutorial Savvy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>