Skip to main content

842 posts tagged with "ai-engineering"

View all tags

When the Round Trip Is the Bug: The Case for On-Device Inference You Keep Dismissing

· 9 min read
Tian Pan
Software Engineer

Here is a number that should bother you more than it does: the median network round trip to a cloud LLM endpoint costs you somewhere between 48 and 800 milliseconds before the model emits a single token. That is not inference time. That is not queue time. That is the price of leaving the building — DNS, TLS, the haul to the nearest region, the haul back. For a single chat completion, you never notice it. For an agent that makes nine sequential tool calls to answer one question, you just shipped five seconds of pure transit latency, and your users feel every bit of it.

Most teams treat the round trip as a fixed cost of doing business, something you optimize around with streaming and spinners. But for a growing class of workloads, the round trip is the bug. The model you need is small enough to run where the data already lives, the task is repetitive enough that the marginal cloud cost compounds into real money, and the data is sensitive enough that shipping it to a third party is a liability you keep quietly accepting. On-device and edge inference is the option most engineering teams dismiss reflexively — "the local models aren't good enough" — and the dismissal is increasingly wrong.

The Broken Apprenticeship: Rebuilding the Skill Ladder When AI Eats the Grunt Work

· 9 min read
Tian Pan
Software Engineer

For decades, the path from junior to senior engineer ran through a pile of unglamorous work. You fixed the typo in the error message. You wrote the unit test for the function someone else built. You traced a null pointer through four layers of call stack at 2 a.m. and learned, viscerally, why defensive checks exist. Nobody designed this curriculum. It emerged because the cheap, low-stakes tasks happened to be exactly the tasks that built judgment.

That curriculum is being deleted. The work that used to train juniors — boilerplate, first drafts, trivial bug fixes, test scaffolding — is now the work we hand to an agent because it's cheap and fast. We optimized away the grunt work without noticing it was also the classroom. The result is a skill ladder missing its bottom rungs: we still have seniors at the top, we have AI at the bottom, and a widening gap in the middle where mid-level judgment used to form.

This isn't a hiring problem you can solve by posting more entry-level reqs. It's a learning problem. The tasks that taught are gone, and the tasks that remain — reviewing agent output, decomposing ambiguous problems, deciding what not to build — are the hard ones we used to assume people earned the right to do. If you want senior engineers in 2032, you have to deliberately manufacture the experiences that used to happen by accident.

The Documentation Renaissance: Your README Is the Agent's Primary Context Surface

· 10 min read
Tian Pan
Software Engineer

For two decades, documentation was where good intentions went to die. You wrote the README during the first sprint, when the architecture was clean and your enthusiasm was high. Nobody read it. By the third sprint it was lying about the build command, and by the sixth it described a service that had been deleted. Documentation was a tax everyone agreed to pay and nobody actually paid — a moral imperative with no feedback loop. Write bad docs and nothing happened. Write no docs and nothing happened either, because the senior engineers carried the architecture in their heads.

Then we pointed coding agents at our repositories, and the feedback loop arrived overnight. The README is now the single highest-leverage file you own — not because anyone gave a motivational talk about documentation hygiene, but because the quality of that file now visibly determines whether your agent ships correct code or confidently hallucinates an architecture that no longer exists.

This is the documentation renaissance, and it has almost nothing to do with the documentation we used to write.

Comprehension Debt: The 2 A.M. System No Human Understands

· 9 min read
Tian Pan
Software Engineer

The pager goes off at 2:14 a.m. A checkout service is throwing 500s, revenue is bleeding, and you are the on-call engineer. You pull up the failing module and start reading. The code is clean — well-named functions, sensible structure, even a few helpful comments. And you have no idea what it does. You didn't write it. Nobody on your team really wrote it. An agent generated it four months ago, it passed review, the tests went green, and it has been running in production ever since. Now it's on fire, and the person who is supposed to fix it is meeting it for the first time.

This is comprehension debt: the widening gap between the amount of code your organization runs and the amount any human actually understands. It doesn't show up on a dashboard. It accrues silently while everything looks healthy, and it comes due at the worst possible moment — during an incident, when the cost of not understanding your own system is measured in downtime.

The Velocity Mirage: Why AI Teams Ship More PRs but Deliver Value Slower

· 8 min read
Tian Pan
Software Engineer

Your dashboard has never looked better. Pull requests merged are up almost double. Commits per engineer are climbing. Lines of code are pouring in. Every activity chart points up and to the right, and the AI coding tool you rolled out six months ago looks like the best money the org has spent all year.

Then you check the one number nobody puts on a slide: how long it takes for a customer to actually get something they asked for. It hasn't moved. In some quarters it's worse. The team is producing more of everything except the thing the business buys.

This is the velocity mirage. The metrics that are easy to count went up, and the outcome that matters quietly went the other way. It is one of the most expensive measurement failures in engineering right now, because it looks exactly like success.

The Two-Speed Roadmap: Planning AI Features When the Model Floor Moves Every Quarter

· 9 min read
Tian Pan
Software Engineer

There is a specific kind of regret that only happens on AI teams. You spend a quarter building an elaborate workaround — a multi-step prompt chain, a custom reranker, a hand-tuned tool-routing layer — and ship it. It works. Then six weeks later a new model drops, does the whole thing natively in one call, and your quarter of work is now dead weight you have to rip out. The feature didn't fail. The floor moved.

This is the structural problem with planning AI features in 2026: the substrate you're building on is improving faster than your release cycle. From 2023 into mid-2025, frontier labs shipped on a roughly six-month cadence. By Q1 2026 that compressed to substantive releases roughly every four weeks, with stretches where five labs shipped inside a thirteen-day window. The thing you're standing on moves under you between planning and launch.

You Didn't Choose a Model, You Married One: The Prompt-Level Lock-In Nobody Budgets For

· 9 min read
Tian Pan
Software Engineer

Ask any engineering leader whether they're locked into a model vendor and they'll point you at the abstraction. "We route everything through a gateway. Swapping providers is a config change." The endpoint is one line. The base URL is an environment variable. On paper, migration is a Tuesday afternoon.

Then they try it. They flip the config to a different model family, the integration tests stay green, and production quietly falls apart. The JSON that always parsed now arrives wrapped in a markdown fence. The classifier that hit 94% drops to the low eighties. A prompt that ran clean for a year starts refusing one request in twenty for reasons no one can reproduce. The endpoint swapped in seconds. The behavior did not come with it.

This is the lock-in nobody budgets for. It doesn't live in your contract or your SDK. It lives in your prompts — thousands of small accommodations your team made, one at a time, to the quirks of a single model family. You didn't choose a model. You married one, and the prenup is every prompt you've ever shipped.

The ML Engineer You Hired Isn't the AI Engineer You Need

· 9 min read
Tian Pan
Software Engineer

A VP of Engineering decides the company needs to "do AI." There is already a machine learning team — three people who built the recommendation model, tuned the fraud classifier, and maintain a feature store. The obvious move is to point them at the new LLM initiative. They know the math. They've shipped models. How different could it be?

Six months later the prototype demos beautifully and dies in production. Nobody can say why the agent occasionally books the wrong meeting, the cost per request is four times the estimate, and there is no way to tell whether last week's prompt change made things better or worse. The ML team is frustrated because none of the tools they're good at — gradient descent, data pipelines, hyperparameter sweeps — apply to a model they can't retrain and can't see inside.

This is the most common org mistake in AI right now, and it comes from a reasonable-sounding assumption: that the craft of building models and the craft of building on models are the same job with a different label. They are not. They overlap less than "frontend engineer" and "backend engineer" do.

Token Budgets Are a Headcount Decision in Disguise

· 10 min read
Tian Pan
Software Engineer

A team I talked to recently spent three engineer-weeks shaving their average prompt from 4,000 tokens to 2,600. They were proud of it — a clean 35% reduction, real numbers, a nice graph in the deck. Then someone did the arithmetic the other direction. The savings came to roughly $1,800 a month. The three engineer-weeks they spent getting there cost something like $25,000 in fully-loaded salary. At that monthly run rate, the optimization pays for itself in about fourteen months — assuming the prompt never changes, the model never gets cheaper, and those engineers had nothing more valuable to build.

None of those assumptions held. The prompt changed twice in the next quarter. The model they were on dropped its input price by 40% on its own. And the feature those engineers didn't ship that month was the one the biggest customer had been asking about.

Your AI Roadmap Needs a Decommission Column

· 10 min read
Tian Pan
Software Engineer

Look at any AI product roadmap and you'll find columns for the things you're going to launch: a new agent, a better retrieval pipeline, a model upgrade, a fine-tune. Every item is a birth. Nothing on the board is a death. There's no column for the model you'll stop supporting, the prompt you'll retire, the eval set you'll archive, the feature you'll turn off. Roadmaps are optimistic by construction — they're a list of futures you're promising to create.

That omission is fine for deterministic software, where a feature you shipped two years ago mostly keeps working until you touch it. It is quietly catastrophic for AI systems, where the things you shipped are decaying whether you touch them or not. A prompt tuned to GPT-4's quirks degrades the day the provider nudges the model. An eval suite written against last year's failure modes stops measuring anything real. A model you depend on gets a 60-day deprecation notice you didn't plan for. A roadmap that only plans launches is accruing silent liability on every line it doesn't track.

The Build-vs-Buy Line Moved: Deciding AI Features When Provider Primitives Absorb Your Infra

· 9 min read
Tian Pan
Software Engineer

Eighteen months ago, "we built our own retrieval pipeline" was a reasonable thing to say in an architecture review. You had a chunking strategy, an embedding model you'd benchmarked, a vector store you'd tuned, a re-ranker, and a context-packing heuristic that took three engineers a quarter to get right. That stack was a real piece of differentiated infrastructure. Today, the same capability is a single hosted tool call: upload files to a vector store, attach it to a request, and the provider parses, chunks, embeds, stores, retrieves, and re-ranks — all behind one API. The three-engineer-quarter is now a config object.

This is the uncomfortable pattern of building AI products right now. The line between what you build and what you buy is not fixed. It moves — and it moves in one direction. Every few months a provider ships a primitive that absorbs a layer you used to own: memory, retrieval, structured output, tool routing, even multi-step orchestration. The infra you were proud of last quarter becomes the thing a competitor gets for free this quarter, with better defaults and a lower latency floor because it runs inside the provider's own datacenter.

The instinct is to treat this as a threat to defend against. That's the wrong frame. The provider absorbing commodity infra is doing you a favor — it deletes maintenance you never wanted. The real question is whether the thing you chose to build sits above or below the rising waterline. Most teams never make that call explicitly. They build whatever the demo needed, and then discover a year later that 70% of their codebase is reimplementing a primitive the provider now offers, while the 30% that's actually defensible got starved of attention.

The Demo-to-Production Tax: The 90% of AI Work the Prototype Hid

· 9 min read
Tian Pan
Software Engineer

The demo worked. You typed a question, the agent called three tools, reasoned through a multi-step plan, and produced an answer that made the room lean forward. Someone said "ship it." Three months later you're still not shipped, and nobody can quite explain where the time went.

Here is where it went: the demo was 10% of the work. It was the brain. The other 90% is the plumbing — the evals, guardrails, observability, cost controls, and fallback paths that nobody claps for because they're invisible when they work and catastrophic when they don't. That 90% is the demo-to-production tax, and most teams budget for it as if it were a rounding error.

The numbers say otherwise. MIT's 2025 study of enterprise AI found that 95% of generative-AI pilots delivered no measurable P&L impact. A separate analysis put it more bluntly: for every 33 proofs of concept an enterprise starts, four reach production. That's an 88% mortality rate, and the cause of death is almost never the model. It's everything the demo let you skip.