<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vikrant Shukla</title>
    <description>The latest articles on DEV Community by Vikrant Shukla (@haltonlabs).</description>
    <link>https://dev.to/haltonlabs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3920482%2F5bf7a95e-c7ed-4301-b55e-e60c1f995c2f.png</url>
      <title>DEV Community: Vikrant Shukla</title>
      <link>https://dev.to/haltonlabs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/haltonlabs"/>
    <language>en</language>
    <item>
      <title>Where AI Coding Is Actually Headed (Not the Hype Version)</title>
      <dc:creator>Vikrant Shukla</dc:creator>
      <pubDate>Sun, 17 May 2026 03:30:00 +0000</pubDate>
      <link>https://dev.to/haltonlabs/where-ai-coding-is-actually-headed-not-the-hype-version-1me</link>
      <guid>https://dev.to/haltonlabs/where-ai-coding-is-actually-headed-not-the-hype-version-1me</guid>
      <description>&lt;p&gt;The future of AI coding gets discussed in two registers: the utopian one where AI writes all the code and developers are free to think about "higher-level problems," and the dismissive one where AI is just autocomplete that gets things wrong at the worst moments.&lt;/p&gt;

&lt;p&gt;Both are wrong in similar ways. Here is what I actually think is happening, based on watching production teams work with these tools for the last couple of years.&lt;/p&gt;

&lt;h2&gt;
  
  
  We are still in the autocomplete phase, but it's ending
&lt;/h2&gt;

&lt;p&gt;The dominant paradigm right now is still assistant-style generation: a developer writes intent, the model writes implementation, the developer accepts or revises. This is useful and already changes productivity measurably — but it's not structurally different from any other productivity tool. It makes the current process faster, not different.&lt;/p&gt;

&lt;p&gt;What's shifting is the scope of what "a task" means. Tools that started as single-function generators are now completing across multiple files, running tests, reading error output, and iterating on their own suggestions. This is qualitatively different. It's not faster autocomplete — it's a different relationship to the work unit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The next phase is CI-native agents
&lt;/h2&gt;

&lt;p&gt;The most consequential change coming in the near term is not chat-based coding assistance. It is agents embedded directly in the continuous integration pipeline.&lt;/p&gt;

&lt;p&gt;Right now, CI is where code goes to be verified. In 18–36 months, CI will increasingly be where code goes to be &lt;em&gt;partially written&lt;/em&gt; — where an agent ingests a failing test, proposes a fix, runs validation, and opens a PR if the fix passes. A developer reviews and merges.&lt;/p&gt;

&lt;p&gt;This is not a far-future speculation. It's already deployed in some form at companies running large monorepos with well-defined test contracts. The technical prerequisites — deterministic test suites, clean dependency graphs, reliable build environments — are the same prerequisites for high-quality code at scale generally. Teams that invest in test quality now are building infrastructure that agent-assisted CI will amplify.&lt;/p&gt;

&lt;h2&gt;
  
  
  Boilerplate is largely solved
&lt;/h2&gt;

&lt;p&gt;For anything with a well-defined schema — REST API clients, data models, ORM queries, configuration parsers, serialisation code, test fixtures — AI generation is already faster and often better than human-written code. The domain is too regular, the patterns too established, and the failure modes too obvious.&lt;/p&gt;

&lt;p&gt;This is not "AI will take developer jobs." It is "a significant fraction of what junior developers spend time on is going to be automated, and that will change the shape of what junior developers are for."&lt;/p&gt;

&lt;p&gt;What replaces the boilerplate time is unclear. The optimistic view is that engineers get to spend more time on architecture, product thinking, and edge-case hardening. The realistic view is that velocity expectations will rise to absorb the freed capacity, and some of the judgment development that comes from writing the boilerplate will need to come from somewhere else.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shrinking value of syntax knowledge, the rising value of specification
&lt;/h2&gt;

&lt;p&gt;One of the clearest patterns I see is the declining marginal value of knowing language syntax and standard library APIs precisely. If you can describe what you want clearly and precisely, you can get working code in languages you don't fluently write. This is genuinely new.&lt;/p&gt;

&lt;p&gt;What rises in value is the ability to specify intent precisely: to write test contracts that capture the real requirements, to describe edge cases clearly enough that they can be verified, to recognise when generated code is plausible-but-wrong because you have a clear mental model of what correct looks like.&lt;/p&gt;

&lt;p&gt;The developers who are most effective with AI tools, in my observation, are not the ones who are best at prompting. They are the ones with the strongest models of what the code needs to do — which is also what made them good developers before.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where human judgment remains the scarce resource
&lt;/h2&gt;

&lt;p&gt;A few domains remain genuinely hard for current AI tools, not because the capability isn't there in principle, but because the problem is underspecified or the signal is weak:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security review.&lt;/strong&gt; Not automated scanning — that's increasingly fine — but the judgment about whether a system's threat model is correctly framed, whether the trust boundaries make sense, whether the authentication flow has subtle flaws in its assumptions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Distributed systems correctness.&lt;/strong&gt; Reasoning about concurrent, partially-failing systems at the design level. The AI can generate an implementation of your consensus algorithm. It cannot tell you whether your consensus algorithm is the right choice for your failure model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Domain translation.&lt;/strong&gt; Taking a messy, ambiguous real-world problem and converting it into a well-defined computational problem. This is the hardest part of software engineering and the part where AI assistance is currently least useful.&lt;/p&gt;

&lt;p&gt;These are the domains worth investing in. Not because AI won't eventually make progress there — it will — but because the timeline is longer and the human advantage is currently most durable.&lt;/p&gt;




&lt;p&gt;The future of AI coding is not autonomous systems writing all software while developers sip coffee and approve PRs. It is a material shift in where human judgment is applied, a compression of the time between intent and implementation, and a significant change in the skill mix that makes an engineer effective.&lt;/p&gt;

&lt;p&gt;That's already happening. The interesting question is whether your team's practices are evolving at the same rate as the tools.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>llm</category>
    </item>
    <item>
      <title>How Companies Actually Get Tiered Token Pricing (and Why You Probably Can't Yet)</title>
      <dc:creator>Vikrant Shukla</dc:creator>
      <pubDate>Sat, 16 May 2026 03:30:00 +0000</pubDate>
      <link>https://dev.to/haltonlabs/how-companies-actually-get-tiered-token-pricing-and-why-you-probably-cant-yet-1b48</link>
      <guid>https://dev.to/haltonlabs/how-companies-actually-get-tiered-token-pricing-and-why-you-probably-cant-yet-1b48</guid>
      <description>&lt;p&gt;Everyone in developer tooling knows that the published price isn't the only price. But the mechanics of how you get from "paying retail" to "paying something better" are rarely explained clearly.&lt;/p&gt;

&lt;p&gt;This is an attempt to do that.&lt;/p&gt;

&lt;h2&gt;
  
  
  The public tier is real, and it's fine for most teams
&lt;/h2&gt;

&lt;p&gt;Let me start honestly: for most teams spending under $50–80k/year on LLM API costs, the public pricing tier is adequate. The margins built into it are significant, but the absolute cost at low volumes is low enough that optimising it is not the highest-leverage work you can do.&lt;/p&gt;

&lt;p&gt;Where it starts to matter is when you're scaling a production system, when LLM cost is a meaningful line in your operating budget, or when you're building a product where per-call economics affect your own pricing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mechanisms that actually unlock better pricing
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Volume commitments with annual contracts.&lt;/strong&gt; The single most straightforward path. Moving from pay-as-you-go to a contractual annual commitment — with a floor on spend — shifts the conversation from "customer" to "account." The discount on committed spend varies by provider and by the size of the commitment, but it exists, it's negotiable, and it starts at lower spend levels than most people assume.&lt;/p&gt;

&lt;p&gt;The key insight is that providers are optimising for two things: revenue predictability and capacity planning. A customer who commits to $200k/year is worth considerably more to them, in planning terms, than a customer who might spend $200k or might spend $20k. That predictability has real value to the provider, and some of it can be captured by the customer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reserved capacity tiers.&lt;/strong&gt; Separate from pricing, some providers offer reserved capacity — guaranteed throughput and latency SLAs — at a premium. For teams where the LLM is in the critical path of a user-facing product, this is often worth paying for independently of any discount discussion. But it's also a negotiating lever: committing to reserved capacity is a strong signal of production intent, which improves your position in the pricing conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benchmark and evaluation partnerships.&lt;/strong&gt; This is less commonly discussed. Some providers actively want customers who are building domain-specific evaluation suites — test sets that assess model performance on real-world tasks in their vertical. If you have a well-defined problem domain and a meaningful evaluation set, approaching a provider as a benchmark partner (rather than just a customer) can open a different kind of conversation. You are offering them something they genuinely need: signal on where the model performs well and where it doesn't, in your specific context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reference customer arrangements.&lt;/strong&gt; The marketing and sales value of a credible reference customer — a company willing to be named publicly, discuss their use case, and appear in case study material — is real. Providers, especially in the 12–24 months after launching an enterprise-facing product, actively want these relationships. If you're willing to participate (and have governance approval to do so), it's worth raising in procurement discussions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud provider bundling.&lt;/strong&gt; If your primary infrastructure is on Azure, Google Cloud, or AWS, there are often mechanisms to apply API credits or cloud commit spend to LLM API costs. These arrangements are typically structured at the cloud provider level rather than directly with the model provider, but the economics can be meaningful if you already have large cloud commitments.&lt;/p&gt;

&lt;h2&gt;
  
  
  What doesn't work
&lt;/h2&gt;

&lt;p&gt;Asking for a discount without any of the above. A sales team has no mechanism to offer reduced pricing to a small pay-as-you-go account without some quid pro quo — either commitment, volume, or strategic value. A cold email asking for "startup pricing" or "special rates" without substance behind it will be declined.&lt;/p&gt;

&lt;p&gt;Also: waiting until you're already at high spend. The time to negotiate is before you've locked in your architecture and before the provider knows you have no viable alternative. Negotiate early, when you have options.&lt;/p&gt;

&lt;h2&gt;
  
  
  The practical implication for small teams
&lt;/h2&gt;

&lt;p&gt;If you're a small team currently at or approaching $8–10k/month in API spend, you're at the threshold where these conversations start to be worth having. Not because the absolute savings are transformational, but because the relationship and the contract structure you establish now will shape your cost trajectory as you scale.&lt;/p&gt;

&lt;p&gt;The first step is simple: contact your provider's sales team and ask directly what the contracted pricing tiers look like at your current and projected usage level. The worst outcome is you learn there's nothing available at your scale. The better outcome is you get a number that's worth committing to.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>devops</category>
    </item>
    <item>
      <title>Beyond Pay-Per-Token: How Enterprises Barter Architecture for AI Access</title>
      <dc:creator>Vikrant Shukla</dc:creator>
      <pubDate>Fri, 15 May 2026 03:30:00 +0000</pubDate>
      <link>https://dev.to/haltonlabs/beyond-pay-per-token-how-enterprises-barter-architecture-for-ai-access-1kff</link>
      <guid>https://dev.to/haltonlabs/beyond-pay-per-token-how-enterprises-barter-architecture-for-ai-access-1kff</guid>
      <description>&lt;p&gt;The public pricing page is what most developers see: input tokens, output tokens, price per million, maybe a cached-input tier. A clean table with a currency symbol.&lt;/p&gt;

&lt;p&gt;What the table doesn't show is the deals that don't fit in it.&lt;/p&gt;

&lt;p&gt;At the highest level of enterprise AI procurement, some of the most interesting commercial relationships don't look like token purchases at all. They look more like barter — except what's being exchanged is architectural commitment rather than currency.&lt;/p&gt;

&lt;h2&gt;
  
  
  What gets traded instead of tokens
&lt;/h2&gt;

&lt;p&gt;Large organisations have something model providers want badly: data, compute, distribution, and validation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data partnerships.&lt;/strong&gt; A healthcare network with ten years of de-identified clinical records, a financial institution with transaction pattern data, a logistics company with real-world routing optimisation problems — these are extraordinarily valuable for training and fine-tuning. A provider who gets access to a curated, domain-specific dataset in exchange for preferential API access is trading token capacity for something they couldn't otherwise easily acquire.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reserved compute commitments.&lt;/strong&gt; The hyperscale cloud providers — Microsoft Azure, Google Cloud, AWS — have deeply intertwined relationships with the frontier model labs. Enterprise customers who commit to significant cloud infrastructure spend often find that their AI API costs are structured very differently. The "token price" becomes almost a rounding error against a larger infrastructure negotiation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reference architecture partnerships.&lt;/strong&gt; Being a named reference customer — agreeing to publish a case study, participate in an advisory council, demo the integration at a conference — has real value to a provider building enterprise credibility. It doesn't show up as a line item on your invoice, but it influences the price that goes on the invoice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Co-development agreements.&lt;/strong&gt; Some enterprises are not just customers but contributors: funding fine-tuning runs, contributing domain-specific evaluation benchmarks, co-authoring research on enterprise use cases. These arrangements blur the line between customer and partner in ways that make the "per-token" framing essentially meaningless.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for everyone, not just enterprise procurement
&lt;/h2&gt;

&lt;p&gt;If you are a small team or independent developer, this isn't just a trivia fact about how the other half lives. It has practical implications.&lt;/p&gt;

&lt;p&gt;The pricing you see is calibrated to a market that includes these high-level deals. The public tier pricing reflects a cost structure that is partly subsidised by the strategic value the provider gets from its largest relationships. In a world where the biggest customers are trading architecture for access, the marginal economics of serving the long tail of pay-as-you-go developers are shaped by that dynamic.&lt;/p&gt;

&lt;p&gt;It also means the pricing tier you're on is not the floor. There is a below-published-pricing tier — it's just not accessible via a self-serve signup flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  What triggers access to better pricing
&lt;/h2&gt;

&lt;p&gt;This is worth being specific about, because the answer is actionable even at a mid-sized organisation:&lt;/p&gt;

&lt;p&gt;Volume commitment with a contract is the first unlock. Moving from pay-as-you-go to a committed annual spend — even at levels that feel modest compared to enterprise deals — typically moves you into a negotiable tier. The number is usually somewhere north of $100k/year in API spend, but it varies.&lt;/p&gt;

&lt;p&gt;Workload visibility is the second factor. Providers want to understand what you're building. A one-page technical summary of your use case, expected traffic patterns, and growth trajectory is often the difference between the published tier and a conversation about a custom arrangement. They're not being charitable — they want to understand the shape of your future revenue and whether you're a reference customer they'd want.&lt;/p&gt;

&lt;p&gt;Production deployment signals seriousness. A proof-of-concept customer is worth less to a provider than a production customer. If you can demonstrate that you are building something real and intend to scale it, the conversation changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The structural implication
&lt;/h2&gt;

&lt;p&gt;We are in an early period for AI infrastructure pricing, and the structures are not yet settled. The token-as-unit-of-account model made sense in the early API phase. As the market matures, I'd expect the pricing models to evolve in the direction of the patterns already visible in the top tier: capacity reservations, tiered service agreements, outcome-based pricing in some verticals, and bundling with adjacent cloud services.&lt;/p&gt;

&lt;p&gt;The developers who understand this now — who know that "the public price is not the only price" and know how to have that procurement conversation — will be at a structural cost advantage as their usage scales.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Microsoft Says 50% AI Code. Here's What That Actually Means for Engineers</title>
      <dc:creator>Vikrant Shukla</dc:creator>
      <pubDate>Thu, 14 May 2026 03:30:00 +0000</pubDate>
      <link>https://dev.to/haltonlabs/microsoft-says-50-ai-code-heres-what-that-actually-means-for-engineers-cif</link>
      <guid>https://dev.to/haltonlabs/microsoft-says-50-ai-code-heres-what-that-actually-means-for-engineers-cif</guid>
      <description>&lt;p&gt;I was in a conversation recently with a senior engineering leader at Microsoft. He mentioned, almost in passing, that their development teams now carry an internal target: generate 50% of production code using AI tools.&lt;/p&gt;

&lt;p&gt;Not a stretch goal. A target.&lt;/p&gt;

&lt;p&gt;I've been thinking about what that actually means for the working engineer — not the headline version, but the granular, day-to-day reality of what changes and what doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the 50% number is measuring
&lt;/h2&gt;

&lt;p&gt;First, let's be precise about what "50% AI-generated code" means, because the metric itself is underspecified.&lt;/p&gt;

&lt;p&gt;Is it 50% of lines committed? 50% of characters? 50% of files touched in a sprint? Does a human-edited AI suggestion count as 50% AI or 0%?&lt;/p&gt;

&lt;p&gt;At most orgs tracking this, "AI-generated" means code that was initially produced by a copilot or agent tool and accepted by the engineer — even if subsequently edited. On that definition, the number at many teams is already 30–40% for greenfield work. Getting to 50% is less a technological leap than a cultural one: making it the default path rather than the optional tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually changes at 50%
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Code review shifts in shape, not volume.&lt;/strong&gt; If anything, the review burden increases. AI-generated code tends to be syntactically correct and structurally conventional, which makes reviewers lower their guard. The bugs that slip through are not the obvious ones — they are the subtle semantic ones, the hidden invariant violations, the race conditions that only appear at scale. Teams that hit 50% without updating their review practices will ship more of these.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The senior/junior dynamic changes.&lt;/strong&gt; Junior developers using AI tools can produce code at a velocity that previously required years of pattern recognition. But velocity without judgment is dangerous. The role of the senior engineer is no longer primarily to write code faster — it is to provide the judgment layer that AI cannot: understanding what invariants the system is actually maintaining, catching the plausible-but-wrong output, knowing when the generated code misunderstands the domain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accountability attribution gets murky.&lt;/strong&gt; When a bug ships in AI-generated code, who owns it? The engineer who accepted it? The team lead who approved it in review? The org that set the 50% target? This is not an abstract question — it will show up in post-mortems, in performance reviews, and eventually in liability discussions. Orgs haven't caught up with the governance implications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Documentation pressure increases.&lt;/strong&gt; AI tools generate code from context. The less context your codebase has — through comments, docstrings, README files, meaningful variable names — the worse the generated output. Teams chasing the 50% target without investing in documentation quality will find the AI generating plausible code that increasingly doesn't fit the actual system.&lt;/p&gt;

&lt;h2&gt;
  
  
  What doesn't change
&lt;/h2&gt;

&lt;p&gt;The actual hard parts of software engineering remain human. Deciding what to build. Understanding the user's real problem, which is usually not the stated problem. Navigating the organisational constraints that shape what's technically possible. Making judgment calls under uncertainty with incomplete information.&lt;/p&gt;

&lt;p&gt;These are not prompt-engineering challenges. No amount of AI code generation changes them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The thing worth worrying about
&lt;/h2&gt;

&lt;p&gt;The target creates an incentive structure. If teams are measured on "% of code AI-generated," engineers will find ways to hit the number — including accepting AI output they'd otherwise revise, or framing human-written code as AI-assisted.&lt;/p&gt;

&lt;p&gt;Metrics shape behaviour. The 50% target is a reasonable directional signal but a poor KPI. The better question is: what is the defect rate, cycle time, and system reliability of the code being shipped, regardless of how it was produced?&lt;/p&gt;

&lt;p&gt;The exec I spoke to understood this. His point was not "AI should write half your code." His point was "if your team isn't regularly using AI as a core part of the workflow, that's a capability gap we need to close."&lt;/p&gt;

&lt;p&gt;That's a more nuanced position than the headline number suggests — and it's the right one to hold onto as these targets propagate across the industry.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>career</category>
    </item>
    <item>
      <title>The LLM Code Bugs Nobody Talks About</title>
      <dc:creator>Vikrant Shukla</dc:creator>
      <pubDate>Wed, 13 May 2026 03:30:00 +0000</pubDate>
      <link>https://dev.to/haltonlabs/the-llm-code-bugs-nobody-talks-about-39gp</link>
      <guid>https://dev.to/haltonlabs/the-llm-code-bugs-nobody-talks-about-39gp</guid>
      <description>&lt;p&gt;Every developer I know has a story about AI-generated code that looked completely right and was completely wrong. Not "wrong" in an obvious way — wrong in the way that costs you a Tuesday.&lt;/p&gt;

&lt;p&gt;After shipping production systems where AI wrote a meaningful portion of the codebase, here are the failure modes I've stopped being surprised by.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Hallucinated imports that pass linting
&lt;/h2&gt;

&lt;p&gt;The model confidently reaches for &lt;code&gt;pandas.DataFrame.to_parquet(engine='pyarrow', schema_evolution=True)&lt;/code&gt;. That parameter does not exist. The code passes a static linter because the import resolves. It fails at runtime, in production, on the one path you didn't test.&lt;/p&gt;

&lt;p&gt;Why it happens: the model has seen thousands of DataFrame snippets and infers plausible-sounding parameters from patterns across libraries. It doesn't distinguish "I've seen this exact call" from "this feels right given everything I've read."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; for any library call involving optional parameters, run the generated code against the actual library docs or a real interpreter before committing. Don't trust the linter alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Confident wrong refactoring
&lt;/h2&gt;

&lt;p&gt;You ask the model to "refactor this function to be more readable." It hands back something cleaner. You merge it. Three weeks later, a subtle change in variable scope or early-return logic breaks a downstream assertion nobody noticed.&lt;/p&gt;

&lt;p&gt;The model optimised for the &lt;em&gt;appearance&lt;/em&gt; of correctness — shorter, more idiomatic code — without tracking all the invariants the original author was quietly maintaining.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; treat AI refactors like any external PR. Require a diff review and existing test suite pass, not just a visual scan.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Stale context poisoning
&lt;/h2&gt;

&lt;p&gt;Long sessions are particularly dangerous. By message 40, the model's working context has accumulated contradictory instructions, out-of-date schema definitions, and revised requirements that weren't cleanly updated. It starts synthesising code from a model of your codebase that no longer matches reality.&lt;/p&gt;

&lt;p&gt;This is different from hallucination. The model &lt;em&gt;is&lt;/em&gt; using your instructions — just the version from 30 messages ago.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; for complex tasks, periodically start a fresh context with a clean system prompt rather than accumulating state across a single long session. Treat context windows like short-term memory, not a persistent source of truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Non-determinism breaking CI
&lt;/h2&gt;

&lt;p&gt;AI-generated tests that rely on dictionary ordering, floating-point equality, or &lt;code&gt;datetime.now()&lt;/code&gt; will pass locally and fail in CI at a rate that's maddening to debug. The model writes tests that pass in its internal simulation of the code but doesn't account for environment-specific non-determinism.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; ban &lt;code&gt;==&lt;/code&gt; comparisons on floats and timestamps in any AI-generated test. Add a lint rule. Make the model explain &lt;em&gt;why&lt;/em&gt; each assertion is deterministic before you accept it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The "working" code that doesn't handle scale
&lt;/h2&gt;

&lt;p&gt;The model has seen plenty of sequential, synchronous Python. It has seen far less production async code under real concurrency. Generated async handlers frequently contain subtle race conditions — shared state accessed across coroutines without locks, cancellation paths that leave resources open, retry logic that doesn't account for partial writes.&lt;/p&gt;

&lt;p&gt;The code works perfectly in your local test. Under 50 concurrent requests, it quietly corrupts state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; any AI-generated concurrency code gets a mandatory review against the asyncio documentation and your race condition checklist before merge. If you don't have a checklist, make one.&lt;/p&gt;




&lt;h2&gt;
  
  
  The meta-bug
&lt;/h2&gt;

&lt;p&gt;All of these share a root cause: the model is optimising for &lt;em&gt;plausibility&lt;/em&gt;, not &lt;em&gt;correctness&lt;/em&gt;. Code that looks like correct code scores well in training. Code that subtly fails under edge conditions is hard to distinguish from working code in text form.&lt;/p&gt;

&lt;p&gt;This doesn't mean AI coding is broken. It means the review practices most teams inherited from the "all code is human-written" era are the wrong shape for "30–50% of this was generated."&lt;/p&gt;

&lt;p&gt;Your reviewers need to be looking for a different class of bug. The obvious ones, the model largely gets right. It's the plausible-but-wrong — the confident hallucination, the silent invariant violation, the context-poisoned refactor — that will cost you time until you build specific habits around catching them.&lt;/p&gt;

&lt;p&gt;What patterns have you hit that aren't on this list? I'd genuinely like to know.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>The Softmax Bottleneck: Why Making LLMs Bigger Doesn't Always Make Them Smarter</title>
      <dc:creator>Vikrant Shukla</dc:creator>
      <pubDate>Tue, 12 May 2026 03:30:00 +0000</pubDate>
      <link>https://dev.to/haltonlabs/the-softmax-bottleneck-why-making-llms-bigger-doesnt-always-make-them-smarter-3203</link>
      <guid>https://dev.to/haltonlabs/the-softmax-bottleneck-why-making-llms-bigger-doesnt-always-make-them-smarter-3203</guid>
      <description>&lt;p&gt;When researchers scale a language model — more parameters, more layers, wider hidden dimensions — there's an implicit assumption: a bigger model can represent more things. More expressiveness, more knowledge, better predictions. Mostly this is true. But there's a structural ceiling that scaling alone can't raise, and it sits right at the final layer of the network. It's called the softmax bottleneck.&lt;/p&gt;

&lt;p&gt;Understanding it explains why some models hit a performance wall that raw compute can't fix, and why certain architectural choices (mixture of experts, output factorisation, mixture of softmaxes) exist beyond just increasing model size.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Softmax Bottleneck Actually Is
&lt;/h2&gt;

&lt;p&gt;At the final step of a language model, you need to produce a probability distribution over every token in the vocabulary — typically 30,000 to 200,000 tokens. The model does this by taking the hidden state vector &lt;code&gt;h&lt;/code&gt; (dimension &lt;code&gt;d&lt;/code&gt;), multiplying by an output embedding matrix &lt;code&gt;W&lt;/code&gt; (shape &lt;code&gt;d × V&lt;/code&gt;, where &lt;code&gt;V&lt;/code&gt; is vocabulary size), and applying softmax.&lt;/p&gt;

&lt;p&gt;The problem: the output of that matrix multiplication is a rank-&lt;code&gt;d&lt;/code&gt; matrix. If the "true" next-token distribution you're trying to approximate requires higher effective rank than &lt;code&gt;d&lt;/code&gt; allows, you can't represent it — no matter how well you've trained.&lt;/p&gt;

&lt;p&gt;Formally: the log-probability matrix &lt;code&gt;log P(x_{t+1} | context)&lt;/code&gt; across all contexts and all tokens has a certain rank in the ideal case. If that rank exceeds the hidden dimension &lt;code&gt;d&lt;/code&gt;, the softmax layer is a bottleneck. The model is being asked to express a high-rank function through a low-rank projection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Shows Up in Practice
&lt;/h2&gt;

&lt;p&gt;A vocabulary of 100,000 tokens has an enormous number of contextual distinctions. Consider how differently the word "bank" should distribute probability across next tokens when preceded by "river" vs. "financial" vs. "blood" vs. "memory". Across all possible preceding contexts, the full distribution matrix has potentially very high rank — each context creates a distinct probability distribution over the vocabulary, and those distributions may be nearly linearly independent of one another.&lt;/p&gt;

&lt;p&gt;A model with hidden dimension &lt;code&gt;d = 4096&lt;/code&gt; can only produce at most 4096 linearly independent output distributions, regardless of the number of parameters in the model body. The transformer blocks can be arbitrarily deep and powerful; they eventually produce a &lt;code&gt;d&lt;/code&gt;-dimensional vector, and that vector can only express a limited diversity of next-token distributions.&lt;/p&gt;

&lt;p&gt;This was formalised in &lt;em&gt;"Breaking the Softmax Bottleneck: A High-Rank RNN Language Model"&lt;/em&gt; (Yang et al., 2017/2018), which showed empirically that even very large hidden dimensions were often insufficient for natural language, and that the rank constraint was genuinely binding.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Field Has Responded
&lt;/h2&gt;

&lt;p&gt;Several architectural responses have emerged:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mixture of Softmaxes (MoS)&lt;/strong&gt;: Instead of computing a single softmax, compute &lt;code&gt;K&lt;/code&gt; parallel softmax distributions and mix them with learned weights. This allows the effective output rank to scale as &lt;code&gt;K × d&lt;/code&gt; rather than just &lt;code&gt;d&lt;/code&gt;. Yang et al.'s own proposed solution — it works, but adds inference cost proportional to &lt;code&gt;K&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tied input/output embeddings&lt;/strong&gt;: An interesting side effect: tying the input embedding matrix to the output matrix (a widely used trick that reduces parameter count) actually &lt;em&gt;helps&lt;/em&gt; with the bottleneck in some configurations, because the input embeddings encode richer token-token relationships that the output projection then inherits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mixture of Experts (MoE)&lt;/strong&gt;: When different experts activate for different inputs, the effective expressiveness of the output stage scales with the number of active experts, partially relaxing the rank constraint. This is one underappreciated reason MoE models can punch above their activated-parameter weight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Larger hidden dimensions in the final layers&lt;/strong&gt;: Some architectures deliberately widen the final few transformer blocks or use a different (wider) projection head, recognising that the bottleneck is sharpest at the output stage.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Means for Practitioners
&lt;/h2&gt;

&lt;p&gt;If you're fine-tuning a base model and finding that validation loss plateaus at a value that seems unreasonably high for the task, the bottleneck may be architectural rather than a data or training issue. This is more likely to bite you when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your task requires fine-grained token-level discrimination across a large vocabulary (code generation, multilingual tasks)&lt;/li&gt;
&lt;li&gt;You're working with a model whose hidden dimension is small relative to vocabulary size&lt;/li&gt;
&lt;li&gt;You've added vocabulary tokens (domain-specific terms) without adjusting the output architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix is rarely "train longer." It's either increasing &lt;code&gt;d&lt;/code&gt;, applying output factorisation, or accepting that the model has a structural ceiling on its token distribution expressiveness.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bigger Picture
&lt;/h2&gt;

&lt;p&gt;The softmax bottleneck is a clean example of a class of architectural constraints that don't show up in parameter counts or FLOP estimates, but which fundamentally cap what a model can express. The field tends to fixate on scaling laws — more data, more compute, better performance — and those laws are real. But they operate within architectural envelopes. When you're near the ceiling of one of those envelopes, more compute doesn't help.&lt;/p&gt;

&lt;p&gt;Understanding &lt;em&gt;where&lt;/em&gt; the ceilings are is what separates architecture intuition from benchmark-chasing.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>deeplearning</category>
    </item>
    <item>
      <title>Lost in the Middle: Why LLMs Quietly Ignore the Centre of Their Own Context Window</title>
      <dc:creator>Vikrant Shukla</dc:creator>
      <pubDate>Mon, 11 May 2026 04:33:36 +0000</pubDate>
      <link>https://dev.to/haltonlabs/lost-in-the-middle-why-llms-quietly-ignore-the-centre-of-their-own-context-window-53am</link>
      <guid>https://dev.to/haltonlabs/lost-in-the-middle-why-llms-quietly-ignore-the-centre-of-their-own-context-window-53am</guid>
      <description>&lt;p&gt;Every time you hand a long document to an LLM and ask it to summarise or answer a question, something quietly goes wrong. The model reads the whole thing — or appears to — but its answers disproportionately reflect what was at the beginning and the end. Whatever sat in the middle? Largely ignored.&lt;/p&gt;

&lt;p&gt;This isn't a rumour. It was rigorously documented in a 2023 paper titled &lt;em&gt;"Lost in the Middle: How Language Models Use Long Contexts"&lt;/em&gt; (Liu et al., Stanford/UC Berkeley), and it remains one of the most practically important — and underappreciated — findings in applied LLM science.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shape of the Problem
&lt;/h2&gt;

&lt;p&gt;The researchers ran a controlled experiment: they placed the answer to a multi-document QA question inside a set of retrieved documents, then varied &lt;em&gt;which position&lt;/em&gt; the relevant document occupied — first, middle, or last. Performance dropped sharply when the relevant document was positioned in the middle of the context, even when the total context length was well within the model's stated window.&lt;/p&gt;

&lt;p&gt;The performance curve is U-shaped: high accuracy when the answer is near position 1 (beginning) or the final position, with a pronounced dip for everything in between. On some configurations, accuracy in the middle fell by 20+ percentage points compared to the edges.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does This Happen?
&lt;/h2&gt;

&lt;p&gt;The mechanism is rooted in how attention distributes across long sequences. Two forces pull in opposite directions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recency bias&lt;/strong&gt; — The final tokens are closest to where the model is generating its next token. In autoregressive transformers, recent tokens tend to receive higher attention weights because they're both positionally proximate and because many training tasks (next-token prediction, instruction following) implicitly reward sensitivity to recent context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primacy bias&lt;/strong&gt; — The very first tokens in a prompt — especially system instructions — receive unusually high attention during pre-training and fine-tuning because they set the conversational frame. Instruction-tuned models are heavily conditioned on treating the beginning of context as authoritative.&lt;/p&gt;

&lt;p&gt;The middle gets neither benefit. It's not recent enough for recency bias, and it wasn't there when the model was learning to follow instructions. In the attention score distribution, middle-sequence tokens often receive lower aggregate attention than their informational value warrants.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Means in Practice
&lt;/h2&gt;

&lt;p&gt;If you're building a RAG pipeline, this has concrete implications for your retrieval and context construction strategy:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reranking matters more than retrieval order.&lt;/strong&gt; A retriever that returns the most relevant chunk in position 3 of 5 will underperform the same retriever that puts that chunk at position 1 — even if the model technically "sees" all five. Getting retrieval order right isn't just aesthetics; it's accuracy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't bury your needle.&lt;/strong&gt; If you're doing something like "here are 10 excerpts, answer based on them," and the answer lives in excerpt 6, you're playing against the model's attention distribution. Front-load or back-load your most relevant context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The "more context = better" assumption breaks down.&lt;/strong&gt; Adding more retrieved chunks to a prompt can actually reduce accuracy if it pushes the relevant chunk deeper into a crowded middle. Precision of retrieval often beats recall of retrieval for this reason.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Longer context windows don't fix it.&lt;/strong&gt; The effect persists in models with 128K+ context windows. The architecture hasn't changed; only the capacity has. A 1M-token model still has a U-shaped attention distribution. The middle is just a much bigger valley.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does Instruction Tuning Help?
&lt;/h2&gt;

&lt;p&gt;Somewhat. Models fine-tuned explicitly to scan entire contexts (e.g., with long-document QA training data) show a shallower U-curve. Anthropic's Constitutional AI training and similar techniques that emphasise careful reading do push some improvement. But the effect doesn't disappear — it attenuates.&lt;/p&gt;

&lt;p&gt;There's also a prompt-engineering mitigation: explicitly instructing the model to "carefully consider all documents before answering" or "pay equal attention to all parts of the provided context" has been shown to partially counteract primacy/recency bias, likely by activating fine-tuned attention-distribution behaviour. It's not a fix, but it's free.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Deeper Lesson
&lt;/h2&gt;

&lt;p&gt;This finding is a good reminder that LLMs don't "read" context the way a human reads a document — scanning linearly, building a uniform mental model. They process all tokens in parallel, but the attention mechanism creates an implicit weighting that's shaped by training distribution, position, and architecture. The model's nominal context window is the ceiling; its &lt;em&gt;effective&lt;/em&gt; context is shaped by where you put things.&lt;/p&gt;

&lt;p&gt;If your application depends on the model reliably using specific information — legal clauses, numerical specs, code sections — position is not neutral. Put critical content at the edges, rerank your retrieval results before injection, and don't assume that visible-in-context means attended-to.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>deeplearning</category>
    </item>
    <item>
      <title>I built a local proxy to track exact LLM API costs per project</title>
      <dc:creator>Vikrant Shukla</dc:creator>
      <pubDate>Fri, 08 May 2026 17:16:11 +0000</pubDate>
      <link>https://dev.to/haltonlabs/i-built-a-local-proxy-to-track-exact-llm-api-costs-per-project-1j82</link>
      <guid>https://dev.to/haltonlabs/i-built-a-local-proxy-to-track-exact-llm-api-costs-per-project-1j82</guid>
      <description>&lt;p&gt;The problem was simple: I run a small software studio that builds &lt;br&gt;
client work heavily using Claude. Every project ended with the same &lt;br&gt;
awkward conversation — "what did the AI actually cost?"&lt;/p&gt;

&lt;p&gt;Token estimates drift from the real bill. Nothing attributed costs &lt;br&gt;
per project. I was either undercharging or handwaving, neither of &lt;br&gt;
which builds client trust.&lt;/p&gt;

&lt;p&gt;So I built Halton Meter.&lt;/p&gt;
&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;Halton Meter is a local mitmproxy-based daemon that intercepts &lt;br&gt;
outbound LLM API traffic, attributes each request to a project, &lt;br&gt;
computes exact cost from published pricing, and writes everything &lt;br&gt;
to a local SQLite database. Nothing about how you call the API changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pipx &lt;span class="nb"&gt;install &lt;/span&gt;halton-meter
halton-meter init &lt;span class="nt"&gt;--apps&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three processes come up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Edge listener on &lt;code&gt;127.0.0.1:8081&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;proxy interceptor on &lt;code&gt;127.0.0.1:8090&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Loopback API on &lt;code&gt;127.0.0.1:8765&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every LLM API call you make — via the Anthropic SDK, OpenAI SDK, &lt;br&gt;
raw HTTP, whatever — gets intercepted, tagged, costed, and logged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a proxy and not an SDK wrapper?
&lt;/h2&gt;

&lt;p&gt;SDK wrappers only catch calls you make directly. They miss ChatGPT, &lt;br&gt;
Gemini Code Assist, and anything going through a tool you don't &lt;br&gt;
control. A proxy captures everything on the wire without touching &lt;br&gt;
your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project attribution
&lt;/h2&gt;

&lt;p&gt;The daemon attributes each request using a three-step chain:``&lt;/p&gt;

&lt;p&gt;Claude Code sessions, scripts, notebooks, and direct SDK calls all &lt;br&gt;
get attributed correctly with zero code changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Terminal report
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;halton-meter report&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30j2q6zxes17avn2k4tj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30j2q6zxes17avn2k4tj.png" alt=" " width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Breakdown by project, model, and date. Numbers come directly from &lt;br&gt;
the provider's published pricing — no estimates, no hidden margins.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's supported
&lt;/h2&gt;

&lt;p&gt;Six adapters across four providers: Claude, OpenAI, Gemini, and Grok. &lt;br&gt;
Direct API surfaces and OAuth surfaces (ChatGPT, Gemini Code Assist) &lt;br&gt;
both intercepted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local only
&lt;/h2&gt;

&lt;p&gt;No cloud. No tracking. API keys never leave your machine. Everything &lt;br&gt;
lives in &lt;code&gt;~/.halton-meter/db.sqlite&lt;/code&gt;. The bundled dashboard is open &lt;br&gt;
source (Apache 2.0) and runs locally.&lt;/p&gt;




&lt;p&gt;Docs and full architecture at &lt;a href="https://haltonmeter.com" rel="noopener noreferrer"&gt;haltonmeter.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Happy to answer questions on the proxy architecture, the attribution &lt;br&gt;
chain, or the cost calculation in the comments.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>openai</category>
      <category>gemini</category>
    </item>
  </channel>
</rss>
