From the Lab Page 17 / 46

Insights, engineered.

Technical deep-dives, AI strategy, and engineering perspectives from the team building autonomous systems.

Aug 10, 2026 AI Infrastructure

Running a Local Guardrail Model on an M5 Max: Safety Classifier Latency in the Request Path (2026)

Most guardrail writing argues about which classifier catches the most jailbreaks. That is the second question. The first question, for anyone putting a safety model in front of a live assistant, is where its latency lands, because a guardrail is not a background job. It runs synchronously on the request path, once to screen the user input before your main model sees it, and often again to screen the generated output before it reaches the user. That is potentially two extra model passes wrapped around every single turn, and on a local deployment you are paying for all of them on the same machine that runs the assistant. A guardrail model like a Llama Guard style classifier is small compared to the model it protects, but small is not free, and the way you place it in the pipeline moves the cost far more than the model choice does. Screen the input and you add a fixed prefill dominated pass. Screen the output and you either wait for the full generation before checking it, which serializes two models back to back, or you stream and check in chunks, which trades latency for a weaker guarantee. This post measures the guardrail in isolation on an M5 Max: what an input check costs, what an output check adds, and the cases where a second pass is protecting nothing the first pass missed.

Aug 9, 2026 AI Models

GPT-5.6 Sol vs Grok 4.5: Aider Polyglot Multi Language Code Editing Tested (August 2026)

A model can write a clean function from scratch and still fail as a coding agent, because agentic coding is not writing code, it is editing code that already exists and returning the change in a format a tool can apply without a human in the loop. Aider Polyglot measures exactly that. It draws its problems from Exercism exercises across C++, Go, Java, JavaScript, Python, and Rust, hands the model an existing file, and asks for a targeted edit that has to both pass the hidden test suite and arrive as a valid diff the harness can apply cleanly. That second requirement is the one that separates benchmark leaders from also rans, because a model that solves the problem correctly but botches the diff format wastes a full round trip and, in a real agent, an expensive retry. We ran GPT-5.6 Sol and Grok 4.5 across the full Polyglot set with one attempt per problem and a fixed harness, and the headline pass rates are closer than the pricing gap between them. The story, as usual, is in where each model loses its points: which languages, and whether the loss is wrong logic or a malformed edit.

Aug 9, 2026 AI Infrastructure

Running a Local Reranker on an M5 Max: Cross Encoder Latency for RAG and Search (2026)

Most writing about reranking argues about which model scores best on a relevance leaderboard. That is the wrong first question for anyone putting a reranker in a live pipeline. A reranker is a cross encoder, which means it does not embed a query and a document separately and compare vectors; it feeds the query and each candidate through a full model pass together, one pass per candidate, and returns a relevance score. That design is exactly why it is more accurate than pure vector search, and it is also exactly why its cost lands in your request path in a way an embedding index never does. Vector retrieval is a precomputed lookup. Reranking is fresh compute on every query, scaling with how many candidates you ask it to score. On an M5 Max the question is not whether a local reranker is accurate enough, because the good open models are; the question is how many candidates you can afford to rerank before the added latency eats the relevance gain, and whether the second stage earns its place at all. This post measures the reranker in isolation: the latency it adds on Apple Silicon, how candidate count and batching move that number, and the cases where the honest answer is to skip it.

Aug 9, 2026 Headless Commerce

Recharge vs Skio vs Ordergroove: Subscription Billing for Headless Commerce (2026)

Adding a subscribe option to a hosted storefront is an app install and an afternoon. Adding it to a headless storefront is a billing project, because a subscription is not a one time payment with a checkbox; it is a recurring engine that has to charge a saved payment method on a schedule for months, handle the cards that decline on renewal, let a customer pause or swap or skip from a portal you now render yourself, and keep all of that reconciled against your order and accounting systems. The widget that shows a shopper their delivery frequency is the easy ten percent. The other ninety percent is the recurring charge lifecycle, the dunning and retry logic when a renewal fails, and the webhook stream that tells your backend a charge succeeded, a subscription churned, or a payment method expired. Recharge, Skio, and Ordergroove all solve the same merchant facing job, recurring revenue, but they expose that job through very different architectures, and the one that suits a hosted Shopify theme is not automatically the one that suits a custom headless build. This post compares them where a headless integration actually feels the difference and lays out the billing lifecycle you have to own regardless of which you pick.

Aug 8, 2026 Headless Commerce

DataDome vs Cloudflare Bot Management vs hCaptcha Enterprise: Bot Protection for Headless Storefronts (2026)

A monolithic storefront hides its logic behind server rendered pages, so most bot abuse arrives as form posts a platform can inspect and throttle in one place. Going headless takes that shelter away. Your catalog, cart, and checkout are now API endpoints that a custom frontend calls directly, which is exactly what makes headless fast and flexible, and it is also precisely the surface a bot wants: no page to render, no human ceremony to fake, just a clean JSON endpoint to hammer. The abuse follows the architecture. Scalpers hoard limited inventory by holding carts open, credential stuffers replay logins against your auth endpoint, scrapers lift pricing and catalog data straight from the Storefront API, and gift card crackers brute force codes against the redemption route. None of that touches a rendered page, so protections that assume one do not see it. Bot management for a headless stack is therefore a different problem than it is for a templated store, and the three tools most teams evaluate, DataDome, Cloudflare Bot Management, and hCaptcha Enterprise, solve it in genuinely different ways, from where the detection actually runs to whether it can observe a frontend you built yourself. This is how they compare on the dimensions that decide the outcome, with the API surface and the checkout as the concrete cases, because that is where headless bot protection is won or lost.

Aug 8, 2026 AI Models

GPT-5.6 Sol vs Gemini 3.5 Pro: BrowseComp Agentic Web Research Tested (August 2026)

Reasoning benchmarks measure whether a model can think. BrowseComp measures whether a model can find, and those are not the same skill. OpenAI built the benchmark by inverting the usual question design: start from a verifiable fact discovered through deep human browsing, then write a question whose answer is easy to check but genuinely hard to locate, and confirm the answer does not appear in the top search results so the model cannot shortcut to it. The result is 1,266 questions that punish shallow retrieval and reward persistence, because the answer is buried several hops deep across multiple sources and the only way to it is to search, read, reformulate, and search again. The gap this exposes is stark. A model with a browsing tool but no real agentic loop scores in the low single digits, while a genuine agentic system reaches into the fifties, sixties, and beyond, which tells you the benchmark is measuring the loop and the judgment inside it, not the raw model. We ran GPT-5.6 Sol against Gemini 3.5 Pro on the set, both wired into the same browsing harness so the comparison is the model and not the plumbing, and separated the two behaviors that actually decide the score: how relentlessly each one searches when the answer is not on the first page, and how well each one knows the difference between an answer it has verified and a guess it should not make.

Aug 8, 2026 AI Engineering

Offline Batch Inference on an M5 Max: Maximizing Overnight Throughput for a Prompt Backlog (2026)

Most writing about local inference assumes a human is on the other end, watching tokens appear and judging the model by how fast the first one lands. Batch work is the opposite situation, and it is more common than the interactive framing suggests: you have a backlog of tens or hundreds of thousands of prompts, nobody is waiting on any single one, and the only thing that matters is how much of the pile you can clear before morning. Product descriptions for a catalog, classification over a support archive, embeddings and summaries for a corpus, synthetic data for a fine tune. In that regime latency is irrelevant and throughput is everything, and the settings that make a local server feel responsive to a person actively work against you, because they optimize for the wrong number. Running one prompt at a time on an M5 Max leaves most of the machine idle, since a single decode stream cannot saturate the memory bandwidth the chip has to offer. The job is to keep many sequences in flight so the expensive weight reads are amortized across all of them, and to arrange the backlog so the GPU never waits on padding, scheduling, or a slow tail. This post is about doing that deliberately: what actually bounds batch throughput on Apple Silicon, how far batching takes you before memory stops you, and the operational scaffolding that turns a fragile overnight run into one you can resume when it dies at 3am.

Aug 7, 2026 AI Models

Claude Opus 5 vs Gemini 3.5 Pro: DS-1000 Data Science Coding Tested (August 2026)

Most coding benchmarks reward algorithmic cleverness a working data scientist rarely needs. DS-1000 does the opposite. It draws its 1000 problems from real questions about pandas, numpy, scipy, scikit learn, matplotlib, tensorflow, and pytorch, wraps each in an execution test, and perturbs the wording so a model cannot pattern match a memorized answer off the source thread. That makes it a sharper read on data workflow usefulness than a leaderboard built on puzzle solving. We ran Claude Opus 5 and Gemini 3.5 Pro across the DS-1000 categories with one attempt per problem and a fixed harness, and the overall averages sit close enough to be a wash. The story is in the per library split, because the two models are not strong in the same places, and a data team that lives in pandas has a different right answer than one that lives in pytorch.

Aug 7, 2026 AI Engineering

Semantic Response Caching for a Local LLM Gateway on Apple Silicon: Cutting Redundant Inference on an M5 Max (2026)

Prompt caching skips the prefill on a repeated prefix, but it does nothing for two users who ask the same thing in different words. On a single Apple Silicon box, where every generation competes for the same unified memory, the cheapest token is the one you never generate. Semantic response caching sits in front of the model, embeds the incoming prompt, and if a past prompt was close enough in meaning it returns the stored answer without touching the GPU. The hard part is not the cache. It is deciding when two questions are actually the same question, because a threshold set too loose will confidently serve the wrong answer. This post builds the gateway, measures the hit rate on a real support workload, and sets the similarity threshold where a wrong answer costs more than a cache miss.

Aug 7, 2026 Commerce

Tapcart vs Vajro vs Shopney: Native Mobile App Builders for Shopify Plus (2026)

A native mobile app is not a second website. It is a separate headless storefront that reads the same Shopify catalog and cart through the Storefront API, ships through Apple and Google review, and pushes notifications a browser cannot. That framing matters, because the decision between Tapcart, Vajro, and Shopney is less about template galleries and more about which one fits your integration surface, your app store operational load, and your brand size. Tapcart is the enterprise default with the deepest integration ecosystem and the price to match. Vajro sits in the mid market with live selling and aggressive pricing. Shopney serves smaller catalogs with strong support and a lower floor. Here is how they differ where it counts, and how to choose without repainting the app a year in.

Aug 6, 2026 AI Models

Claude Opus 5 vs GPT-5.6 Sol vs Gemini 3.5 Pro: MLE-bench Machine Learning Engineering Agents Tested (2026)

Most coding benchmarks hand a model a bug and a passing test and ask it to close the gap, which measures something real but narrow. MLE-bench asks a harder question: given a raw Kaggle competition, its data, and its scoring metric, can an agent do the whole job, explore the data, engineer features, pick and train a model, tune it, and submit something that would have earned a medal against human competitors. That is not a code editing task, it is a machine learning engineering task, and it stresses long horizon planning, tool use across a real environment, and the judgment to stop tuning and ship, all under a fixed compute and time budget. We ran Claude Opus 5, GPT-5.6 Sol, and Gemini 3.5 Pro across a slice of MLE-bench with the same agent scaffold, the same hardware budget, and the same wall clock limit per competition, and the interesting result is not just who scored the most medals, it is how differently each model spends its budget getting there. One is methodical and expensive, one is fast and streaky, and one is the value pick that gives up a few points for a large price cut.

Aug 6, 2026 Headless Commerce

Klarna vs Afterpay vs Affirm: BNPL Integration for Headless Checkout (2026)

Adding buy now pay later to a hosted checkout is a plugin and an afternoon. Adding it to a headless storefront is a different project, because in a custom checkout you own the flow that the plugin used to hide, and buy now pay later drags in more of that flow than any card processor does. The widget that shows a shopper their installment options is trivial. What is not trivial is the eligibility check that has to run before you render it, the session you have to create server side and reconcile against your order, the capture that happens on your schedule and not the shopper's, and above all the refund path, because a partial refund on a four installment plan is a genuinely different problem than a partial refund on a card. Klarna, Afterpay, and Affirm all solve the same shopper facing job, spread the cost, but they expose that job through APIs that assume different amounts of work on your side, and picking the wrong one for a headless build means discovering the mismatch at the point where refunds stop reconciling. This post compares them where a headless integration actually feels the difference and lays out the flow that keeps a custom checkout honest.