Writing / Tag / 20 of 66
LLM
Every essay tagged LLM, newest first.
The LLM tag collects the essays that are about the model call itself rather than the agent around it: what you send, what comes back, what it costs and how long it takes. That includes structured output that is almost valid JSON, prompts that resend the same 8,000 tokens on every step, routing between models of different prices, and evals that catch a prompt regression before a support ticket does.
A lot of these started as cost problems. Token spend is per request and elastic, so the same task can cost two dollars one day and forty the next, and the fixes tend to improve latency and reliability at the same time. The guide this tag maps to walks through that in order; the essays go deeper on each piece.
Start with model routing to see the cascade pattern that sends each request to the cheapest model that can handle it, then prompt prefix caching for the single change that cuts both the bill and prefill time. Evals in CI is the third one to read, because none of the savings hold if you cannot tell when quality dropped.
October 2026
Your Token Budget Is Wrong the Day You Switch Models
You moved to a newer, cheaper model and the bill went up.Your Model Router Saves Pennies and Burns Your Prompt Cache
You added a model router to cut costs and the bill went up.Stop Hand-Tuning Prompts. Let Your Eval Set Do It.
Most teams still tune prompts by hand, one guess at a time, with no memory of what they already tried and no proof the new version is better.Your Agent Retries Are Making the Failure Worse
When an agent step fails and you retry it in the same context, the failed attempt stays in the window and the model conditions its next try on its own mistake.Your Evals Are Green and the Product Is Getting Worse
A frozen eval suite stops describing your product within weeks.
August 2026
Your RAG Cites a Source That Does Not Say That
Your retrieval is good.One Customer Burned Your Month of LLM Budget by 2pm
LLM spend is per request and wildly variable, so a single runaway agent or one heavy tenant can externalize its cost straight onto your margin.Your Tool Returned 40,000 Tokens. The Agent Needed 12.
A single tool call can dump a whole file, a full API response, or a thousand log lines straight into the context window.The Agent Is Not Confused. Its Context Is Stale.
In a long session an agent keeps every tool result it ever saw, including the three older versions of a file that has changed twice since.Your Agent Calls One Tool, Waits, Then Calls the Next
When an agent needs three lookups that do not depend on each other, running them one at a time makes the user wait for the sum of all three.
July 2026
The Agent Can Call the Tool. That Is Not the Same as Allowed.
An agent that holds a tool runs it with the whole application's credentials, not the current user's.Your Agent Cost $2 Yesterday and $40 Today and You Cannot See Why
An agent's cost is elastic and path-dependent, so the same task runs for two dollars one day and forty the next.You Pay Full Price for the Same 8,000-Token Prompt on Every Agent Step
An agent resends the same enormous system prompt, tool list, and history on every step, and without prefix caching you pay full input price and full prefill latency each time.Your Agent Fans Out Faster Than Anything Downstream Can Take
An agent that spawns subtasks and fans out tool calls builds an unbounded work queue, hammers your rate limits, and burns the token budget before the run finishes.Your Agent Dies at Step 40 and Starts Over From Zero
A long agent run that crashes halfway restarts from scratch, re-spending every token it already paid for and re-firing side effects you never wanted twice.Your Agent Answers the Same Question Fifty Times a Day
Most of what your agent gets asked, it has already answered.Your LLM Returns Almost Valid JSON, and Almost Is Breaking You
Once an LLM feeds a real workflow, "mostly valid" JSON is a failed handoff, not a formatting quirk.LLM Evals in CI: Catch Regressions Before Your Users Do
Most teams find out a prompt change broke something from a support ticket, not from CI.LLM Model Routing: Cut AI Costs Without Losing Quality
Sending every request to your most expensive model is the fastest way to burn budget.Context Compaction for Long-Running AI Agents
Long-running AI agents fail when context grows without bound, blowing up token costs, latency, and reliability.