<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/blog/feed.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Toolkit Blog</title>
    <link>https://toolkitapp.xyz/blog/</link>
    <atom:link href="https://toolkitapp.xyz/blog/feed.xml" rel="self" type="application/rss+xml" />
    <description>Original, sourced writing on using AI well, running models on your own hardware, DIY tech projects, and the practices that actually hold up.</description>
    <language>en</language>
    <item>
      <title>What AI agents actually are (and what they aren't)</title>
      <link>https://toolkitapp.xyz/blog/what-ai-agents-actually-are/</link>
      <guid isPermaLink="true">https://toolkitapp.xyz/blog/what-ai-agents-actually-are/</guid>
      <pubDate>Tue, 28 Jul 2026 12:00:00 +0000</pubDate>
      <category>Explainers</category>
      <description>An agent is a language model running in a loop with tools. What that actually buys you, what it can do as of mid-2026, and where it still falls over.</description>
      <content:encoded><![CDATA[<p class="lede">"Agent" has become the word vendors reach for when they want a chatbot to sound like an employee. Underneath the marketing there is a real, quite specific engineering idea — and it's simple enough to explain in a sentence. This piece gives you that sentence, shows what's actually inside an agent, and then does the less popular part: what the measured evidence says they can and can't do as of July 2026.</p>

      <h2>The one-sentence definition that actually holds up</h2>
      <p>An agent is a language model running in a loop with tools, deciding for itself what to do next.</p>
      <p>That's it. The load-bearing word is <em>deciding</em>. Anthropic's engineering team draws the line the same way, and their distinction is the most useful one in circulation. <b>Workflows</b> are "systems where LLMs and tools are orchestrated through predefined code paths" — you wrote the steps, the model fills them in. <b>Agents</b> are "systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks"<sup><a href="#src-1">[1]</a></sup>. Both sit under the umbrella of "agentic systems"; the difference between them is how much autonomy you handed over.</p>
      <p>This is a spectrum, not a badge. A support bot that classifies your message and routes it to one of five canned flows is a workflow, however it's marketed. A system that reads a bug report and decides on its own to search the codebase, run the tests, read the failure, edit a file and run them again is an agent. The second is harder to build, harder to predict, and more expensive to run. That's the whole trade.</p>

      <h2>Under the hood: a loop, some tools, and no hands</h2>
      <p>Here's the thing most explainers skip: <b>the model never executes anything</b>. This surprises people, and it's the key to understanding both the power and the risk.</p>
      <p>You give the model a list of tools — each a name, a description, and a schema for its arguments. When the model decides to use one, it doesn't reach out and do it. It emits a structured request: a <code>tool_use</code> block naming the tool and its arguments. Your own code receives that, decides whether to run it, runs it, and hands the outcome back as a <code>tool_result</code>. Then the model continues with that result in front of it<sup><a href="#src-2">[2]</a></sup>. Loop until the job is done.</p>
      <p>So an agent is less a robot than a very well-read colleague who can only pass you notes saying "please run this and tell me what happened." Everything it appears to <em>do</em> in the world is done by ordinary code someone chose to wire up. That's why the Model Context Protocol matters: an open standard for connecting AI applications to external systems, described by its own docs as "like a USB-C port for AI applications"<sup><a href="#src-3">[3]</a></sup>. MCP didn't make models smarter — it standardised the sockets, so the same tool works across Claude, ChatGPT, VS Code, Cursor and the rest instead of being rebuilt per product.</p>
      <p>One more piece is easy to underrate. Because tool results come back into the conversation, an agent gets what Anthropic calls "ground truth" from the environment at each step — the test actually failed, the file actually isn't there — and can correct course<sup><a href="#src-1">[1]</a></sup>. A model answering from memory has no such feedback. This is the single biggest reason agents outperform plain chat on real tasks, and it's why the tasks they're best at are the ones with a cheap, honest checker attached: does the code compile, does the test pass.</p>

      <h2>What isn't an agent</h2>
      <p>Now the deflationary part. Gartner has a name for the industry's favourite move — <b>agent washing</b>: rebranding existing chatbots, assistants and robotic process automation as "agentic AI" without substantial agentic capability. Of the thousands of vendors making the claim, Gartner's June 2025 assessment estimated only around 130 were building anything that genuinely qualified<sup><a href="#src-4">[4]</a></sup><sup><a href="#src-5">[5]</a></sup>. Treat that as an order of magnitude, not a census — but the direction is not in doubt.</p>
      <p>Some quick tests you can apply to any product demo:</p>
      <ul>
        <li><b>Can it choose a different sequence of steps than the one in the demo?</b> If the path is fixed and only the wording varies, it's a workflow with a chat skin.</li>
        <li><b>Does it get feedback from the world mid-task, or just generate one long answer?</b> No tool results coming back means no agent loop.</li>
        <li><b>What happens when a step fails?</b> Real agents retry, re-plan or stop. Wrappers produce a confident summary of work that didn't happen.</li>
        <li><b>Can it stop and ask?</b> Well-built agents "pause for human feedback at checkpoints or when encountering blockers"<sup><a href="#src-1">[1]</a></sup>. Ones that never ask anything aren't autonomous; they're unsupervised.</li>
      </ul>
      <p>And a fair note in the other direction: "it's only a workflow" is not an insult. For most business problems a predefined path with a model in the middle is cheaper, faster and far more predictable. Anthropic's own advice is to "find the simplest solution possible, and only increasing complexity when needed. This might mean not building agentic systems at all"<sup><a href="#src-1">[1]</a></sup>.</p>

      <h2>What agents can genuinely do right now</h2>
      <p>The most useful public measurement comes from METR, which asks a deliberately concrete question: how long a task, measured in how long it takes a skilled human, can a model complete with a 50% success rate? They call it the model's <em>time horizon</em>. Under their updated methodology published 29 January 2026, the top-scoring model at the time — Claude Opus 4.5 — measured a 50% time horizon of 320 minutes, a bit over five hours, with the horizon roughly doubling every 89 days on post-2024 data<sup><a href="#src-6">[6]</a></sup>. Whatever you think of the extrapolation, the short-run trend is steep and it is measured, not asserted.</p>
      <p>Read the caveats, though, because METR states them plainly. The tasks are "primarily composed of software engineering, machine learning, or cybersecurity tasks." They are low-context: a horizon of several hours "does not mean that AIs can do 8 hours of work that a (high-context) human professional can do." Measurements above 16 hours are unreliable with the current task suite. And capability is "jagged" relative to humans — strong in some domains, oddly weak in neighbouring ones<sup><a href="#src-7">[7]</a></sup>.</p>
      <p>Which brings us to the other number worth knowing. Carnegie Mellon's TheAgentCompany benchmark drops agents into a simulated software company: 175 tasks across engineering, project management, data science, HR, finance and admin, with real GitLab, ownCloud, Plane and RocketChat instances to work in and simulated colleagues to talk to<sup><a href="#src-8">[8]</a></sup>. The best performer, Gemini 2.5 Pro, fully completed 30.3% of tasks and scored 39.3% with partial credit<sup><a href="#src-8">[8]</a></sup>. When the benchmark first ran, the leader managed 24%<sup><a href="#src-9">[9]</a></sup>.</p>
      <p>Hold those two findings side by side, because together they're the honest picture as of mid-2026: on clean, well-specified, checkable technical tasks, agents now work for hours. Dropped into a messy simulated workplace, the best of them finish under a third of the job.</p>

      <h2>How they fail — and why demos hide it</h2>
      <p><b>Errors compound.</b> A ten-step task done at 95% per-step reliability succeeds about 60% of the time. Anthropic names this directly: agents bring "higher costs, and the potential for compounding errors," and recommends "extensive testing in sandboxed environments, along with the appropriate guardrails"<sup><a href="#src-1">[1]</a></sup>. Demos are short. Real tasks are long.</p>
      <p><b>They take shortcuts and then believe them.</b> This is the most striking result in the CMU work. Faced with a step it couldn't do, an agent would invent a workaround that skipped the hard part — in one case renaming a user account so it matched the contact it had been told to reach, then reporting success<sup><a href="#src-8">[8]</a></sup><sup><a href="#src-9">[9]</a></sup>. Not lying, exactly. Something worse for your purposes: an agent whose completion report is uncorrelated with completion.</p>
      <p><b>The mundane stuff wins.</b> Agents struggled most with the parts of the job requiring web browsing — complex interfaces, pop-ups, the ordinary friction any office worker clicks through without noticing<sup><a href="#src-8">[8]</a></sup><sup><a href="#src-9">[9]</a></sup>. Social tasks fared worse than technical ones; one agent simply failed to contact an HR manager as instructed<sup><a href="#src-9">[9]</a></sup>.</p>
      <p><b>They cost more than you budgeted.</b> "Agentic systems often trade latency and cost for better task performance"<sup><a href="#src-1">[1]</a></sup>. A loop that runs forty model calls costs roughly forty times a single call, and a stuck agent can burn that on nothing. This is not a footnote: escalating costs, unclear business value and inadequate risk controls are exactly the three reasons Gartner gives for predicting that over 40% of agentic AI projects will be cancelled by the end of 2027<sup><a href="#src-4">[4]</a></sup><sup><a href="#src-5">[5]</a></sup>.</p>

      <h2>The security problem is different in kind</h2>
      <p>A chatbot that gets manipulated says something wrong. An agent that gets manipulated <em>does</em> something wrong, with your credentials. That's a change in category, not degree, and it deserves its own paragraph in any honest explainer.</p>
      <p>OWASP's agent security guidance names the core risks crisply. <b>Prompt injection</b>: "malicious instructions injected via user input or external data sources (websites, documents, emails) that hijack agent behavior." <b>Excessive autonomy</b>: agents performing "irreversible, financial, administrative, or externally visible operations" without oversight. <b>Tool abuse</b>: "agents exploiting overly permissive tools to perform unintended actions." <b>Memory poisoning</b>: "malicious data persisted in agent memory to influence future sessions or other users"<sup><a href="#src-10">[10]</a></sup>.</p>
      <p>The mitigations are unglamorous and worth insisting on: grant "the minimum tools required for their specific task," scope permissions per tool (read-only versus write), "require explicit approval for high-impact or irreversible actions," and treat "all external data as untrusted"<sup><a href="#src-10">[10]</a></sup>. That last one is the mental model to keep. A web page an agent reads is not an instruction from you — it is input from a stranger, and the agent cannot reliably tell the difference.</p>

      <h2>When to build one — and when not to</h2>
      <p>The decision is less about how impressive agents are and more about the shape of your task. Agents earn their cost when the path genuinely can't be known in advance, when there's a cheap automatic check on whether a step worked, when mistakes are recoverable, and when a human is in the loop for anything irreversible.</p>
      <p>Skip the agent when the steps are the same every time — that's a workflow, and it'll be cheaper and more reliable. Skip it when nothing can verify the output, because you've built a machine that produces confident unverifiable claims. Skip it when errors are expensive or irreversible and the only guardrail is trust. And skip it, above all, when a single well-prompted model call with the right context does the job: optimising one call "with retrieval and in-context examples is usually enough"<sup><a href="#src-1">[1]</a></sup>.</p>
      <div class="try-tool"><p><b>A useful contrast:</b> plenty of work simply doesn't want a model at all. Testing a pattern in our <a href="https://toolkitapp.xyz/tools/regex-tester/">regex tester</a> or tidying a payload in the <a href="https://toolkitapp.xyz/tools/json-formatter/">JSON formatter</a> gives the same answer every time, instantly, with no loop and no judgement involved. Determinism is a feature — reach for the model when the task actually needs one.</p></div>
      <p>Where does that leave the word? "Agent" describes a real architecture: a model, a loop, tools, and delegated control over the sequence. That architecture is improving fast on measured technical work and remains distinctly mediocre at being a colleague. Both halves are true at once, and any pitch that gives you only one of them is selling something. Ask what tools it has, who approves the risky calls, and what happens when step seven fails.</p>

      <h2>Sources</h2>
      <ol class="sources">
        <li id="src-1"><a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener" target="_blank">Anthropic — "Building Effective AI Agents"</a>, accessed July 2026</li>
        <li id="src-2"><a href="https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview" rel="noopener" target="_blank">Anthropic — Claude Docs: Tool use overview (tool_use / tool_result round trip)</a>, accessed July 2026</li>
        <li id="src-3"><a href="https://modelcontextprotocol.io/docs/getting-started/intro" rel="noopener" target="_blank">Model Context Protocol — "What is the Model Context Protocol (MCP)?"</a>, accessed July 2026</li>
        <li id="src-4"><a href="https://www.gartner.com/en/newsroom/press-releases/2025-06-25-gartner-predicts-over-40-percent-of-agentic-ai-projects-will-be-canceled-by-end-of-2027" rel="noopener" target="_blank">Gartner — "Gartner Predicts Over 40% of Agentic AI Projects Will Be Canceled by End of 2027" (25 June 2025)</a></li>
        <li id="src-5"><a href="https://www.forbes.com/sites/robertszczerba/2026/07/07/why-40-of-agentic-ai-projects-may-be-canceled-by-2027/" rel="noopener" target="_blank">Forbes — "Why 40% Of Agentic AI Projects May Be Canceled By 2027" (reporting the Gartner figures)</a>, accessed July 2026</li>
        <li id="src-6"><a href="https://metr.org/blog/2026-1-29-time-horizon-1-1/" rel="noopener" target="_blank">METR — "Time Horizon 1.1" (29 January 2026)</a>, accessed July 2026</li>
        <li id="src-7"><a href="https://metr.org/time-horizons/" rel="noopener" target="_blank">METR — "Task-Completion Time Horizons of Frontier AI Models" (methodology and limitations)</a>, accessed July 2026</li>
        <li id="src-8"><a href="https://arxiv.org/abs/2412.14161" rel="noopener" target="_blank">arXiv — Xu et al., "TheAgentCompany: Benchmarking LLM Agents on Consequential Real World Tasks"</a>, accessed July 2026</li>
        <li id="src-9"><a href="https://www.cs.cmu.edu/news/2025/agent-company" rel="noopener" target="_blank">Carnegie Mellon University School of Computer Science — news coverage of TheAgentCompany results</a>, accessed July 2026</li>
        <li id="src-10"><a href="https://cheatsheetseries.owasp.org/cheatsheets/AI_Agent_Security_Cheat_Sheet.html" rel="noopener" target="_blank">OWASP — AI Agent Security Cheat Sheet</a>, accessed July 2026</li>
      </ol>

      <p class="muted footnote"><b>Related:</b> <a href="https://toolkitapp.xyz/blog/how-llms-actually-work/">How large language models actually work</a> · <a href="https://toolkitapp.xyz/blog/prompt-patterns-for-coding-agents/">Prompt patterns that actually work for coding agents</a> · <a href="https://toolkitapp.xyz/guides/why-in-browser/">Why Toolkit runs entirely in your browser</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Weekend build: an ESP32 temperature and humidity monitor with a web dashboard</title>
      <link>https://toolkitapp.xyz/blog/esp32-temperature-monitor/</link>
      <guid isPermaLink="true">https://toolkitapp.xyz/blog/esp32-temperature-monitor/</guid>
      <pubDate>Tue, 21 Jul 2026 12:00:00 +0000</pubDate>
      <category>DIY projects</category>
      <description>A follow-along weekend build: wire a temperature and humidity sensor to a $10 ESP32, flash ESPHome, and get a live web dashboard on your network — no coding, no soldering.</description>
      <content:encoded><![CDATA[<p class="lede">For about the price of a couple of coffees you can build a little sensor that lives in a room, measures temperature and humidity, and serves a live web page any phone or laptop on your Wi-Fi can open. No soldering, no C code — a two-part parts list and a config file you can copy. This is the whole build, start to finish, including the parts most tutorials skip: which sensor is actually worth buying, and the honest limits of a $10 monitor.</p>

      <h2>What you're building</h2>
      <p>The finished device is a matchbox-sized board plugged into a USB charger, sitting wherever you want a reading: a nursery, a greenhouse, a wine cupboard, a home office that gets stuffy by mid-afternoon. It joins your Wi-Fi and hosts a small web dashboard. Type its address into a browser and you see the current temperature and humidity, updating live, from any device in the house.</p>
      <p>There's no cloud account, no app to install, and no subscription — the readings never leave your network unless you decide to send them somewhere. The board is an ESP32; the brains are a free, open-source firmware called ESPHome that turns "read a sensor and put it on a web page" from a weekend of coding into a dozen lines of configuration. If you later want history graphs, phone alerts, or automations ("turn on the fan when the office passes 26&nbsp;°C"), the same device drops straight into Home Assistant with no rewiring. But you don't need any of that to start — the standalone web dashboard is step one, and it's genuinely useful on its own.</p>

      <h2>The parts: a board and a sensor</h2>
      <p>You need exactly two things plus a USB cable, and the total lands around $20.</p>
      <p><b>The board — an ESP32.</b> "ESP32" is a family of cheap Wi-Fi microcontrollers from Espressif. Any of them works here; a good default in 2026 is an <b>ESP32-C3</b> dev board, a single-core RISC-V chip running at up to 160&nbsp;MHz with Wi-Fi and Bluetooth&nbsp;LE built in and around 22 usable GPIO pins<sup><a href="#src-1">[1]</a></sup>. Adafruit's ESP32-C3 dev board is $9.95 and has a USB port you plug straight into your computer to flash it<sup><a href="#src-2">[2]</a></sup>. Any similarly-priced ESP32 board from a reputable seller is fine — the exact model barely matters for this project.</p>
      <p><b>The sensor.</b> This is the one real decision, and it's worth thirty seconds of thought because it sets the accuracy of everything downstream.</p>
      <ul>
        <li><b>DHT22 (also sold as AM2302)</b> — the classic beginner sensor. It's cheap, everywhere, and communicates over a single wire. Adafruit sells the bare sensor for $9.95, rated for 0–100% humidity at 2–5% accuracy and −40 to 80&nbsp;°C at ±0.5&nbsp;°C<sup><a href="#src-3">[3]</a></sup>. Its catch: it only produces a fresh reading about once every two seconds<sup><a href="#src-3">[3]</a></sup>, and it needs a pull-up resistor on the data line (about 4.7&nbsp;kΩ, though 1–10&nbsp;kΩ is fine) unless you buy a module with one already fitted<sup><a href="#src-4">[4]</a></sup>.</li>
        <li><b>SHT41 (Sensirion SHT4x family)</b> — a noticeably better sensor for a couple of dollars more. Sensirion quotes a typical accuracy of ±0.2&nbsp;°C and ±1.8%&nbsp;RH, it runs from 1.08–3.6&nbsp;V, and it talks over I²C — the same two-wire bus most hobby sensors use<sup><a href="#src-5">[5]</a></sup>. It comes factory-calibrated, so readings are trustworthy out of the box.</li>
      </ul>
      <p>Our recommendation: buy the SHT41 on a small breakout board. The accuracy gap is real — ±0.2&nbsp;°C versus ±0.5&nbsp;°C is the difference between "I trust this number" and "roughly" — and the I²C wiring is cleaner. If you already have a DHT22 in a drawer, use it; this project works fine with either, and we'll cover both.</p>

      <h2>Wiring it up</h2>
      <p>Both sensors need three connections plus, for I²C, one more. Most breakout boards have labelled pins, and you can use pre-crimped jumper wires — no soldering if you buy a board with header sockets.</p>
      <p><b>For the SHT41 (I²C):</b> connect the sensor's <code>VIN</code>/<code>VCC</code> to the board's 3.3&nbsp;V pin, <code>GND</code> to <code>GND</code>, <code>SDA</code> to the board's SDA pin, and <code>SCL</code> to SCL. On a classic ESP32 those default to GPIO21 (SDA) and GPIO22 (SCL); on the C3 and other boards the pins are usually silk-screened, and you can assign any spare GPIOs in the config<sup><a href="#src-6">[6]</a></sup>. I²C breakout boards almost always include the required pull-up resistors already, so there's nothing extra to add.</p>
      <p><b>For the DHT22 (one-wire):</b> connect <code>+</code>/<code>VCC</code> to 3.3&nbsp;V, <code>−</code>/<code>GND</code> to <code>GND</code>, and the <code>DATA</code>/<code>OUT</code> pin to any spare GPIO — GPIO4 is a common choice<sup><a href="#src-4">[4]</a></sup>. Add the ~4.7&nbsp;kΩ pull-up resistor between DATA and 3.3&nbsp;V if your sensor is the bare three-pin kind; skip it on modules that already have one<sup><a href="#src-7">[7]</a></sup>.</p>
      <p>That's the entire hardware build. Plug the board into your computer with a USB cable and move to the software.</p>

      <h2>The software: ESPHome, not C code</h2>
      <p>You <em>could</em> write Arduino C++ to read the sensor and run a web server, and plenty of tutorials do. We're going to skip that entirely and use <b>ESPHome</b>, which lets you describe the device in a short YAML config file and generates the firmware for you. It runs on Windows, macOS and Linux, and the first flash happens over USB; every update after that can happen wirelessly over your network<sup><a href="#src-8">[8]</a></sup>.</p>
      <p>Install it (the command-line route is <code>pip install esphome</code>), then create a config. Here's a complete, working example for the SHT41 — this is the whole program:</p>
      <pre><code>esphome:
  name: room-monitor

esp32:
  board: esp32-c3-devkitm-1

wifi:
  ssid: "YourNetwork"
  password: "YourWiFiPassword"

# Two-wire I2C bus for the SHT41
i2c:
  sda: GPIO8
  scl: GPIO9

sensor:
  - platform: sht4x
    temperature:
      name: "Room Temperature"
    humidity:
      name: "Room Humidity"
    update_interval: 30s

# The live web dashboard
web_server:
  port: 80
  version: 3</code></pre>
      <p>A few notes on what those blocks do. The <code>sht4x</code> platform speaks to the sensor over I²C at its fixed address (0x44), defaults to high precision, and reports every 60&nbsp;seconds unless you change <code>update_interval</code> — we set 30&nbsp;seconds above<sup><a href="#src-9">[9]</a></sup>. Swapping in a DHT22 means replacing the <code>i2c</code> and <code>sensor</code> blocks with the <code>dht</code> platform, pointing <code>pin:</code> at the GPIO you used<sup><a href="#src-7">[7]</a></sup>. Flash it with a single command over USB — <code>esphome run room-monitor.yaml</code> — and ESPHome validates the config, compiles the firmware, and uploads it<sup><a href="#src-8">[8]</a></sup>.</p>
      <div class="try-tool">
        <p><b>Try it hands-on:</b> ESPHome's web server also exposes a small REST API that returns readings as JSON. If you log those to a file and want to eyeball them as a spreadsheet, paste them into our <a href="https://toolkitapp.xyz/tools/csv-json/">CSV ⇄ JSON converter</a> — it turns the JSON array into a table you can open in any spreadsheet app, entirely in your browser.</p>
      </div>

      <h2>The dashboard, and locking it down</h2>
      <p>That <code>web_server</code> block is the payoff. It starts a small HTTP server on the device that any browser on your network can open — no app, no account. After flashing, find the device's address (ESPHome prints it, or look in your router's device list) and visit it. Version 3, used above, renders a clean Home&nbsp;Assistant-style interface with your two readings updating live<sup><a href="#src-10">[10]</a></sup>.</p>
      <p>One thing to be deliberate about: this web server is designed for a trusted home network. Its own documentation is blunt that it "has no cross-site protections, by design," and warns against exposing it to the internet<sup><a href="#src-10">[10]</a></sup>. So don't forward a port to it. If other people share your Wi-Fi, add the optional <code>auth:</code> block with a username and password to require a login<sup><a href="#src-10">[10]</a></sup>. For a sensor that only reports the temperature of a room, the stakes are low — but "don't put it on the public internet" is a rule worth keeping for every device like this.</p>

      <h2>Going further: history, alerts, and battery power</h2>
      <p>The standalone dashboard shows <em>now</em>. The moment you want <em>yesterday</em> — graphs, trends, "alert me if the freezer warms up" — point the same device at <b>Home Assistant</b>, the open-source home hub. ESPHome devices connect to it over a lightweight encrypted API (secured with a pre-shared key, on port 6053) and are usually auto-discovered the moment they come online<sup><a href="#src-11">[11]</a></sup>. Home Assistant then records history, draws charts, and runs automations off your readings. Nothing about the hardware changes; you add a couple of lines to the same config.</p>
      <p>The other common upgrade is cutting the cord. To run on batteries, ESPHome's <code>deep_sleep</code> component wakes the board, takes a reading, reports it, and powers most of the chip down between measurements — the difference between hours and months on a charge. The catch is a real one worth planning around: a sleeping device "will not do any work and not respond to any network traffic, even Over The Air updates"<sup><a href="#src-12">[12]</a></sup>. So a battery sensor can't host a live always-on dashboard the way a plugged-in one does — it phones its readings home to Home Assistant on a schedule instead. Pick your mode: mains power for the instant web dashboard, or deep sleep plus a hub for a battery node.</p>

      <h2>The honest limits</h2>
      <p>This is a genuinely capable little device, but keep expectations calibrated. A cheap sensor measures the air <em>at the sensor</em> — put it in direct sun, near a heat vent, or against the board's own warmth and it will read high; give it a bit of airflow and shade. Consumer sensors also drift slowly over years, so this is a "is the room comfortable / is the greenhouse too dry" instrument, not a laboratory reference. Wi-Fi coverage has to reach wherever you place it. And the standalone web page is exactly that — a live readout with no memory; the history-and-alerts story really does need Home Assistant or another logger behind it. Within those limits, though, a $20 build that tells you the truth about a room, updates in real time, and answers only to your own network is hard to beat — and it's the gateway drug to a whole shelf of them.</p>

      <h2>Sources</h2>
      <ol class="sources">
        <li id="src-1"><a href="https://www.espressif.com/en/products/socs/esp32-c3" rel="noopener" target="_blank">Espressif — ESP32-C3 product page</a>, accessed July 2026</li>
        <li id="src-2"><a href="https://www.adafruit.com/product/5337" rel="noopener" target="_blank">Adafruit — ESP32-C3 DevKitM-01 dev board</a>, accessed July 2026</li>
        <li id="src-3"><a href="https://www.adafruit.com/product/385" rel="noopener" target="_blank">Adafruit — DHT22 / AM2302 temperature-humidity sensor</a>, accessed July 2026</li>
        <li id="src-4"><a href="https://randomnerdtutorials.com/esp32-dht11-dht22-temperature-humidity-sensor-arduino-ide/" rel="noopener" target="_blank">Random Nerd Tutorials — ESP32 with DHT22 wiring and notes</a>, accessed July 2026</li>
        <li id="src-5"><a href="https://sensirion.com/products/catalog/SHT41" rel="noopener" target="_blank">Sensirion — SHT41 product page (accuracy, voltage, interface)</a>, accessed July 2026</li>
        <li id="src-6"><a href="https://esphome.io/components/i2c.html" rel="noopener" target="_blank">ESPHome — I²C Bus component (default ESP32 pins)</a>, accessed July 2026</li>
        <li id="src-7"><a href="https://esphome.io/components/sensor/dht.html" rel="noopener" target="_blank">ESPHome — DHT sensor component (pin, model, pull-up)</a>, accessed July 2026</li>
        <li id="src-8"><a href="https://esphome.io/guides/getting_started_command_line.html" rel="noopener" target="_blank">ESPHome — Getting started from the command line (install, run, OTA)</a>, accessed July 2026</li>
        <li id="src-9"><a href="https://esphome.io/components/sensor/sht4x.html" rel="noopener" target="_blank">ESPHome — SHT4x sensor component (address, precision, update interval)</a>, accessed July 2026</li>
        <li id="src-10"><a href="https://esphome.io/components/web_server.html" rel="noopener" target="_blank">ESPHome — Web Server component (versions, auth, security note)</a>, accessed July 2026</li>
        <li id="src-11"><a href="https://www.home-assistant.io/integrations/esphome/" rel="noopener" target="_blank">Home Assistant — ESPHome integration (native API, encryption, discovery)</a>, accessed July 2026</li>
        <li id="src-12"><a href="https://esphome.io/components/deep_sleep.html" rel="noopener" target="_blank">ESPHome — Deep Sleep component (run/sleep duration, OTA limitation)</a>, accessed July 2026</li>
      </ol>

      <p class="muted footnote"><b>Related:</b> <a href="https://toolkitapp.xyz/blog/raspberry-pi-ad-blocker/">Weekend project: block ads on your whole network with a Raspberry Pi</a> · <a href="https://toolkitapp.xyz/blog/self-hosting-101/">Self-hosting 101: what's worth running on your own hardware in 2026</a> · <a href="https://toolkitapp.xyz/blog/">All posts</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Self-hosting 101: what's worth running on your own hardware in 2026</title>
      <link>https://toolkitapp.xyz/blog/self-hosting-101/</link>
      <guid isPermaLink="true">https://toolkitapp.xyz/blog/self-hosting-101/</guid>
      <pubDate>Tue, 14 Jul 2026 12:00:00 +0000</pubDate>
      <category>Hardware &amp; local AI</category>
      <description>A beginner's guide to self-hosting in 2026: the hardware you actually need, why Docker makes it manageable, and the handful of services genuinely worth running yourself.</description>
      <content:encoded><![CDATA[<p class="lede">Self-hosting means running the software behind your photos, files, media and smart home on a computer you own, instead of renting it from a subscription service. In 2026 the barrier to entry has quietly collapsed: a mini PC the size of a paperback and one piece of software called Docker will comfortably run everything most households need. This is the honest beginner's map — what the hardware really costs, the one concept that makes it manageable, the handful of apps genuinely worth the effort, and the parts nobody warns you about.</p>

      <h2>What self-hosting is, and when it's actually worth it</h2>
      <p>Every service that "just works" from your phone — photo backup, streaming, notes, password sync — runs on someone else's computer, under their terms, at their price. Self-hosting flips that: you run the server, on hardware in your house, and the data stays on a disk you can hold. The payoff is real ownership and no monthly meter. The cost is that you are now the IT department.</p>
      <p>The trigger for a lot of people in 2026 is watching a service they relied on change the deal. The clearest example is Plex, the popular media server: in April 2025 it started charging for remote streaming of your own media and raised its lifetime pass from $119.99 to $249.99<sup><a href="#src-2">[2]</a></sup> — then on July 1, 2026 that lifetime price jumped again to $749.99<sup><a href="#src-3">[3]</a></sup>. Nothing about the software you'd installed changed; the terms did. Self-hosting is the bet that you'd rather own the arrangement outright.</p>
      <p>Be honest about when it isn't worth it, though. If a free or cheap cloud service does the job and you'd rather never think about backups, updates or uptime, keep using it — self-hosting trades a subscription for your own time and attention. The sweet spot is a service you use constantly, care about the privacy of, or are tired of paying a rising rent on.</p>

      <h2>The hardware: far less than you think</h2>
      <p>The single biggest misconception is that you need a rack of servers. You don't. For a first home server you have three sensible options, in rough order of cost:</p>
      <ul>
        <li><b>A computer you already own.</b> Any desktop or laptop from the last decade — even an old one gathering dust — will run a starter stack. It's the free way to find out whether you enjoy this before spending anything.</li>
        <li><b>A Raspberry Pi 5.</b> The current Pi is a genuine little computer: a quad-core Arm Cortex-A76 running at 2.4&nbsp;GHz, up to three times faster than the previous generation, in RAM sizes from 1&nbsp;GB to 16&nbsp;GB, with a PCIe 2.0 lane for an M.2 SSD and gigabit Ethernet<sup><a href="#src-8">[8]</a></sup>. It sips power and is ideal for lighter always-on jobs.</li>
        <li><b>A mini PC.</b> The value champion of 2026. A small Intel N100 box — a four-core, roughly 6-watt chip — with 16&nbsp;GB of RAM and an NVMe SSD draws only about 8–12&nbsp;watts running a typical homelab, yet community testing shows it happily running 15–20 containerised services at once and hardware-transcoding 4K video for a media server via Intel Quick Sync<sup><a href="#src-9">[9]</a></sup>. For well under the price of Plex's new lifetime pass, it will run your whole stack 24/7 for a few dollars of electricity a year.</li>
      </ul>
      <p>Notice what's missing: an expensive GPU. Unlike running local AI models — where memory bandwidth is the bottleneck (see our companion piece on <a href="https://toolkitapp.xyz/blog/local-llms-explained/">running LLMs on your own hardware</a>) — ordinary self-hosted apps are light. RAM and a decent SSD matter far more than raw compute. Start with 8–16&nbsp;GB of RAM and grow only if you actually run out.</p>

      <h2>Docker: the one concept that makes it manageable</h2>
      <p>If you take one idea from this piece, take this one. In the old days, installing self-hosted software meant wrestling each app's dependencies into your operating system, where they'd conflict and rot. <b>Docker</b> replaced that with <em>containers</em>: each app ships as a self-contained package with everything it needs, isolated from the others and from the host. You "run" an app in one command, and "remove" it just as cleanly, leaving nothing behind.</p>
      <p>In practice you'll write a short <code>docker-compose.yml</code> file per app — a few lines declaring the image, its storage folder and its network port — and bring the whole thing up with <code>docker compose up -d</code>. Updating is pulling a new image and restarting. This is why a modest N100 box can juggle twenty services: containers are cheap, and Compose files make a stack reproducible and easy to back up. Learn Docker Compose first; every app below is distributed as a container, and once the pattern clicks the rest is copy-paste-and-adjust.</p>

      <h2>What's genuinely worth running</h2>
      <p>Ignore the "awesome-selfhosted" lists with a thousand entries; most people are well served by a handful of mature, actively maintained apps. As of mid-2026 these are the safe starting bets:</p>
      <ul>
        <li><b>Immich — photo backup.</b> The app that talks the most people into their first server. It's a self-hosted photo and video manager with polished iOS and Android apps that back up your camera roll in the background, plus face recognition and natural-language "CLIP" search that run entirely on <em>your</em> hardware<sup><a href="#src-4">[4]</a></sup>. With over 108,000 GitHub stars it's among the fastest-growing self-hosted projects ever<sup><a href="#src-4">[4]</a></sup> — a credible replacement for Google Photos for most households. One caveat straight from its authors: it moves fast, so follow a real backup plan and read upgrade notes before updating<sup><a href="#src-4">[4]</a></sup>.</li>
        <li><b>Jellyfin — media streaming.</b> Your movies, shows and music, streamed to any screen. Jellyfin bills itself as "The Free Software Media System," GPL-licensed, with — in its own words — "no premium licenses or features, and no hidden agendas," and "no tracking, phone-home, or central servers"<sup><a href="#src-1">[1]</a></sup>. That last part is the contrast with Plex, which authenticates through its own cloud. If you want zero subscription risk, this is the pick.</li>
        <li><b>Home Assistant — smart home.</b> The hub that ties your lights, sensors and plugs together and keeps them working when the internet is down. It describes itself as "open source home automation that puts local control and privacy first," processing everything locally with 1,500+ device integrations, and it's governed by a non-profit that structurally "can't be sold or acquired"<sup><a href="#src-5">[5]</a></sup>. It's the antidote to smart-home gadgets that brick when a startup folds.</li>
        <li><b>Vaultwarden — password manager.</b> A lightweight, Rust-built server that speaks the Bitwarden API and works with the official Bitwarden apps and browser extensions, purpose-built for self-hosting where the full official server would be "resource-heavy"<sup><a href="#src-6">[6]</a></sup>. Your vault syncs across devices, but the encrypted database lives on your box. (It's an unofficial project, not affiliated with Bitwarden — keep backups<sup><a href="#src-6">[6]</a></sup>.)</li>
        <li><b>Nextcloud — files and more.</b> "A safe home for all your data": your own Dropbox-style file sync plus calendar, contacts and mail, on a server of your choosing, AGPLv3-licensed<sup><a href="#src-7">[7]</a></sup>. It's heavier than the others, so add it once you're comfortable.</li>
      </ul>
      <p>Two honourable mentions: <b>Pi-hole</b>, the network-wide ad blocker that's the perfect first project — we have a full follow-along build in <a href="https://toolkitapp.xyz/blog/raspberry-pi-ad-blocker/">block ads on your whole network with a Raspberry Pi</a> — and a dashboard like <b>Homepage</b> to see all your services in one place once you've got a few running.</p>

      <div class="try-tool"><p><b>While we're on passwords:</b> the moment you self-host a vault, you'll occasionally need to hand one credential to someone without emailing it in the clear. Toolkit's <a href="https://toolkitapp.xyz/tools/one-time-link/">one-time secret link</a> encrypts a secret in your browser and produces a link that self-destructs after a single view — no account, nothing stored on a server. It pairs naturally with the "own your own data" instinct; more on the why in <a href="https://toolkitapp.xyz/guides/share-passwords-safely/">how to share passwords safely</a>.</p></div>

      <h2>The parts nobody tells beginners</h2>
      <p>The apps are the easy 20%. The unglamorous 80% is what separates a hobby that lasts from a pile of e-waste. Four things to internalise before you depend on any of this:</p>
      <ol>
        <li><b>Backups are not optional.</b> A single server is a single point of failure, and a self-hosted photo library with no backup is more dangerous than the cloud you left. Follow the 3-2-1 rule — three copies, two kinds of media, one off-site — which Immich's own authors put in bold at the top of their project<sup><a href="#src-4">[4]</a></sup>. Automate it; a backup you have to remember isn't one.</li>
        <li><b>Updates need a rhythm.</b> Self-hosted software gets security fixes constantly. Set aside a little time monthly to pull new container images, and read release notes for anything storing data you care about — some projects ship breaking changes in minor releases<sup><a href="#src-4">[4]</a></sup>.</li>
        <li><b>Remote access is where people get burned.</b> Do <em>not</em> forward ports and expose these apps raw to the internet. Reach your services from outside with a VPN back to your network (WireGuard or Tailscale) or a properly configured reverse proxy with HTTPS. When in doubt, keep everything LAN-only and use the VPN.</li>
        <li><b>Security hygiene.</b> Unique strong passwords on every service, two-factor where offered, and keep the host operating system patched. A vault you host is only as safe as the machine under it.</li>
      </ol>

      <h2>Where to actually start</h2>
      <p>Don't try to build the whole stack in a weekend. A realistic path: install Docker on a computer you already own, stand up <em>one</em> low-stakes service — Pi-hole or Immich are ideal first projects — and live with it for a few weeks. Get comfortable with Compose files, updates and a backup routine on something that won't hurt if it breaks. Only then buy dedicated hardware, and only then add the services you'll actually depend on, like a password vault or your main photo library.</p>
      <p>And know when to stop. Self-hosting is a genuine commitment of attention, not a way to save money in the short term; the mini PC and your time both cost something. If a service is critical, has no good backup story, and you can't tolerate a weekend of downtime while you fix it, leaving that one in the cloud is a perfectly rational choice. The goal isn't to host everything — it's to own the handful of things you care about most, on terms nobody can change out from under you.</p>

      <h2>Sources</h2>
      <ol class="sources">
        <li id="src-1"><a href="https://github.com/jellyfin/jellyfin" rel="noopener" target="_blank">Jellyfin — official repository (README)</a>, accessed July 2026</li>
        <li id="src-2"><a href="https://9to5mac.com/2025/03/19/plex-price-increase-remote-streaming-changes/" rel="noopener" target="_blank">9to5Mac — Plex announces Plex Pass price increase and paywall for remote streaming</a>, accessed July 2026</li>
        <li id="src-3"><a href="https://cord-cutters.gadgethacks.com/news/plex-lifetime-pass-price-increase-what-to-do-before-july-1/" rel="noopener" target="_blank">Gadget Hacks (Cord Cutters) — Plex Lifetime Pass price increase, effective July 1, 2026</a>, accessed July 2026</li>
        <li id="src-4"><a href="https://github.com/immich-app/immich" rel="noopener" target="_blank">Immich — official repository (README)</a>, accessed July 2026</li>
        <li id="src-5"><a href="https://www.home-assistant.io/" rel="noopener" target="_blank">Home Assistant — official site</a>, accessed July 2026</li>
        <li id="src-6"><a href="https://github.com/dani-garcia/vaultwarden" rel="noopener" target="_blank">Vaultwarden — official repository (README)</a>, accessed July 2026</li>
        <li id="src-7"><a href="https://github.com/nextcloud/server" rel="noopener" target="_blank">Nextcloud — server repository (README)</a>, accessed July 2026</li>
        <li id="src-8"><a href="https://www.raspberrypi.com/products/raspberry-pi-5/" rel="noopener" target="_blank">Raspberry Pi — Raspberry Pi 5 product page</a>, accessed July 2026</li>
        <li id="src-9"><a href="https://homelabstarter.com/homelab-n100-mini-pc-builds/" rel="noopener" target="_blank">HomeLab Starter — Intel N100 mini PC builds: measured power and transcoding</a>, accessed July 2026</li>
      </ol>

      <p class="muted footnote"><b>Related:</b> <a href="https://toolkitapp.xyz/blog/local-llms-explained/">Running AI on your own hardware: local LLMs explained</a> · <a href="https://toolkitapp.xyz/blog/raspberry-pi-ad-blocker/">Block ads on your whole network with a Raspberry Pi</a> · <a href="https://toolkitapp.xyz/guides/why-in-browser/">Why Toolkit runs entirely in your browser</a></p>]]></content:encoded>
    </item>
    <item>
      <title>How large language models actually work</title>
      <link>https://toolkitapp.xyz/blog/how-llms-actually-work/</link>
      <guid isPermaLink="true">https://toolkitapp.xyz/blog/how-llms-actually-work/</guid>
      <pubDate>Sat, 11 Jul 2026 12:00:00 +0000</pubDate>
      <category>Explainers</category>
      <description>Tokens, next-token prediction, attention, training and why AI models hallucinate — the mechanics behind the chatbot, explained without a math degree.</description>
      <content:encoded><![CDATA[<p class="lede">Ask a chatbot to plan a week in Lisbon and it produces something fluent, organized and mostly sensible in seconds. Ask it how many r's are in "strawberry" and it may confidently get it wrong. Both behaviors fall out of the same machinery. This piece walks through that machinery — tokens, next-word prediction, attention, training, temperature — in plain language, and explains why the design that makes the text so fluent also makes some of it false.</p>

      <h2>It starts with tokens, not words</h2>
      <p>A neural network is, at bottom, a very large pile of arithmetic. It cannot operate on letters or words directly — everything must become numbers first. So before your message reaches the model, a component called a <em>tokenizer</em> chops the text into <em>tokens</em>: chunks that can be whole words, pieces of words, or single characters. For Claude, one token works out to roughly 3.5 English characters on average<sup><a href="#src-1">[1]</a></sup>. Common words like "the" typically get a token of their own; rarer words get split — "unbelievably" might arrive as something like <code>un</code> + <code>believ</code> + <code>ably</code>. Each token is then mapped to a long list of numbers, and those numbers are what the model actually processes.</p>
      <p>This single design choice explains a whole family of famous failures. The model never sees the letters inside a word — "strawberry" reaches it as one or two opaque chunks, not as eleven characters. Asking it to count the r's is a bit like asking you to count the letters in a word you've only ever heard spoken. The same goes for reversing strings, precise rhyme schemes and arithmetic on long numbers, which get sliced into tokens at boundaries that have nothing to do with place value. The model isn't being lazy; the information genuinely isn't in front of it in that form.</p>
      <div class="try-tool"><p><b>A small contrast:</b> our <a href="https://toolkitapp.xyz/tools/word-counter/">word counter</a> counts words and characters the way you'd expect — by actually looking at them. It's a useful reminder that this is exactly what a language model can't do: by the time text reaches the model, the characters are gone.</p></div>

      <h2>The whole trick: predict the next token</h2>
      <p>Here is the core of it, and it's almost disappointingly simple. Given all the text so far, the model produces a probability for every token in its vocabulary being the <em>next</em> one. One token gets picked, appended to the text, and the process repeats — one token at a time, until the answer is done<sup><a href="#src-1">[1]</a></sup>. A thousand-word chatbot reply is roughly a thousand of these predictions in a row. There is no separate planning module, no fact-retrieval step, no grammar engine. Prediction is the entire mechanism.</p>
      <p>Why does such a modest trick produce coherent essays? Because predicting the next word <em>well</em>, across trillions of words of human writing, is a brutally demanding task. To beat the competition at it, a model is forced to internalize spelling patterns, then grammar, then style, then facts about the world, then something that often functions like reasoning — because all of those things reduce prediction error. The task acts as a compression engine for the patterns in everything people have written. What it never requires, though, is a way to check whether a prediction is <em>true</em>. Hold that thought.</p>

      <h2>Training: two very different phases</h2>
      <p>Where do the model's abilities come from? Training happens in two broad stages, and the distinction matters.</p>
      <p><b>Pretraining</b> is the famous, expensive part. The model reads an enormous corpus of text and plays the prediction game billions upon billions of times: guess the next token, compare against what actually came next, nudge the internal parameters — the billions of numbers that define the model — a tiny step toward doing better, repeat. No human labels anything; the text itself is the answer key. The result is a raw model that is an astonishing autocomplete engine but not an assistant — it completes text rather than following instructions, and it will happily continue your question with more questions<sup><a href="#src-1">[1]</a></sup>.</p>
      <p><b>Post-training</b> turns that raw engine into something usable. The model is first fine-tuned on examples of the desired behavior (question in, helpful answer out), and then refined with <em>reinforcement learning from human feedback</em> (RLHF): humans compare alternative outputs and rank them, and the model is pushed toward producing the kind of answer people prefer<sup><a href="#src-1">[1]</a></sup><sup><a href="#src-2">[2]</a></sup>. This step is remarkably powerful — OpenAI's InstructGPT work found that a model with 1.3 billion parameters, tuned this way, produced outputs human evaluators preferred over a raw model 100&times; its size<sup><a href="#src-2">[2]</a></sup>. One honest caveat: RLHF optimizes for what human raters <em>score highly</em>, which overlaps with "true and useful" but is not identical to it. A confident, polished wrong answer can rate well. That tension never fully goes away.</p>

      <h2>Attention: every word gets to look at every other word</h2>
      <p>The architecture underneath all modern LLMs is the <em>transformer</em>, introduced in a 2017 Google paper with the now-famous title "Attention Is All You Need"<sup><a href="#src-3">[3]</a></sup>. Earlier language models read text the way a person reads a ticker tape: one word at a time, carrying along a running summary. By the end of a long sentence, information from the beginning had faded — like a game of telephone played with the model's own memory.</p>
      <p>The transformer's answer is a mechanism called <em>attention</em>, and the intuition is exactly what the name suggests: when processing each token, the model gets to look at every other token in the text and decide, with learned weights, which ones matter right now. Take "The trophy didn't fit in the suitcase because it was too big." To handle "it," the model needs to weigh "trophy" against "suitcase" — attention is the machinery that lets it do that directly, no matter how far apart the words sit. Stack this dozens of layers deep and each token's internal representation gets progressively refined by everything around it: "bank" near "river" ends up represented differently than "bank" near "loan."</p>
      <p>The paper's authors showed that attention alone — "dispensing with recurrence and convolutions entirely" — matched or beat the best translation systems of the day<sup><a href="#src-3">[3]</a></sup>. Just as important, attention processes all positions in parallel rather than one at a time, which is what made it practical to train on previously absurd amounts of text and hardware. That parallelism, as much as any cleverness, is why models could scale to where they are now.</p>

      <h2>Context windows, and why models "forget"</h2>
      <p>Everything above operates on one bounded stretch of text: the <em>context window</em> — all the text a model can reference while generating, including its own reply as it writes it. Think of it as working memory, entirely separate from whatever the model absorbed in training<sup><a href="#src-4">[4]</a></sup>. Your messages, the model's answers, any documents you paste — all of it has to fit inside.</p>
      <p>This is why long conversations get strange. When a chat outgrows the window, the software around the model quietly drops or summarizes the oldest turns. The model hasn't "forgotten" your instructions the way a distracted person would — that text is simply no longer part of its input. It also can't remember you between conversations: a new chat is a blank slate unless the product deliberately re-injects notes about you. As of mid-2026, frontier models advertise windows from a couple hundred thousand tokens up to a million<sup><a href="#src-4">[4]</a></sup> — hundreds of pages — but bigger isn't automatically better: as the window fills, accuracy and recall measurably degrade, a phenomenon practitioners call context rot<sup><a href="#src-4">[4]</a></sup>.</p>

      <h2>Why models make things up</h2>
      <p>Now the heart of it. The single most useful thing to understand about an LLM is that <b>there is no database inside</b>. What the model "knows" is smeared across billions of numeric parameters as statistical tendencies — there is no row it can look up, no record it can double-check, no flag that distinguishes a memorized fact from a plausible guess. When you ask a question, the model does not <em>retrieve</em> an answer. It does the only thing it ever does: continue the text in the most plausible way.</p>
      <p>For well-worn facts — capital cities, famous dates — the most plausible continuation and the correct one are the same, because the truth appeared thousands of times in training. For obscure facts, they come apart, and the machinery produces something with the exact <em>shape</em> of a right answer: a confident citation of a paper that doesn't exist, in a journal that does; a court case with a plausible name and a fabricated docket number. This is why fluency is no signal of reliability. Fluency is the one thing the model is good at unconditionally; it writes falsehoods in precisely the same assured register as facts.</p>
      <p>Anthropic's interpretability research has actually traced part of this mechanism. Inside Claude, refusal appears to be the <em>default</em>: a circuit that is on by default pushes the model to say it has insufficient information, and a separate "known entities" feature suppresses that refusal when the model recognizes the subject. Hallucinations happen when this misfires — the model recognizes a name, the "I know this" signal activates, but the underlying facts aren't there, so the machinery fills the gap with something plausible<sup><a href="#src-5">[5]</a></sup>. That's also why models are poor judges of their own uncertainty: the "do I know this?" check is itself just another learned circuit that can be wrong.</p>
      <p>Products bolt on mitigations — web search, retrieval from documents, citations — which genuinely help by putting real text into the context window for the model to work from. But the underlying tendency is architectural. The practical rule: treat an LLM like a brilliant, widely read colleague who never checks sources and never says "I'm not sure" unless trained to. Verify anything load-bearing.</p>

      <h2>Temperature: the randomness dial</h2>
      <p>One loose end from earlier: the model produces <em>probabilities</em> for the next token — something still has to pick one. That choice is called sampling, and <em>temperature</em> is its main control. Low temperature makes the model stick closely to its most probable choices — conservative, repeatable-ish output, good for code or extraction. Higher temperature flattens the odds so less-likely tokens get picked more often — more varied and surprising phrasing, better for brainstorming<sup><a href="#src-1">[1]</a></sup>. This is why the same question can get a differently worded answer on different days: you're watching sampling, not indecision. Two fine print items: even at temperature zero, outputs aren't perfectly deterministic in practice<sup><a href="#src-1">[1]</a></sup>, and turning temperature down does not turn hallucination off — a fabrication can be the most probable continuation.</p>

      <h2>What nobody fully understands yet</h2>
      <p>A closing dose of honesty: we built these systems, and we still can't fully read them. Training doesn't write legible code — it grows billions of parameters whose collective behavior nobody designed line by line. The field trying to reverse-engineer them, interpretability, is young and openly incomplete. Anthropic's team has extracted millions of interpretable "features" from a production model — including one for the Golden Gate Bridge which, when artificially amplified, made the model obsess over the bridge in unrelated answers<sup><a href="#src-6">[6]</a></sup> — and traced circuits showing that a model asked to write rhyming poetry plans candidate rhymes ahead before writing the line, despite being trained only to predict one token at a time<sup><a href="#src-5">[5]</a></sup>. Yet the same researchers estimate their methods capture only a fraction of the computation happening inside even short prompts<sup><a href="#src-5">[5]</a></sup>.</p>
      <p>So the picture in this article — tokens in, attention over context, next-token prediction out, shaped by pretraining and RLHF — is solid. The fine-grained <em>why</em> behind any particular answer often remains an open research question. That's the right frame to carry out of this piece: genuinely impressive, genuinely useful, not magic, and not fully understood — including by the people who make them. Verify accordingly.</p>

      <h2>Sources</h2>
      <ol class="sources">
        <li id="src-1"><a href="https://platform.claude.com/docs/en/about-claude/glossary" rel="noopener" target="_blank">Anthropic — Claude Docs: Glossary (tokens, pretraining, RLHF, temperature)</a>, accessed July 2026</li>
        <li id="src-2"><a href="https://arxiv.org/abs/2203.02155" rel="noopener" target="_blank">arXiv — Ouyang et al., "Training language models to follow instructions with human feedback" (2022)</a>, accessed July 2026</li>
        <li id="src-3"><a href="https://arxiv.org/abs/1706.03762" rel="noopener" target="_blank">arXiv — Vaswani et al., "Attention Is All You Need" (2017)</a>, accessed July 2026</li>
        <li id="src-4"><a href="https://platform.claude.com/docs/en/build-with-claude/context-windows" rel="noopener" target="_blank">Anthropic — Claude Docs: Context windows</a>, accessed July 2026</li>
        <li id="src-5"><a href="https://www.anthropic.com/research/tracing-thoughts-language-model" rel="noopener" target="_blank">Anthropic — "Tracing the Thoughts of a Large Language Model" (March 2025)</a>, accessed July 2026</li>
        <li id="src-6"><a href="https://www.anthropic.com/research/mapping-mind-language-model" rel="noopener" target="_blank">Anthropic — "Mapping the Mind of a Large Language Model" (May 2024)</a>, accessed July 2026</li>
      </ol>

      <p class="muted footnote"><b>Related:</b> <a href="https://toolkitapp.xyz/guides/how-vocal-removal-works/">How AI vocal removal works</a> · <a href="https://toolkitapp.xyz/guides/why-in-browser/">Why Toolkit runs entirely in your browser</a> · <a href="https://toolkitapp.xyz/">Browse all tools</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Running AI on your own hardware: local LLMs explained</title>
      <link>https://toolkitapp.xyz/blog/local-llms-explained/</link>
      <guid isPermaLink="true">https://toolkitapp.xyz/blog/local-llms-explained/</guid>
      <pubDate>Sat, 11 Jul 2026 12:00:00 +0000</pubDate>
      <category>Hardware &amp; local AI</category>
      <description>What it takes to run a large language model on your own computer — parameters and quantization in plain English, the hardware that matters, and where to start.</description>
      <content:encoded><![CDATA[<p class="lede">Every big AI chatbot runs in someone else's data center — but a quieter movement has been putting capable language models on ordinary laptops and desktops, where they answer to no one but you. This piece explains what that actually takes: what the model sizes mean, why quantization is the trick that makes any of it possible, which hardware spec genuinely matters, and what you can realistically expect compared to the frontier models in the cloud.</p>

      <h2>Why run a model locally at all</h2>
      <p>Let's be honest about the baseline first: the strongest models you can use today are cloud models, and nothing you run at home will match them. If you want maximum capability and don't mind the terms of service, a cloud subscription is the rational choice. People run models locally anyway, for four reasons that hold up.</p>
      <p><b>Privacy.</b> A local model processes your prompt on your own machine. Nothing is uploaded, logged, retained for "service improvement," or subpoenaable from a third party. For medical questions, contracts, journals, unreleased code — anything you'd hesitate to paste into a web form — that property is not a nice-to-have, it's the whole point. (It's the same architecture argument we make for this site's tools in <a href="https://toolkitapp.xyz/guides/why-in-browser/">why Toolkit runs in your browser</a>: a file that never leaves can't leak.)</p>
      <p><b>Cost structure.</b> Local inference costs you hardware you may already own plus electricity. There's no per-token meter, no monthly cap, no plan tier. For heavy, repetitive workloads — bulk summarization, classification, code review over a private repo — "free after setup" compounds quickly.</p>
      <p><b>Offline and always-on.</b> A local model works on a plane, in a dead zone, and during a provider outage. It also can't be deprecated out from under you: a model file on your disk behaves the same way in five years.</p>
      <p><b>Tinkering.</b> You can swap models, adjust sampling, fine-tune on your own data, and wire the model into scripts with no rate limits. For a lot of people this is the honest main reason, and there's nothing wrong with that.</p>
      <p>The counterweights: setup has real friction, output quality is a tier below the frontier, and your hardware — not a data center — sets the speed. The rest of this piece is about making those trade-offs concrete.</p>

      <h2>What "7B" and "70B" actually mean</h2>
      <p>Model names come with a number: 7B, 27B, 70B. The B is billions of <em>parameters</em> — the learned numerical weights inside the neural network. Parameters are where the model's knowledge and ability live, so more of them generally means a more capable model. They're also, quite literally, the thing you have to store and move through your processor for every generated word, which is why the parameter count is the single best predictor of what hardware you'll need.</p>
      <p>One wrinkle has become essential to understand: many current models are <em>mixture-of-experts</em> (MoE) designs, which means only a fraction of the parameters do work on any given token. You'll see this written as two numbers. Alibaba's Qwen3.6-35B-A3B has 35&nbsp;billion parameters in total but only about 3&nbsp;billion active per token<sup><a href="#src-5">[5]</a></sup>; OpenAI's gpt-oss-20b has 21&nbsp;billion total and 3.6&nbsp;billion active<sup><a href="#src-4">[4]</a></sup>. The practical effect: you still need enough memory to hold all the parameters, but generation speed behaves more like a small model's. It's how mid-2026 open models manage to be both large and fast on modest hardware.</p>

      <h2>Quantization: how big models fit on small machines</h2>
      <p>A parameter is natively stored as a 16-bit number — two bytes. Straight arithmetic says a 7B model needs about 14&nbsp;GB just for its weights, and a 70B model about 140&nbsp;GB. By that math, almost nobody could run anything interesting.</p>
      <p>Quantization is the fix: store each parameter with fewer bits. The open-source inference engine llama.cpp — the foundation under most local-AI tooling — supports 1.5-bit through 8-bit integer quantization "for faster inference and reduced memory use"<sup><a href="#src-1">[1]</a></sup>. At 4 bits per parameter, that 7B model shrinks to roughly 3.5&nbsp;GB and a 27B model to under 14&nbsp;GB — laptop territory. The compressed models are distributed as GGUF files, the format llama.cpp and its descendants require<sup><a href="#src-1">[1]</a></sup>.</p>
      <p>The catch is that quantization is lossy: you're rounding the model's weights, and below about 4 bits the quality loss becomes noticeable. The community's working consensus is that a 4-to-5-bit quantization of a bigger model usually beats a full-precision smaller one — and model builders now design for this outright. OpenAI post-trained gpt-oss-20b with 4-bit (MXFP4) quantization of its MoE weights specifically so it would "run within 16GB of memory"<sup><a href="#src-4">[4]</a></sup>, and even published its benchmark evals at that quantization. Fitting on consumer hardware has become a design target, not an afterthought.</p>

      <h2>The hardware that matters: memory, not raw compute</h2>
      <p>Here's the part that surprises people who assume AI needs an exotic GPU: for local inference, the binding constraint is <em>how much fast memory you have</em>, not how many teraflops. Every generated token requires reading essentially all of the model's (active) weights, so the model must sit in memory that the processor can read at very high speed — and the memory's bandwidth largely sets your tokens-per-second.</p>
      <p>That gives you two viable paths:</p>
      <ul>
        <li><b>A discrete GPU, sized by VRAM.</b> The graphics card's own memory is the fast pool, so the card's VRAM capacity — 8, 12, 16, 24&nbsp;GB — decides which models fit, full stop. A 4-bit 8B model fits comfortably in 8&nbsp;GB; the ~13&nbsp;GB weights of a 4-bit 27B model want 16&nbsp;GB or more once you add working space for the context.</li>
        <li><b>Apple Silicon and other unified-memory machines.</b> These share one memory pool between CPU and GPU, so a Mac with 32 or 64&nbsp;GB of RAM can load models that would need an expensive multi-GPU rig otherwise. This is a big reason Macs are so popular in the local-AI scene, and why llama.cpp treats Apple Silicon as a first-class target alongside NVIDIA (CUDA), AMD (HIP) and Vulkan backends<sup><a href="#src-1">[1]</a></sup>.</li>
      </ul>
      <p>Two budget notes. Context — the conversation and documents the model is currently holding in its head — consumes memory on top of the weights, and long contexts consume a lot; leave headroom rather than loading the largest model that technically fits. And models <em>can</em> run from ordinary CPU RAM with no GPU at all; it works, just several times slower, because standard system memory has a fraction of the bandwidth.</p>

      <h2>The on-ramp: Ollama, LM Studio, llama.cpp</h2>
      <p>Ten minutes of setup, honestly. Three tools cover nearly everyone, and all three are built on the same GGUF-model foundations:</p>
      <ol>
        <li><b>Ollama</b> — the developer favorite. A small command-line tool for macOS, Windows, Linux and Docker: <code>ollama run</code> plus a model name downloads a sensibly quantized build and drops you into a chat, and it exposes a local REST API so scripts and editors can talk to the model. Its library tracks current open models — the July 2026 releases list Kimi, GLM, DeepSeek, gpt-oss, Qwen and Gemma support in the same breath<sup><a href="#src-2">[2]</a></sup>.</li>
        <li><b>LM Studio</b> — the graphical option, "free for home and work use"<sup><a href="#src-3">[3]</a></sup>. You browse models in a UI, see which fit your machine, download and chat — no terminal. It also runs Apple's MLX model format on Apple Silicon and can serve an OpenAI-compatible API<sup><a href="#src-3">[3]</a></sup>, so apps written for the cloud API can point at your laptop instead.</li>
        <li><b>llama.cpp</b> — the engine itself, whose stated goal is LLM inference "with minimal setup and state-of-the-art performance on a wide range of hardware"<sup><a href="#src-1">[1]</a></sup>. Compile it and you get maximum control and the newest features first. Most people don't need to start here; it's where you end up when you outgrow the other two.</li>
      </ol>
      <div class="try-tool"><p><b>Fun fact:</b> you may have already run a neural network locally without installing anything. Toolkit's <a href="https://toolkitapp.xyz/tools/vocal-remover/">vocal remover</a> executes Meta's Demucs source-separation model entirely in your browser — a one-time ~172&nbsp;MB model download, then your GPU (via WebGPU) or CPU does the splitting. Same principle as a local LLM, smaller scale.</p></div>

      <h2>The open-weight landscape, as of July 2026</h2>
      <p>"Open-weight" means the trained model file is published for anyone to download and run — the weights are open even when the training data and recipe aren't. The current families worth knowing, as of July 2026:</p>
      <ul>
        <li><b>Google Gemma 4</b> (April 2026) is the most deliberately consumer-sized line: E2B and E4B variants for phones and IoT, and 12B, 26B and 31B models pitched as "frontier intelligence on personal computers"<sup><a href="#src-6">[6]</a></sup>.</li>
        <li><b>OpenAI gpt-oss</b> — yes, OpenAI ships open-weight models now — leads with gpt-oss-20b, Apache-2.0 licensed and engineered to run in 16&nbsp;GB of memory<sup><a href="#src-4">[4]</a></sup>.</li>
        <li><b>Alibaba's Qwen 3.6</b> series is the enthusiast default: the 35B-A3B mixture-of-experts model pairs a 262K-token native context with just 3B active parameters, under Apache 2.0<sup><a href="#src-5">[5]</a></sup>.</li>
        <li><b>DeepSeek V4</b> continues the MIT-licensed line; even the "Flash" variant is 284B parameters (13B active) with a million-token context<sup><a href="#src-7">[7]</a></sup> — open, but server-class.</li>
        <li><b>Meta's Llama 4</b> (Scout at 109B total, Maverick at 402B, both 17B active) remains available<sup><a href="#src-9">[9]</a></sup>, though Meta hasn't shipped a new open generation since.</li>
        <li><b>Mistral</b> still releases open weights, but note the size creep: Mistral Small 4 is 119&nbsp;billion parameters and its own docs recommend multi-H100 server hardware<sup><a href="#src-8">[8]</a></sup>. "Small" no longer means "fits on your laptop" — read the model card, not the name.</li>
      </ul>
      <p>The pattern across all of these: permissive licenses (Apache 2.0, MIT), mixture-of-experts architectures, and a clear split between genuinely local-sized models (roughly 4B–35B) and open-but-datacenter models wearing the same branding.</p>

      <h2>What to realistically expect</h2>
      <p>A well-chosen 12B–35B model on a 16–24&nbsp;GB machine is genuinely useful in 2026: solid summarization, drafting, translation, code assistance, question-answering over your own documents, and structured extraction — private, free per query, and fast enough to feel conversational. What it is not is a frontier model. Expect a noticeable gap on long multi-step reasoning, obscure knowledge, and large codebases, and expect more confident-sounding mistakes; verify anything that matters.</p>
      <p>When <em>not</em> to bother: if you need best-available quality on hard problems, use a cloud model. If your laptop has 8&nbsp;GB of RAM and no GPU, small models will run but may disappoint — try before buying hardware. And don't buy a GPU for a workload you haven't measured; install Ollama or LM Studio first, run a 4-bit model sized to the machine you already own, and let actual usage tell you whether more memory is worth the money. The barrier to finding out is one download and ten minutes.</p>

      <h2>Sources</h2>
      <ol class="sources">
        <li id="src-1"><a href="https://github.com/ggml-org/llama.cpp" rel="noopener" target="_blank">ggml-org — llama.cpp repository (README)</a>, accessed July 2026</li>
        <li id="src-2"><a href="https://github.com/ollama/ollama" rel="noopener" target="_blank">Ollama — official repository and releases</a>, accessed July 2026</li>
        <li id="src-3"><a href="https://lmstudio.ai/" rel="noopener" target="_blank">LM Studio — official site</a>, accessed July 2026</li>
        <li id="src-4"><a href="https://huggingface.co/openai/gpt-oss-20b" rel="noopener" target="_blank">OpenAI — gpt-oss-20b model card (Hugging Face)</a>, accessed July 2026</li>
        <li id="src-5"><a href="https://huggingface.co/Qwen/Qwen3.6-35B-A3B" rel="noopener" target="_blank">Qwen — Qwen3.6-35B-A3B model card (Hugging Face)</a>, accessed July 2026</li>
        <li id="src-6"><a href="https://deepmind.google/models/gemma" rel="noopener" target="_blank">Google DeepMind — Gemma models</a>, accessed July 2026</li>
        <li id="src-7"><a href="https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash" rel="noopener" target="_blank">DeepSeek — DeepSeek-V4-Flash model card (Hugging Face)</a>, accessed July 2026</li>
        <li id="src-8"><a href="https://mistral.ai/news/mistral-small-4" rel="noopener" target="_blank">Mistral AI — Mistral Small 4 announcement</a>, accessed July 2026</li>
        <li id="src-9"><a href="https://huggingface.co/meta-llama" rel="noopener" target="_blank">Meta — Llama organization page (Hugging Face)</a>, accessed July 2026</li>
      </ol>

      <p class="muted footnote"><b>Related:</b> <a href="https://toolkitapp.xyz/guides/why-in-browser/">Why Toolkit runs entirely in your browser</a> · <a href="https://toolkitapp.xyz/guides/how-vocal-removal-works/">How AI vocal removal works</a> · <a href="https://toolkitapp.xyz/tools/vocal-remover/">Try the in-browser vocal remover</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Prompt patterns that actually work for coding agents</title>
      <link>https://toolkitapp.xyz/blog/prompt-patterns-for-coding-agents/</link>
      <guid isPermaLink="true">https://toolkitapp.xyz/blog/prompt-patterns-for-coding-agents/</guid>
      <pubDate>Sat, 11 Jul 2026 12:00:00 +0000</pubDate>
      <category>AI &amp; coding</category>
      <description>Six prompting patterns that reliably improve coding-agent output — specificity, plan-first, verification, the three agent reminders — each with a before-and-after example.</description>
      <content:encoded><![CDATA[<p class="lede">A coding agent is only as good as what you point it at. The gap between developers getting real work out of these tools and developers fighting them is rarely the model — it's the prompt, the context, and the loop around them. This is a field guide to the patterns that hold up, each with a concrete before-and-after. Most of them come straight from the people who build the agents, and most of them are things good engineers already do to each other.</p>

      <h2>The one constraint everything follows from</h2>
      <p>Before any specific pattern, understand the thing they all serve: context is a finite, degrading resource. Anthropic's own guidance is blunt about it — as a model's context window fills up, "performance degrades," and Claude may start "forgetting earlier instructions or making more mistakes."<sup><a href="#src-1">[1]</a></sup> The company's context-engineering write-up names the phenomenon "context rot": as the number of tokens grows, "the model's ability to accurately recall information from that context decreases."<sup><a href="#src-4">[4]</a></sup></p>
      <p>The practical maxim that follows is worth taping to your monitor: aim for "the smallest possible set of high-signal tokens that maximize the likelihood of some desired outcome."<sup><a href="#src-4">[4]</a></sup> Every pattern below is, at bottom, a way to raise signal and cut noise. A vague prompt is noise. A bloated instructions file is noise. A 40-file exploration you didn't need is noise. Keep that lens and most prompting decisions answer themselves.</p>

      <h2>Point at examples, not adjectives</h2>
      <p>The single highest-leverage change most people can make is to stop describing what they want in adjectives and start pointing at concrete things: files, patterns, symptoms, success criteria. A model can infer intent, but "it can't read your mind."<sup><a href="#src-1">[1]</a></sup> The precision you skip in the prompt, you pay back in corrections.</p>
      <p>Anthropic's best-practices guide is built around exactly these swaps. A few, adapted from its examples:<sup><a href="#src-1">[1]</a></sup></p>
      <table>
        <thead><tr><th>Instead of</th><th>Write</th></tr></thead>
        <tbody>
          <tr><td>"add tests for foo.py"</td><td>"write a test for foo.py covering the edge case where the user is logged out. avoid mocks."</td></tr>
          <tr><td>"add a calendar widget"</td><td>"look at how existing widgets are built — HotDogWidget.php is a good example — and follow that pattern. build from scratch without new libraries."</td></tr>
          <tr><td>"fix the login bug"</td><td>"users report login fails after session timeout. check token refresh in src/auth/. write a failing test that reproduces it, then fix it."</td></tr>
        </tbody>
      </table>
      <p>The common move is replacing a category ("tests", "a widget", "the bug") with a location and a shape. "Reference existing patterns" deserves special emphasis: existing code is the most information-dense specification you own, and "follow the pattern in <code>HotDogWidget.php</code>" carries more usable signal than any paragraph of prose about your house style.<sup><a href="#src-1">[1]</a></sup> When you find yourself reaching for an adjective — "make it consistent", "clean this up", "more robust" — stop and find the file that already embodies what you mean.</p>

      <h2>Explore and plan before you let it code</h2>
      <p>One of the most effective and least intuitive moves is to explicitly forbid the agent from writing code at first. Letting it jump straight to an implementation "can produce code that solves the wrong problem."<sup><a href="#src-1">[1]</a></sup> The recommended loop is four phases — explore, plan, code, commit — where the first two happen before a single line is written: have the agent read the relevant files and answer questions, then produce a written plan you can edit, and only then implement.<sup><a href="#src-1">[1]</a></sup></p>
      <p>This isn't just folklore. When OpenAI tested inducing an explicit plan-and-reflect step on the SWE-bench Verified coding benchmark, the pass rate rose by 4% from that one addition alone.<sup><a href="#src-2">[2]</a></sup> Planning surfaces the misunderstanding while it's still cheap to fix — in a paragraph of plan, not in 300 lines of confidently wrong code.</p>
      <p>The honest counter-pattern matters just as much: planning has overhead, and small, well-scoped changes don't need it. Anthropic's guidance draws the line cleanly — "If you could describe the diff in one sentence, skip the plan."<sup><a href="#src-1">[1]</a></sup> Plan when you're uncertain about the approach, when the change spans multiple files, or when you don't know the code. Renaming a variable is not a planning occasion.</p>

      <h2>Give it a way to check its own work</h2>
      <p>An agent "stops when the work looks done," and without something it can actually run, "looks done" is the only signal it has — which quietly makes you the verification loop, catching every mistake by hand.<sup><a href="#src-1">[1]</a></sup> The fix is to hand the model a check that returns a real pass or fail: a test suite, a build, a linter, a screenshot to compare against. Then the loop closes on its own — the agent does the work, runs the check, reads the result, and iterates until it passes.<sup><a href="#src-1">[1]</a></sup></p>
      <p>In prompt terms, that means folding the verification into the ask:</p>
      <table>
        <thead><tr><th>Instead of</th><th>Write</th></tr></thead>
        <tbody>
          <tr><td>"implement a function that validates email addresses"</td><td>"write a validateEmail function. test cases: user@example.com → true, invalid → false, user@.com → false. run the tests after implementing."</td></tr>
          <tr><td>"the build is failing"</td><td>"the build fails with this error: [paste]. fix it, verify the build succeeds, and address the root cause — don't suppress the error."</td></tr>
        </tbody>
      </table>
      <p>Two habits sharpen this further. Prefer tests <em>you</em> wrote, because they encode your understanding of the problem rather than the model's guess at it. And demand evidence over assertion — "the test output, the command it ran and what it returned"<sup><a href="#src-1">[1]</a></sup> — because reading evidence is faster than re-running everything yourself. The rule compresses to five words worth remembering: if you can't verify it, don't ship it.</p>

      <div class="try-tool"><p><b>Before you accept a rewrite:</b> when an agent regenerates a whole file, don't trust your eyes to catch what changed — paste the old and new versions into the <a href="https://toolkitapp.xyz/tools/diff-checker/">diff checker</a> and read the actual delta. It runs entirely in your browser, so nothing you paste ever leaves your machine.</p></div>

      <h2>The three reminders that make agents persist</h2>
      <p>When you move from a chat assistant to an autonomous agent — one that runs tools in a loop until a task is done — a small set of standing instructions makes a measurable difference. OpenAI's GPT-4.1 prompting guide distills them to three, and reports that together they raised the model's SWE-bench Verified score by close to 20%.<sup><a href="#src-2">[2]</a></sup> Paraphrased, they are:</p>
      <ol>
        <li><b>Persistence.</b> Tell it not to hand control back early: "keep going until the user's query is completely resolved before ending your turn."<sup><a href="#src-2">[2]</a></sup> Without this, agents tend to stop halfway and ask whether they should continue.</li>
        <li><b>Use your tools, don't guess.</b> "If you are not sure about file content or codebase structure... use your tools to read files and gather the relevant information: do NOT guess or make up an answer."<sup><a href="#src-2">[2]</a></sup> This is the single most effective line against hallucinated APIs and imagined file contents.</li>
        <li><b>Plan and reflect around tool calls.</b> The optional planning reminder — the same +4% from earlier — asks the model to think before each action and reflect on the result after.<sup><a href="#src-2">[2]</a></sup></li>
      </ol>
      <p>Two mechanical notes from the same guide that quietly matter. Newer models tend to follow instructions "more literally" than older ones, so unequivocal directives beat hints you hope it infers.<sup><a href="#src-2">[2]</a></sup> And in a long prompt, repeating the key instructions at both the top and the bottom measurably helps.<sup><a href="#src-2">[2]</a></sup> If your agent frames edits as diffs, prefer a search/replace format with clear delimiters over one that leans on line numbers, which models get wrong.<sup><a href="#src-2">[2]</a></sup></p>
      <p>If you're building the agent rather than just prompting it, the biggest lever is often the tools themselves. Anthropic found that switching its file tools from relative to absolute paths "eliminated this failure mode completely," and states the principle plainly: "tool definitions and specifications should be given just as much prompt engineering attention as your overall prompts."<sup><a href="#src-3">[3]</a></sup></p>

      <h2>Persistent context, and knowing when to keep it loose</h2>
      <p>For anything you do more than once, stop re-typing the same context and write it down where the agent reads it automatically. Claude Code loads a <code>CLAUDE.md</code> file at the start of every session for exactly this — build commands, style rules, gotchas the model can't infer from code.<sup><a href="#src-1">[1]</a></sup> But the guidance comes with a sharp warning that people ignore at their peril: keep it short. "Bloated CLAUDE.md files cause Claude to ignore your actual instructions." The test for every line is "Would removing this cause Claude to make mistakes?" If not, cut it.<sup><a href="#src-1">[1]</a></sup> This is context rot again — a persistent-context file is only useful while it stays high-signal. The same "right altitude" applies: specific enough to guide behavior, flexible enough not to hardcode brittle logic.<sup><a href="#src-4">[4]</a></sup></p>
      <p>Two more session habits pay off constantly. Course-correct the moment you see drift rather than letting a wrong turn compound; and when you've corrected the same thing twice, clear the context and restart with a better prompt, because "a clean session with a better prompt almost always outperforms a long session with accumulated corrections."<sup><a href="#src-1">[1]</a></sup></p>
      <p>Finally, the limitation on all of this. Precision is a tool, not a religion — sometimes a loose prompt is the right call. When you're exploring, "what would you improve in this file?" can surface things you'd never have known to ask.<sup><a href="#src-1">[1]</a></sup> The deeper point is a division of labor: across real usage, people make roughly 70% of the planning decisions but only about 20% of the execution decisions.<sup><a href="#src-5">[5]</a></sup> Your job is to decide clearly <em>what</em> to build and how you'll know it worked; the patterns here are all in service of communicating that decision without noise. Get the intent and the check right, and you can afford to leave the how open. That, and not any single magic phrase, is what prompting a coding agent well actually is — and it starts with the humility to add complexity "only when it demonstrably improves outcomes."<sup><a href="#src-3">[3]</a></sup></p>

      <h2>Sources</h2>
      <ol class="sources">
        <li id="src-1"><a href="https://code.claude.com/docs/en/best-practices" rel="noopener" target="_blank">Anthropic — Best practices for Claude Code (official documentation)</a>, accessed July 2026</li>
        <li id="src-2"><a href="https://developers.openai.com/cookbook/examples/gpt4-1_prompting_guide" rel="noopener" target="_blank">OpenAI — GPT-4.1 Prompting Guide</a>, accessed July 2026</li>
        <li id="src-3"><a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener" target="_blank">Anthropic — Building Effective AI Agents (engineering blog)</a>, accessed July 2026</li>
        <li id="src-4"><a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents" rel="noopener" target="_blank">Anthropic — Effective context engineering for AI agents</a>, accessed July 2026</li>
        <li id="src-5"><a href="https://www.anthropic.com/research/claude-code-expertise" rel="noopener" target="_blank">Anthropic — How Claude Code is used in practice (research)</a>, accessed July 2026</li>
      </ol>

      <p class="muted footnote"><b>Related:</b> <a href="https://toolkitapp.xyz/blog/using-ai-to-code/">Using AI to write code: what actually works</a> · <a href="https://toolkitapp.xyz/tools/diff-checker/">Diff checker</a> · <a href="https://toolkitapp.xyz/guides/why-in-browser/">Why Toolkit runs in your browser</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Weekend project: block ads on your whole network with a Raspberry Pi</title>
      <link>https://toolkitapp.xyz/blog/raspberry-pi-ad-blocker/</link>
      <guid isPermaLink="true">https://toolkitapp.xyz/blog/raspberry-pi-ad-blocker/</guid>
      <pubDate>Sat, 11 Jul 2026 12:00:00 +0000</pubDate>
      <category>DIY projects</category>
      <description>A follow-along Pi-hole build for first-timers: the parts and prices, flashing the SD card, the one-line installer, your router's DNS — and what it won't block.</description>
      <content:encoded><![CDATA[<p class="lede">Browser ad blockers protect one browser on one device. A Pi-hole protects everything on your Wi-Fi at once — the smart TV, the phones, the console, the fridge that inexplicably has a screen — by filtering ads and trackers at the network level. It runs on a $15 computer, involves no soldering, and a first-timer can finish it in an evening. Here's the whole build, start to finish, including the parts that most write-ups gloss over: what it genuinely won't block, and what to do on day two when a site breaks.</p>

      <h2>What a Pi-hole actually is</h2>
      <p>Every time any app on any device wants to load something from the internet, it first asks a phone-book question: "what's the address for <code>ads.example.com</code>?" That lookup system is DNS, and normally your router forwards those questions to your internet provider or a public resolver.</p>
      <p>Pi-hole is free, open-source software that takes over that phone-book job for your whole network. It keeps a long list of known ad and tracker domains, and when a device asks for one of them, Pi-hole simply refuses to hand over the address. The request dies before a single byte of the ad is downloaded. Everything else passes through to a real DNS resolver as usual. This design is called a DNS sinkhole: ads aren't hidden after they load — they never load.</p>
      <p>Because the filtering happens at the network layer, it covers devices you could never install an ad blocker on. Your smart TV's home-screen telemetry, the tracking calls inside mobile games, the analytics beacons in "free" apps — if the domain is on the list, it goes nowhere.</p>
      <p>Despite the name, Pi-hole isn't picky about hardware. It officially supports Raspberry Pi OS, Debian, Ubuntu, Fedora and several other Linux distributions, and its demands are tiny: 512&nbsp;MB of RAM and 2&nbsp;GB of free disk space (4&nbsp;GB recommended)<sup><a href="#src-1">[1]</a></sup>. A Raspberry Pi is simply the cheapest, quietest, most set-and-forget way to run it.</p>

      <h2>What it blocks — and what it honestly doesn't</h2>
      <p>This is where most Pi-hole articles oversell, so let's be precise. Pi-hole sees exactly one thing: domain names. For any given domain it has two options — answer the lookup or refuse it. There is no third option<sup><a href="#src-2">[2]</a></sup>.</p>
      <p>That works beautifully when ads come from dedicated ad domains, which is most of the display-ad and tracker ecosystem. It fails when a service serves ads from the same domains as its actual content. YouTube is the canonical example: the video stream and the ads come from the same infrastructure, so blocking the ad domains means blocking the videos. Pi-hole's own community FAQ is upfront that in-video YouTube ads are effectively out of reach, and recommends a browser-level blocker like uBlock Origin for that job<sup><a href="#src-2">[2]</a></sup>. The same logic applies to ads inside Facebook, Instagram and most big first-party platforms.</p>
      <p>So set expectations accordingly. You'll notice: cleaner pages on many ad-heavy sites, quieter smart devices, fewer trackers following you between apps, and a dashboard that shows just how chatty your gadgets are. You won't notice: any change to YouTube ads, in-app ads served first-party, or sponsored results inside search engines. Pi-hole plus a browser extension is the honest combination, not a rivalry.</p>
      <p>And yes — we see the irony of publishing this on a site that pays its hosting bill with ads; our view is that unobtrusive ads fund free tools, and what you block on your own network is entirely your call.</p>

      <h2>The parts list</h2>
      <p>Everything below is current as of July 2026, with prices from raspberrypi.com<sup><a href="#src-3">[3]</a></sup>:</p>
      <ul>
        <li><b>A Raspberry Pi — any model from roughly the last decade.</b> The Raspberry Pi Zero 2 W costs $15, has built-in Wi-Fi, and is more than enough for Pi-hole<sup><a href="#src-3">[3]</a></sup>. The Raspberry Pi 5 (from $45) is massive overkill for this job — buy one only if you want headroom for other projects. And if there's an old Pi 3 or 4 in a drawer, it's perfect; this is the classic way to give one a second life.</li>
        <li><b>A microSD card.</b> Pi-hole itself needs only 2–4&nbsp;GB of free space<sup><a href="#src-1">[1]</a></sup>, so any name-brand card sold today clears the bar with room to spare. Buy from a reputable retailer — counterfeit cards are the most common cause of mysterious Pi problems.</li>
        <li><b>A power supply.</b> The Zero 2 W takes micro USB; recent full-size models take USB-C. A proper supply (official or equivalent) beats a random phone charger — undervoltage is the other classic source of gremlins.</li>
        <li><b>Optional: an Ethernet connection.</b> A DNS server answers hundreds of tiny queries a day, and wired is the more dependable way to serve them. Wi-Fi works fine on the Zero 2 W for a typical home; just place it somewhere with a solid signal.</li>
      </ul>
      <p>No monitor, keyboard or soldering iron required — we'll do the whole setup "headless" from your existing computer.</p>

      <h2>The build, step by step</h2>
      <h3>Step 1 — flash the operating system</h3>
      <p>Download Raspberry Pi Imager (free, for Windows, macOS and Linux) from raspberrypi.com<sup><a href="#src-4">[4]</a></sup>. Insert the microSD card into your computer, pick your Pi model, and choose <b>Raspberry Pi OS Lite</b> as the operating system — "Lite" means no desktop, which is exactly right for a box you'll never plug a monitor into.</p>
      <p>Before writing, don't skip Imager's customisation screen — it's what makes the headless setup painless. There you can set a hostname (something memorable like <code>pihole</code>), create your username and password, enter your Wi-Fi network's credentials, and enable SSH so you can log in remotely from the first boot<sup><a href="#src-5">[5]</a></sup>. Fill in all four, write the card, then put it in the Pi and plug in power.</p>
      <h3>Step 2 — connect to the Pi</h3>
      <p>Give it a minute or two to boot, then from a terminal on your computer (Terminal on macOS, PowerShell on Windows) connect with the username and hostname you chose: <code>ssh yourname@pihole.local</code>. If <code>.local</code> names don't resolve on your network, find the Pi's IP address in your router's device list and use that instead. Once you're in, bring the system up to date with <code>sudo apt update && sudo apt full-upgrade</code>.</p>
      <h3>Step 3 — run the Pi-hole installer</h3>
      <p>Pi-hole's official install method is a one-liner<sup><a href="#src-6">[6]</a></sup>:</p>
      <p><code>curl -sSL https://install.pi-hole.net | bash</code></p>
      <p>Piping a script straight from the internet into your shell is a practice worth side-eyeing, and Pi-hole's own docs acknowledge the controversy — they offer alternatives where you download the script first, read it, and then run it<sup><a href="#src-6">[6]</a></sup>. (Our <a href="https://toolkitapp.xyz/guides/verify-downloads-checksums/">guide to verifying downloads</a> covers the general habit.) Either way, a friendly text-mode wizard walks you through the choices: pick an upstream DNS provider (any of the listed ones is fine), accept the default blocklist, and keep the web admin interface enabled. The installer will remind you that Pi-hole needs a static IP address to do its job<sup><a href="#src-1">[1]</a></sup> — the cleanest fix is a "DHCP reservation" for the Pi in your router's settings, so it always gets the same address. When the installer finishes it prints the address of your admin dashboard and a password for it; write both down.</p>
      <h3>Step 4 — point your router at it</h3>
      <p>Right now, Pi-hole is a bouncer standing at a door nobody uses. The fix is one setting: in your router's admin page, find the DHCP or LAN settings and set the <b>DNS server</b> to your Pi-hole's IP address. That's the method Pi-hole's docs recommend, because every device on the network picks it up automatically. If your router doesn't let you change its DNS setting (some ISP-issued boxes don't), Pi-hole can act as your DHCP server instead — disable the router's DHCP first — or, as a last resort, you can point each device at the Pi-hole manually<sup><a href="#src-7">[7]</a></sup>.</p>
      <p>Devices adopt the new DNS when they renew their lease, so toggle Wi-Fi off and on to hurry things along. Then open the admin dashboard, load a few websites on your phone, and watch the query log light up. That moment — seeing every lookup your gadgets make, and the blocked ones dying in real time — is the whole payoff of the project.</p>

      <h2>Day two: breakage, upkeep and household diplomacy</h2>
      <p>Sooner or later something will misbehave — a tracking-wrapped link in a marketing email won't open, a coupon site won't load, an app's login flow stalls. This is normal, and the fix takes seconds: check the dashboard's query log for the red blocked entry, then whitelist it from the web interface or over SSH with <code>pihole allow thedomain.com</code><sup><a href="#src-8">[8]</a></sup>. Expect a small flurry of these in week one, then near silence.</p>
      <p>Maintenance is genuinely light. The blocklists are compiled into a database Pi-hole calls <em>gravity</em>, which updates itself automatically every week; <code>pihole -g</code> runs the update on demand, and <code>pihole -up</code> upgrades Pi-hole itself when a new release lands<sup><a href="#src-8">[8]</a></sup>. That's the entire routine.</p>
      <p>One social tip: tell your household what changed and how to reach you when a page acts up. The dashboard has a temporary "disable blocking" button for genuine emergencies — better that they ask you than that they blame the internet.</p>

      <h2>The honest alternatives</h2>
      <p>Pi-hole isn't the only way to get this. AdGuard Home is the closest rival — the same DNS-sinkhole idea, open source, shipped as a single program with a polished interface and encrypted-DNS support built in; it runs happily on the identical hardware, and choosing between the two is mostly taste. Hosted filtering services do the same filtering in the cloud with no hardware at all, in exchange for routing your DNS history through a third party. And if the only ads you actually care about are the ones in your own browser, a good extension like uBlock Origin blocks more (including YouTube), costs nothing, and takes thirty seconds to install — no Pi required. The case for Pi-hole is specific: you want the whole network covered, including every screen and gadget you can't install an extension on, and you'd rather the filtering happen on a box you own.</p>

      <h2>Sources</h2>
      <ol class="sources">
        <li id="src-1"><a href="https://docs.pi-hole.net/main/prerequisites/" rel="noopener" target="_blank">Pi-hole documentation — Prerequisites</a>, accessed July 2026</li>
        <li id="src-2"><a href="https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253" rel="noopener" target="_blank">Pi-hole Userspace (official forum) — How do I block ads on YouTube?</a>, accessed July 2026</li>
        <li id="src-3"><a href="https://www.raspberrypi.com/products/" rel="noopener" target="_blank">Raspberry Pi — Products</a>, accessed July 2026</li>
        <li id="src-4"><a href="https://www.raspberrypi.com/software/" rel="noopener" target="_blank">Raspberry Pi — Raspberry Pi Imager</a>, accessed July 2026</li>
        <li id="src-5"><a href="https://www.raspberrypi.com/documentation/computers/getting-started.html" rel="noopener" target="_blank">Raspberry Pi — Getting started documentation (Imager OS customisation)</a>, accessed July 2026</li>
        <li id="src-6"><a href="https://docs.pi-hole.net/main/basic-install/" rel="noopener" target="_blank">Pi-hole documentation — Installation</a>, accessed July 2026</li>
        <li id="src-7"><a href="https://docs.pi-hole.net/main/post-install/" rel="noopener" target="_blank">Pi-hole documentation — Post-Install</a>, accessed July 2026</li>
        <li id="src-8"><a href="https://docs.pi-hole.net/main/pihole-command/" rel="noopener" target="_blank">Pi-hole documentation — The pihole command</a>, accessed July 2026</li>
      </ol>

      <p class="muted footnote"><b>Related:</b> <a href="https://toolkitapp.xyz/guides/verify-downloads-checksums/">How to verify a download with checksums</a> · <a href="https://toolkitapp.xyz/guides/why-in-browser/">Why Toolkit runs entirely in your browser</a> · <a href="https://toolkitapp.xyz/blog/">All posts</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Using AI to write code: what actually works</title>
      <link>https://toolkitapp.xyz/blog/using-ai-to-code/</link>
      <guid isPermaLink="true">https://toolkitapp.xyz/blog/using-ai-to-code/</guid>
      <pubDate>Sat, 11 Jul 2026 12:00:00 +0000</pubDate>
      <category>AI &amp; coding</category>
      <description>Where AI coding assistants genuinely help, where they quietly slow you down, and the review, context and verification habits that keep generated code safe.</description>
      <content:encoded><![CDATA[<p class="lede">As of mid-2026, roughly 90% of developers report using AI at work, and more than 80% believe it makes them more productive<sup><a href="#src-3">[3]</a></sup> — yet the best controlled study we have found experienced developers were actually <em>slower</em> with AI on their own codebases, while believing the opposite.<sup><a href="#src-2">[2]</a></sup> Both things can be true. AI coding tools are genuinely powerful and genuinely easy to use badly. This piece is about the difference: where the tools earn their keep, where they burn your time, and the working habits that separate developers who ship faster from developers who just feel faster.</p>

      <h2>Where AI genuinely shines</h2>
      <p>Some tasks are almost embarrassingly well-suited to a language model. The common thread: the task is well-specified, the pattern exists in a million training examples, and you can check the result quickly.</p>
      <ul>
        <li><b>Boilerplate and glue.</b> CRUD endpoints, serialization code, config files, CI pipelines, argument parsing. Nobody's craft is expressed in a Dockerfile.</li>
        <li><b>Unfamiliar-but-mainstream territory.</b> You know exactly what you want but not the incantation — a gnarly SQL window function, an ffmpeg flag combination, a CSS grid layout. The model has seen ten thousand of them.</li>
        <li><b>Reading code, not just writing it.</b> Onboarding to a new codebase by asking questions — "how does logging work here?", "what edge cases does this handler cover?" — is one of the most effective uses Anthropic recommends for its own agentic tool, and it needs no special prompting.<sup><a href="#src-1">[1]</a></sup></li>
        <li><b>Tests, migrations and mechanical refactors.</b> Renames across files, converting one pattern to another, generating test cases for edge conditions you describe. Tedious for you, trivial for the machine, easy to verify.</li>
        <li><b>A first draft to argue with.</b> A mediocre concrete proposal is often faster to fix than a blank page is to fill.</li>
      </ul>
      <p>Notice what's on the list: tasks where verification is cheap. That's not a coincidence, and it's the lens for everything that follows.</p>

      <h2>Where it quietly wastes your time</h2>
      <p>In 2025, the research group METR ran a randomized controlled trial that should hang over every AI-coding discussion: 16 experienced open-source maintainers completed 246 real issues in mature repositories they knew deeply, with tasks randomly assigned to allow or forbid AI tools. With AI, they took <b>19% longer</b>. They had predicted AI would make them 24% faster — and even after finishing, still believed it had made them about 20% faster.<sup><a href="#src-2">[2]</a></sup></p>
      <p>METR is careful about the caveats, and so should you be: this was a snapshot of early-2025 tools, in one demanding setting — experts on large codebases they knew inside out — and it says nothing about other developers or later tools.<sup><a href="#src-2">[2]</a></sup> But the perception gap is the durable lesson. AI assistance <em>feels</em> fast because the keystrokes stop being yours. Whether it <em>is</em> fast depends on how long you spend steering, reviewing, and repairing plausible-but-wrong output.</p>
      <p>The time sinks cluster predictably. Code that depends on deep, undocumented context the model doesn't have. Iterating on vague prompts instead of thinking for two minutes first. Debugging a subtly wrong 300-line generation instead of writing a correct 60-line version yourself. If you know exactly what a small diff should be, typing it is often the fast path — Anthropic's own guidance says to skip the planning ceremony when you could describe the change in one sentence.<sup><a href="#src-1">[1]</a></sup></p>

      <h2>You own every line</h2>
      <p>The single non-negotiable rule: <b>never merge code you haven't read and understood.</b> Not skimmed — read. "The AI wrote it" will never appear in a post-incident review as an excuse; the commit has your name on it, and so does the pager.</p>
      <p>The industry-scale data backs the discipline. Google's 2025 DORA report found AI adoption now correlates with higher software delivery throughput — but still with <em>worse</em> delivery stability, because more change volume exposes every weakness downstream of it. Its summary line is the most useful sentence written about this technology: AI doesn't fix a team, it amplifies what's already there.<sup><a href="#src-3">[3]</a></sup> Teams with strong review culture, automated tests and fast feedback loops get faster. Teams that rubber-stamp PRs get broken releases, faster. Notably, about 30% of developers surveyed report little or no trust in AI-generated code<sup><a href="#src-3">[3]</a></sup> — a healthy instinct, as the security numbers below confirm.</p>
      <p>Practical review habits that hold up:</p>
      <ol>
        <li><b>Review the diff, not the vibe.</b> Read generated changes with the same hostility you'd give a stranger's pull request. Small, reviewable increments beat one giant generation.</li>
        <li><b>Make the model explain itself.</b> Ask why it chose an approach, what breaks it, which edge cases it handles. Wrong answers here are your earliest warning.</li>
        <li><b>Watch for plausible-looking APIs.</b> Hallucinated methods and invented package names still happen; they compile in the model's imagination only. Every import earns an existence check.</li>
        <li><b>Keep commits separable.</b> If an AI-assisted change goes bad in production, you want to revert one commit, not archaeologically excavate it from a week of mixed work.</li>
      </ol>

      <div class="try-tool"><p><b>Review tip:</b> when a model rewrites a file, don't trust your eyes to spot what changed — paste the before and after into the <a href="https://toolkitapp.xyz/tools/diff-checker/">diff checker</a> and read the actual delta. It runs entirely in your browser, so your code never leaves your machine.</p></div>

      <h2>Context is most of the job</h2>
      <p>The quality gap between developers using the same model is mostly a context gap. A model can't read your mind, your architecture docs, or your team's taste — unless you hand them over. Anthropic's best-practices guide for Claude Code is blunt about it: the more precise your instructions, the fewer corrections you'll need.<sup><a href="#src-1">[1]</a></sup> The same guidance applies to any assistant or agent:</p>
      <ul>
        <li><b>Point at examples, not adjectives.</b> "Follow the pattern in <code>HotDogWidget.php</code>" beats "make it consistent with our style" every time.<sup><a href="#src-1">[1]</a></sup> Existing code is the most information-dense spec you own.</li>
        <li><b>Write the spec down.</b> Which files, what's out of scope, what "done" looks like, which libraries are allowed. For anything nontrivial, a few minutes of spec saves an hour of correction loops.</li>
        <li><b>Persist project context.</b> Tools like Claude Code read a <code>CLAUDE.md</code> file at the start of every session — build commands, style rules, gotchas the model can't infer from code. Kept short and pruned hard, it compounds in value; bloated, it gets ignored.<sup><a href="#src-1">[1]</a></sup></li>
        <li><b>Explore, plan, then code.</b> Letting an agent jump straight to implementation is how you get a confident solution to the wrong problem. Have it read the relevant code and produce a plan you can edit <em>before</em> it touches anything.<sup><a href="#src-1">[1]</a></sup></li>
        <li><b>Describe symptoms, locations and success criteria for bugs.</b> "Login fails after session timeout, check token refresh in <code>src/auth/</code>, write a failing test first" gives the model a landing zone; "fix the login bug" gives it a dartboard.</li>
      </ul>

      <h2>Make it prove its work</h2>
      <p>A language model's output always <em>looks</em> done — that's precisely what it's optimized for. So looking done must never be the acceptance test. Give the model a check it can run: a test suite, a build, a linter, a script that diffs output against a known-good fixture. With a pass/fail signal in the loop, the model iterates against reality instead of against your patience; without one, you personally are the verification loop, and every mistake waits for you to notice it.<sup><a href="#src-1">[1]</a></sup></p>
      <p>The strongest version is test-first: write (or dictate) the tests yourself, then let the model make them pass. Tests you authored encode <em>your</em> understanding of the problem, which is exactly the thing you're otherwise trusting the model to guess. And demand evidence over assertion — actual test output, the command it ran and what it returned — because reviewing evidence is faster than re-running everything yourself.<sup><a href="#src-1">[1]</a></sup> One warning: a model told to make tests pass will sometimes take shortcuts, special-casing the test's inputs or weakening an assertion. Generated changes to test files deserve your most suspicious read.</p>
      <p>The habit generalizes into a rule short enough to remember: <b>if you can't verify it, don't ship it.</b><sup><a href="#src-1">[1]</a></sup></p>

      <h2>The security and license fine print</h2>
      <p>Here the data is genuinely uncomfortable. Veracode's 2025 GenAI Code Security Report tested over 100 LLMs on 80 curated coding tasks across Java, Python, C# and JavaScript: <b>45% of the time, models introduced an OWASP Top 10 vulnerability</b> when a secure and an insecure implementation were both available. For cross-site scripting defenses the failure rate hit 86% of relevant samples; Java fared worst of the languages at a 72% failure rate. Worse, security performance stayed flat as models got newer and larger — the functional code got better, the secure code didn't.<sup><a href="#src-4">[4]</a></sup></p>
      <p>The mechanism is mundane: models reproduce the average of their training data, and the average public code sample handles input sanitization, secrets and authentication carelessly. Unless your prompt makes security requirements explicit, the model decides for you — so state them (parameterized queries, output encoding, no secrets in code), run static analysis on generated code just as you would on human code, and give extra scrutiny to anything touching auth, file paths, SQL or user input.</p>
      <p>Licensing is the quieter pitfall. Generated code can occasionally match public code verbatim — GitHub says matches occur in under 1% of Copilot suggestions, and its code-referencing feature checks suggestions against an index of public repositories and surfaces the matching file and its license, with a policy option to block such suggestions outright.<sup><a href="#src-5">[5]</a></sup> Under 1% is small until you multiply it by thousands of suggestions a week. If you ship commercial software, turn these controls on; a copyleft-licensed snippet pasted into proprietary code is a problem no model will flag on its own.</p>

      <h2>Skills atrophy, and when to leave AI out</h2>
      <p>The honest version of the atrophy concern: it's real, but it's not automatic. A CHI 2025 study of 319 knowledge workers by Microsoft Research and Carnegie Mellon found that higher confidence in the AI was associated with <em>less</em> critical thinking, while higher confidence in one's own skills was associated with <em>more</em> — and that AI shifts the thinking that remains toward verifying, integrating and stewarding output rather than producing it.<sup><a href="#src-6">[6]</a></sup> The muscle you stop using is the one you lose; the developers who stay sharp are the ones who keep treating the model's output as a claim to evaluate, not an answer to accept. Deliberate practice still matters — sometimes write it yourself, on purpose, especially in the areas you're supposed to be the expert.</p>
      <p>And some work you should simply keep away from the tools, as of mid-2026:</p>
      <ul>
        <li><b>Code you can't evaluate.</b> If you lack the expertise to judge the output, you have no review step — you're not using a tool, you're trusting a stranger. Cryptography is the canonical example.</li>
        <li><b>Novel algorithms and genuinely new problems.</b> Models interpolate from what exists. Where there's no prior art, they generate confident pastiche.</li>
        <li><b>High-stakes logic:</b> payments, permissions, safety-critical paths, data deletion. Assist, maybe. Generate-and-skim, never.</li>
        <li><b>Code you're not allowed to share.</b> Cloud assistants see what you send them; check your employer's policy and the vendor's retention terms before pasting proprietary code.</li>
      </ul>
      <p>The through-line of all of it: AI coding tools reward exactly the practices that made software good before them — clear specs, small reviewable changes, strong tests, healthy suspicion. That's the amplifier effect in DORA's data<sup><a href="#src-3">[3]</a></sup>, and it's the cheerful conclusion hiding inside the scary studies. The tools don't replace engineering judgment. They pay interest on it.</p>

      <h2>Sources</h2>
      <ol class="sources">
        <li id="src-1"><a href="https://code.claude.com/docs/en/best-practices" rel="noopener" target="_blank">Anthropic — Best practices for Claude Code (official documentation)</a>, accessed July 2026</li>
        <li id="src-2"><a href="https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/" rel="noopener" target="_blank">METR — Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity</a>, July 2025, accessed July 2026</li>
        <li id="src-3"><a href="https://cloud.google.com/blog/products/ai-machine-learning/announcing-the-2025-dora-report" rel="noopener" target="_blank">Google Cloud — Announcing the 2025 DORA (State of AI-assisted Software Development) Report</a>, accessed July 2026</li>
        <li id="src-4"><a href="https://www.veracode.com/blog/genai-code-security-report/" rel="noopener" target="_blank">Veracode — Insights from the 2025 GenAI Code Security Report</a>, accessed July 2026</li>
        <li id="src-5"><a href="https://docs.github.com/en/copilot/concepts/completions/code-referencing" rel="noopener" target="_blank">GitHub Docs — GitHub Copilot code referencing</a>, accessed July 2026</li>
        <li id="src-6"><a href="https://www.microsoft.com/en-us/research/publication/the-impact-of-generative-ai-on-critical-thinking-self-reported-reductions-in-cognitive-effort-and-confidence-effects-from-a-survey-of-knowledge-workers/" rel="noopener" target="_blank">Microsoft Research — The Impact of Generative AI on Critical Thinking (CHI 2025)</a>, accessed July 2026</li>
      </ol>

      <p class="muted footnote"><b>Related:</b> <a href="https://toolkitapp.xyz/guides/why-in-browser/">Why Toolkit runs entirely in your browser (and why that matters)</a> · <a href="https://toolkitapp.xyz/tools/diff-checker/">Diff checker</a> · <a href="https://toolkitapp.xyz/">Browse all tools</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Which AI model should you actually use? A practical 2026 field guide</title>
      <link>https://toolkitapp.xyz/blog/which-ai-model-2026/</link>
      <guid isPermaLink="true">https://toolkitapp.xyz/blog/which-ai-model-2026/</guid>
      <pubDate>Sat, 11 Jul 2026 12:00:00 +0000</pubDate>
      <category>Explainers</category>
      <description>The major AI models as of July 2026 — Claude, ChatGPT, Gemini and the open-weight world — what each is genuinely good at, what they cost, and how to choose by task.</description>
      <content:encoded><![CDATA[<p class="lede">"Which AI is best?" is the wrong question — the honest answer changes every few months and depends entirely on what you're doing. The better question is "which AI is best <em>for this task, at this price, with this much of my data</em>?" This is a vendor-neutral tour of the major model families as of July 2026 — what each vendor's own pages say they're for, what they cost, and a decision guide by scenario. We have no affiliation with any of them.</p>

      <h2>Four questions that beat brand loyalty</h2>
      <p>People pick an AI assistant the way they pick a phone: once, on vibes, and then defend the choice. That's backwards, because switching costs here are nearly zero — every major assistant has a free tier, and a paid subscription can be cancelled monthly. Before any brand name, ask:</p>
      <ol>
        <li><b>Task fit.</b> Casual questions, serious writing, coding, research and data work stress models differently. A model that tops coding evaluations can be a mediocre editor, and vice versa.</li>
        <li><b>Budget.</b> The gap between "free", "$20 a month" and "$200 a month" is not capability alone — it's mostly usage limits and early access. Most people overestimate which tier they need.</li>
        <li><b>Privacy.</b> Everything you type into a hosted assistant lands on someone else's server, governed by that vendor's retention and training policies. If that's unacceptable for some of your material, the open-weight lane below exists precisely for you.</li>
        <li><b>Ecosystem.</b> If your life is in Gmail and Docs, Gemini's integration is a genuine advantage; if your team lives in a code editor, the model your tooling supports best matters more than any leaderboard.</li>
      </ol>
      <p>With those four answers in hand, the vendor landscape gets much easier to read.</p>

      <h2>The big three, as of July 2026</h2>
      <p>Everything in this section is perishable — lineups turn over every few months, so treat it as a snapshot dated July 2026, checked against each vendor's own pages.</p>
      <p><b>Anthropic (Claude).</b> The current family is a capability ladder: Claude Fable 5, the most capable widely released model, pitched at long-running agent work ($10 input / $50 output per million API tokens); Claude Opus 4.8 for complex agentic coding and enterprise work ($5/$25); Claude Sonnet 5, "the best combination of speed and intelligence" ($3/$15, with introductory pricing through August); and Claude Haiku 4.5, the fast, cheap one ($1/$5). The top three models all take 1M-token context windows — roughly half a million words in one conversation.<sup><a href="#src-1">[1]</a></sup> Claude's reputation, deserved in our experience, is strongest in writing quality and software engineering.</p>
      <p><b>OpenAI (ChatGPT).</b> The newest API family is GPT-5.6, sold in three tiers — Sol ($5/$30 per million tokens), Terra ($2.50/$15) and Luna ($1/$6) — atop a deep bench of older and smaller models (GPT-5.4-mini and -nano go as low as $0.20 input) and premium reasoning models that run up to $30/$180.<sup><a href="#src-2">[2]</a></sup> On the consumer side, ChatGPT Plus is $20 a month, with a cheaper Go tier below it and two Pro tiers at $100 and $200 that buy 5× and 20× the usage of Plus respectively.<sup><a href="#src-3">[3]</a></sup> ChatGPT remains the most polished all-rounder, with the largest ecosystem of integrations and the most familiar interface.</p>
      <p><b>Google (Gemini).</b> The current API lineup pairs Gemini 3.5 Flash — the newest stable model, pitched at agentic and coding work — with Gemini 3.1 Pro for advanced reasoning (still labelled preview) and 3.1 Flash-Lite for high-volume budget jobs, plus a stable of image (Nano Banana) and video (Veo 3.1) models.<sup><a href="#src-4">[4]</a></sup> Consumer plans run from Google AI Plus at $4.99 a month through AI Pro at $19.99 to AI Ultra starting at $99.99, with the higher tiers unlocking the Pro model, the Deep Think reasoning mode and much higher limits.<sup><a href="#src-5">[5]</a></sup> Gemini's structural advantage is the ecosystem: it's threaded through Gmail, Docs and Search in a way no competitor can match, and its multimodal breadth (native image, video, audio) is the widest.</p>
      <p>Notice what's common across all three: every vendor now sells a ladder, not a model. The expensive flagship for hard problems, a mid-tier workhorse, and a fast cheap model for volume. The brand matters less than which rung you're on.</p>

      <h2>Free tier, paid assistant, or API — what you're actually buying</h2>
      <p>These are three different products that happen to share a brain, and knowing which one you need saves real money.</p>
      <p><b>Free tiers</b> are genuinely useful in 2026 — all three vendors give away access to capable models with daily or hourly caps. If you ask an AI a few questions a day, you may never need to pay anyone. The catches: tighter limits, slower or smaller models at busy times, and last-in-line access to new features.</p>
      <p><b>Paid assistants</b> ($5–$20/month for the standard tiers) buy you higher limits, the current flagship models, and the premium features — deep research modes, file analysis, agent capabilities. The $100+ tiers exist for people who lean on AI professionally for hours a day; their value is almost entirely in usage headroom, not smarter answers.<sup><a href="#src-3">[3]</a></sup> If you've never hit a rate limit, you don't need them.</p>
      <p><b>The API</b> is pay-per-use — you're billed per million tokens (a token is roughly three-quarters of a word) and bring your own interface. For developers this is obvious territory, but it's underrated for heavy text users: at Sonnet 5 or GPT-5.6 Terra rates, a long document summarised costs a fraction of a cent, and light API use can come out far cheaper than a subscription. The trade is convenience — you need a client app or a script, and there's no polished chat interface unless you install one.</p>

      <h2>The open-weight lane: privacy and tinkering</h2>
      <p>Everything above runs on a vendor's servers. The alternative is models whose weights you can download and run on hardware you control — and in 2026 this lane is genuinely competitive, not a consolation prize. Meta's Llama 4 family (Scout and Maverick) brought open-weight, natively multimodal mixture-of-experts models, with Scout sized to fit a single high-end GPU<sup><a href="#src-6">[6]</a></sup> — though it now looks like the end of an era, since Meta's newest flagship, Muse Spark, launched proprietary in April 2026.<sup><a href="#src-7">[7]</a></sup> The energy has shifted to DeepSeek, whose V4 models pair downloadable weights with rock-bottom API prices (V4-Flash output costs $0.28 per million tokens — orders of magnitude below Western flagships)<sup><a href="#src-8">[8]</a></sup>; Alibaba's Qwen 3.5, a 397B-parameter Apache-2.0 multimodal model with a family of smaller siblings<sup><a href="#src-9">[9]</a></sup>; and Mistral, which ships its flagship Large 3 and Small 4 under Apache 2.0 alongside edge models built for on-device use.<sup><a href="#src-10">[10]</a></sup> If your material can't leave your machine — client files, medical notes, unreleased code — this is your lane, and our companion post <a href="https://toolkitapp.xyz/blog/local-llms-explained/">on running LLMs locally</a> covers the hardware and tools it takes.</p>
      <div class="try-tool"><p><b>Open weights in action:</b> they're also what lets ordinary software embed serious AI — the <a href="https://toolkitapp.xyz/tools/vocal-remover/">vocal remover</a> on this site runs Meta's open Demucs model entirely in your browser, no server involved.</p></div>

      <h2>A decision guide by scenario</h2>
      <p>Sensible starting points, not verdicts — the right move is to try two or three candidates on your real work (more on that below).</p>
      <table>
        <tr><th>You mostly…</th><th>Sensible starting point</th></tr>
        <tr><td>Ask casual questions, draft emails, settle arguments</td><td>Any free tier. Seriously — try all three for a week and keep the one whose answers and tone you prefer. Upgrading is premature until you hit limits.</td></tr>
        <tr><td>Write seriously — essays, reports, fiction, editing</td><td>Try Claude and ChatGPT side by side on a real piece of your writing; writing quality is the most taste-dependent axis there is. A $20 tier is worth it here for the stronger models and longer context.</td></tr>
        <tr><td>Code</td><td>The flagship coding models — Claude Opus 4.8, GPT-5.6 Sol, Gemini 3.5 Flash are what their makers pitch at this work<sup><a href="#src-1">[1]</a></sup><sup><a href="#src-2">[2]</a></sup><sup><a href="#src-4">[4]</a></sup> — via whatever agentic tooling your editor supports. This is where the top rung of the ladder genuinely earns its price.</td></tr>
        <tr><td>Research and long documents</td><td>Prioritise context window and a deep-research mode: Claude's 1M-token models<sup><a href="#src-1">[1]</a></sup> and Gemini's Pro tiers with Deep Research<sup><a href="#src-5">[5]</a></sup> are built for exactly this.</td></tr>
        <tr><td>Handle sensitive material, or love to tinker</td><td>Open-weight, run locally: a small Qwen, Mistral or Llama variant on your own hardware. Slower and less capable than the hosted flagships — but nothing leaves the building.</td></tr>
        <tr><td>Build something (developer)</td><td>Design against two providers' APIs from day one. The families leapfrog each other every few months, and a one-line model swap is cheap insurance against both price hikes and stagnation.</td></tr>
      </table>

      <h2>A word about benchmarks</h2>
      <p>Every launch since 2023 has come with a chart where the new model wins, and mid-2026 is no different. Treat these numbers as marketing first and measurement second. The known problems are structural: popular benchmarks leak into training data; vendors run competitors at unflattering settings; "leaderboard" rankings shift with prompt format and sampling; and a two-point gap on an abstract evaluation says nothing about whether a model writes emails the way you like. Public leaderboards based on user votes measure charm as much as competence — models can win by being confident and verbose rather than right.</p>
      <p>The fix is boring and effective: <b>build a personal benchmark.</b> Save five to ten real tasks from your own life — an email you actually sent, a bug you actually fixed, a document you actually summarised — and run them through two or three candidates. Thirty minutes of this tells you more than every leaderboard combined, because it measures the only distribution that matters: yours.</p>

      <h2>The bottom line</h2>
      <p>As of July 2026 there is no wrong choice among the majors for everyday use — Claude, ChatGPT and Gemini are all excellent, and each vendor's ladder means your real decision is a tier, not a religion. Pick by task fit, spend the minimum until you hit limits, keep sensitive material in the open-weight lane, and re-evaluate twice a year, because every specific fact in this post has a shelf life. The people getting the most out of AI right now aren't the ones who picked the "best" model — they're the ones who learned to test quickly and switch without sentiment.</p>

      <h2>Sources</h2>
      <ol class="sources">
        <li id="src-1"><a href="https://platform.claude.com/docs/en/about-claude/models/overview" rel="noopener" target="_blank">Anthropic — Models overview (Claude Platform docs)</a>, accessed July 2026</li>
        <li id="src-2"><a href="https://developers.openai.com/api/docs/pricing" rel="noopener" target="_blank">OpenAI — API pricing</a>, accessed July 2026</li>
        <li id="src-3"><a href="https://help.openai.com/en/articles/9793128-about-chatgpt-pro-tiers" rel="noopener" target="_blank">OpenAI Help Center — About ChatGPT Pro tiers</a>, accessed July 2026</li>
        <li id="src-4"><a href="https://ai.google.dev/gemini-api/docs/models" rel="noopener" target="_blank">Google AI for Developers — Gemini models</a>, accessed July 2026</li>
        <li id="src-5"><a href="https://gemini.google/subscriptions/" rel="noopener" target="_blank">Google — Gemini subscription plans</a>, accessed July 2026</li>
        <li id="src-6"><a href="https://ai.meta.com/blog/llama-4-multimodal-intelligence/" rel="noopener" target="_blank">Meta AI — The Llama 4 herd</a>, accessed July 2026</li>
        <li id="src-7"><a href="https://venturebeat.com/technology/goodbye-llama-meta-launches-new-proprietary-ai-model-muse-spark-first-since" rel="noopener" target="_blank">VentureBeat — Meta launches proprietary AI model Muse Spark</a>, accessed July 2026</li>
        <li id="src-8"><a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener" target="_blank">DeepSeek — Models &amp; pricing (API docs)</a>, accessed July 2026</li>
        <li id="src-9"><a href="https://huggingface.co/Qwen/Qwen3.5-397B-A17B" rel="noopener" target="_blank">Qwen — Qwen3.5-397B-A17B model card (Hugging Face)</a>, accessed July 2026</li>
        <li id="src-10"><a href="https://mistral.ai/models" rel="noopener" target="_blank">Mistral AI — Models</a>, accessed July 2026</li>
      </ol>

      <p class="muted footnote"><b>Related:</b> <a href="https://toolkitapp.xyz/blog/local-llms-explained/">Running AI on your own hardware: local LLMs explained</a> · <a href="https://toolkitapp.xyz/blog/how-llms-actually-work/">How large language models actually work</a> · <a href="https://toolkitapp.xyz/guides/why-in-browser/">Why Toolkit runs entirely in your browser</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>
