Skip to main content

Stop calling LLM APIs directly

· 10 min read
Mangat Rai
Creator, Few-Shot Academy

Calling an LLM provider's SDK directly is a good way to build a prototype. Letting every product feature call that SDK directly is how a provider detail becomes an application architecture.

The distinction matters. “Stop calling LLM APIs directly” does not mean every team needs to install a commercial gateway. It means production code should call a boundary your application owns. Behind that boundary, you can make explicit decisions about providers, deadlines, errors, data policy, and degraded behavior.

Without it, adding a second API key gives you another provider. It does not give you a fallback.

MCP is done pretending agents are people

· 11 min read
Mangat Rai
Creator, Few-Shot Academy

MCP's own roadmap says the quiet part out loud: "MCP authorization assumes a person with a browser at consent time." Then, one sentence later, it admits that assumption is already wrong. "Increasingly the caller is an agent: a cloud workload with its own identity, acting for a user who isn't present, or spawning sub-agents that should get narrower authority than their parent." That's not a footnote. It's one of five priority areas the Core Maintainers named for the next spec release, published August 22, 2026, and it's the only one with a working group that doesn't exist yet.

MCP just went stateless

· 10 min read
Mangat Rai
Creator, Few-Shot Academy

MCP's HTTP transport has worked like a phone call since Streamable HTTP shipped in March 2025: a client dials in with initialize, the server answers and hands back an Mcp-Session-Id, and every request after that stays pinned to whoever picked up. Hang up on the wrong server instance and the whole conversation is gone with it. Sixteen months later, the 2026-07-28 spec revision rips the phone call out entirely. MCP is now stateless. Every request carries everything it needs, and any healthy server behind a load balancer can answer it cold.

Frontier models don't make safer agents

· 4 min read
Mangat Rai
Creator, Few-Shot Academy

DeepSeek-V3.2 gets hijacked into an unauthorized tool call 75% of the time under its worst attack framing. GPT-4.1 hits 75.6%. GPT-5, the strongest model in the lineup, still gets hijacked 59% of the time under a different framing. These aren't obscure or under-trained models. They're the frontier, tested by a new benchmark called ToolHazard, and none of them come close to holding.

Managed AI platforms trade one lock-in for another

· 7 min read
Mangat Rai
Creator, Few-Shot Academy

A 2026 survey of 100 enterprise CIOs found 37% now run five or more AI models in production, up from 29% the year before. A separate Zapier survey of enterprise leaders, published the same year, found 81% at least somewhat worried about depending too heavily on one AI vendor, and 47% said losing their primary vendor would disrupt a real business function. That fear is exactly what "model platforms" like Amazon Bedrock, Azure OpenAI Service, and Google's Vertex AI Model Garden are sold as the fix for: one integration, many models, switch providers without rewriting your app.

It's a good pitch. It's also not quite true. Routing your calls through a hyperscaler's managed layer doesn't remove a dependency, it relocates one. You stop depending on a single model provider and start depending on a single cloud provider instead, and that second dependency is usually stickier than the first.

OWASP checked its LLM Top 10 against real incidents

· 6 min read
Mangat Rai
Creator, Few-Shot Academy

Every year OWASP's LLM Top 10 has been built the same way: ask hundreds of practitioners what scares them, rank by the vote. For the 2026 release, published August 4, 2026, they did something new. They pulled 7,714 real incidents from public vulnerability databases and an AI-harm database, classified 6,639 of them, and checked whether what practitioners fear actually matches what goes wrong in production. It mostly did. Where it didn't is the interesting part.

Every major AI lab shipped an agent model this week

· 8 min read
Mangat Rai
Creator, Few-Shot Academy

For the last two years, open-weight model releases have mostly been a China story: DeepSeek, Alibaba's Qwen team, Moonshot AI's Kimi, Zhipu's GLM, MiniMax, all shipping frontier-class open weights on a cadence Western labs haven't matched. This week Meta broke that pattern, twice, in one release. It shipped Muse Glimmer, a 30-billion-parameter model with Apache 2.0 weights on Hugging Face, alongside Muse Spark 1.2, a hosted sibling built for long coding sessions. The interesting part isn't that Meta released open weights again. It's that, by Meta's own benchmarks, Glimmer beats two other well-known open-weight models roughly its own size at the kind of multi-step, tool-using tasks that used to separate the labs with the biggest budgets from everyone else.

OpenAI's cyber-hunting model just found a real Chrome vulnerability

· 7 min read
Mangat Rai
Creator, Few-Shot Academy

Two things happened in cybersecurity AI within days of each other this month, and they're really the same story told from opposite ends. OpenAI shipped GPT-5.6-Cyber, a model built to say yes to the kind of exploit-development requests a normal model refuses, and it immediately found a real, chainable vulnerability pair in Chrome. Separately, a team of academic researchers published CyberLLM (arXiv:2608.06651), a framework built around the opposite question: once an LLM is capable enough to act autonomously on a real system, what actually stops it from doing damage?

A new toolkit unifies three ways to catch a hallucination

· 9 min read
Mangat Rai
Creator, Few-Shot Academy

Our Chapter 8: Evaluating What You Built lab uses a second LLM call as a judge: ask the judge model to compare a generated answer against a reference answer and reply PASS or FAIL. It works, but it's one technique among several, and the lab's own real output caught the judge writing PASS on the first line while its own one-sentence explanation said the answer "fails to provide accurate information about its location." A team of researchers built a toolkit, SIRIN (arXiv:2608.00033), around exactly that gap: instead of picking one hallucination-detection method and living with its blind spots, run three unrelated methods on the same answer and see where they agree.

NVIDIA shows KV caches can move between different-sized models

· 9 min read
Mangat Rai
Creator, Few-Shot Academy

A week ago on this blog we called agent memory its own product category: LangMem, Mem0, Zep, all racing to give agents something that remembers past turns. That's memory as recall, deciding what's worth keeping. There's a more literal kind of memory sitting underneath all of it: the notes a model takes while it's reading your prompt, called the KV cache. Normally those notes get thrown away the moment you send that same conversation to a different model. While researching prompt caching for our Token & Cost Management chapter, I found a new paper out of NVIDIA, "Cross-Model KV Cache Transfer in LLM Families" (arXiv:2608.03893), that treats that waste as a problem worth solving instead of just how things are.