AI & Development Insights

Expert insights on AI development, LLM integration, and full-stack architecture. Learn from real-world experiences and proven methodologies.

Subscribe to RSS
33 articles published

Featured Articles

Deep dives into cutting-edge AI and development topics

11 min read

As of This Month, EU Law Says Your AI Output Has to Mark Itself

Article 50 of the EU AI Act took effect on August 2, and it says any image, audio, video, or text your system generates has to carry a machine-readable mark that it was made by AI. A checkbox in your UI does not satisfy that. The mark has to live inside the file, survive a re-upload, and be verifiable. Here is how to build that into your generation pipeline as a gate, not a bolt-on.

VViral Ruparel
11 min read

Your Agent Called the Same Tool Seventy Times and Billed You for It

A ReAct-style agent calls the same search tool, gets the same unhelpful result, decides another identical call will help, and does it again. Seventy times. It never crashes and never finishes, it just burns tokens going nowhere until a timeout or your bill catches it. A hard step ceiling is a backstop, not a fix. What you want is a guard that notices the agent has stopped making progress and breaks the cycle in seconds.

VViral Ruparel
10 min read

You Installed a Skill and Your Agent Will Run Whatever Is Inside

You pulled a skill off a registry, your agent read its instructions, and it is now ready to execute whatever code shipped in the folder. Nobody signed it, nobody diffed it, and the manifest that says "read-only" is just a text file the author wrote. Treat every third-party skill as untrusted code and put a gate in front of it: pin and hash it, check what it actually does against what it claims, and run it in a box that can only reach what it declared.

VViral Ruparel

All Articles

33 articles
All Formats
article
tutorial
case study
guide
opinion
11 min

As of This Month, EU Law Says Your AI Output Has to Mark Itself

Article 50 of the EU AI Act took effect on August 2, and it says any image, audio, video, or text your system generates has to carry a machine-readable mark that it was made by AI. A checkbox in your UI does not satisfy that. The mark has to live inside the file, survive a re-upload, and be verifiable. Here is how to build that into your generation pipeline as a gate, not a bolt-on.

Compliance
AI Governance
11 min

Your Agent Called the Same Tool Seventy Times and Billed You for It

A ReAct-style agent calls the same search tool, gets the same unhelpful result, decides another identical call will help, and does it again. Seventy times. It never crashes and never finishes, it just burns tokens going nowhere until a timeout or your bill catches it. A hard step ceiling is a backstop, not a fix. What you want is a guard that notices the agent has stopped making progress and breaks the cycle in seconds.

AI Agents
Reliability
10 min

You Installed a Skill and Your Agent Will Run Whatever Is Inside

You pulled a skill off a registry, your agent read its instructions, and it is now ready to execute whatever code shipped in the folder. Nobody signed it, nobody diffed it, and the manifest that says "read-only" is just a text file the author wrote. Treat every third-party skill as untrusted code and put a gate in front of it: pin and hash it, check what it actually does against what it claims, and run it in a box that can only reach what it declared.

AI Agents
Security
11 min

Your Agent Passes Every Eval and Still Fumbles Real Conversations

Your eval suite is green. Every case passes. Then a real user has a six-turn conversation with your agent and it forgets what they said in turn one, asks for information they already gave, and quietly breaks a policy under pressure. Single-shot evals test a single prompt. Production is a conversation. Drive your agent with a simulated user and you can test the thing users actually do.

AI Agents
Evals
12 min

A Customer Hit a Bug Your Agent Will Never Reproduce

A user sends you a screenshot of your agent doing something wrong. You have the logs, you have the trace, and you still cannot make it happen again, because the model sampled differently and a tool returned something new. You are debugging a ghost. Record every source of nondeterminism during the run and you can replay that exact failure on demand.

AI Agents
Debugging
11 min

Your RAG Cites a Source That Does Not Say That

Your retrieval is good. The right chunks come back, the citation links resolve, and the answer reads clean. Then a user clicks the citation and the document says nothing of the kind. The model wrote a confident claim, stapled a real source to it, and shipped. A grounding gate catches that before the user does.

RAG
Hallucination
11 min

Your Agent Makes the User Watch a Spinner for 20 Seconds

Your agent does real work before it answers: it searches, calls three tools, reasons about the results, then writes a reply. From the user's side that is twenty seconds of a spinning circle and no idea whether anything is happening. Stream the steps and the tokens as they land, and the same slow agent starts to feel fast.

AI Agents
Streaming
11 min

Your LLM Judge Prefers the Longer Answer

You wired an LLM up as the grader for your evals, and now every release looks green. The problem is the judge is not scoring quality, it is scoring length, order, and answers that sound like its own. Fix the three biases that matter and calibrate the judge against human labels, so the number your pipeline gates on actually means what you think it means.

Evals
LLM-as-judge
11 min

Your Agent Retried and Charged the Card Twice

A tool call times out, your agent retries it, and the customer gets billed twice because the first request went through before the response came back. The fix is not fewer retries. It is idempotency keys on every write tool, so a repeated call with the same key returns the first result instead of doing the work again.

AI Agents
Reliability
11 min

Your Agent Has 200 Tools and Picks the Wrong One

Connect enough MCP servers and your agent carries hundreds of tool definitions into every turn. It pays for all of them on every request and still reaches for the wrong one, because the model is choosing from a wall of near-duplicate schemas. The fix is to stop shipping the whole toolbox and retrieve the handful that matches the task instead.

AI Agents
Tools
10 min

Your Agent Kept Working After the User Left

A user closes the tab and your agent keeps going: three tool calls in flight, two subagents still reasoning, tokens still burning for an answer nobody will read. The fix is a deadline that every layer respects and a cancel that propagates down the whole tree, tearing in-flight work down cleanly instead of leaving it to finish alone.

AI Agents
Reliability
10 min

Let Your Agent Ask Before It Does the Irreversible Thing

Most of what an agent does is safe to let run. A few things are not: the refund, the production deploy, the email to a customer. The answer is not to make the agent slower everywhere. It is an approval gate that pauses the run before the risky action, persists the pending decision, and resumes exactly where it stopped once a human says yes or no.

AI Agents
Reliability
10 min

Your Agent Just Leaked One Customer's Data to Another

Input defenses stop bad instructions from getting in. They do nothing about what your agent says on the way out. One generated reply that leaks another customer's data or makes a promise you never authorized is a message you cannot unsend. A fail-closed egress layer that checks every output before it ships is how you keep that message from ever leaving.

AI Agents
Security
10 min

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. Cheaper models and caching lower the average, but nothing stops the bill. A per-tenant spend ledger with the cap enforced before the call does.

LLM
Agents
10 min

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 needed one field. Now every turn after that re-pays for the whole blob. Offloading the payload to a store and keeping only a handle in context fixes both the cost and the window.

LLM
Agents
10 min

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. It then acts on the wrong one. This is agent drift, and it is a correctness bug, not a token bill. Here is how staleness-aware pruning fixes it.

LLM
Agents
10 min

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. The model already tells you which calls are independent. Running that batch concurrently collapses the wait to the slowest single call.

LLM
Agents
11 min

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. That gap is the confused deputy problem, and it is how a support agent ends up refunding an order the user was never allowed to touch. The fix is a fail-closed authorization check on every side-effectful call.

LLM
Agents
11 min

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. Plain logs will not tell you which step looped. A distributed trace built on OpenTelemetry's GenAI conventions shows you exactly where the tokens went.

LLM
Agents
11 min

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. Structuring the prompt so the provider reuses its KV cache cuts both, and one wrong byte quietly turns it all off.

LLM
Agents
11 min

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. Backpressure, bounded concurrency, and circuit breakers keep the fan-out from taking down the systems it depends on.

LLM
Agents
10 min

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. Durable execution fixes that with checkpoints, replay-safe steps, and idempotency keys.

LLM
Agents
10 min

Your Agent Answers the Same Question Fifty Times a Day

Most of what your agent gets asked, it has already answered. A semantic cache reuses those answers on near-identical questions, cutting cost and latency, as long as you build the guardrails that stop it from serving the wrong one.

LLM
Caching
10 min

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. Here is how to get schema-valid output every time with a validation gateway that parses, repairs, and fails loudly.

LLM
Structured Output
10 min

Your Agent Will Do Whatever the Web Page Tells It To

The moment your agent reads untrusted content and can also call tools, a hidden instruction in a web page or email can hijack it. Here is the containment strategy that keeps a landed prompt injection from doing damage.

AI Agents
Security
10 min

Your Agent Keeps Retrying a Tool Call That Will Never Work

Most agent failures in production are not bad reasoning, they are bad tool calls: wrong arguments, expired tokens, timeouts. Here is how to validate, classify, and recover from tool failures instead of retrying blindly.

AI Agents
Tool Calling
10 min

Your Agent Forgets You the Second You Close the Tab

LLMs are stateless, so every new session starts from zero. Here is how to give an agent persistent memory that recalls the right facts across sessions without bloating the context window or the token bill.

AI Agents
Agent Memory
10 min

Your Agent Is One Prompt Doing Six Jobs

A single LLM handling routing, retrieval, reasoning, and execution is easy to prototype and brittle in production. Here is when to break a monolithic agent into an orchestrator-worker architecture, and when not to.

AI Agents
Multi-Agent Systems
10 min

Your Agent Reads 150,000 Tokens Before It Sees the Request

Connect a dozen MCP servers to an agent and you pay for every tool definition on every turn, before the user has said a word. Here is why tool-calling bloats context and how the code execution pattern cuts it by orders of magnitude.

AI Agents
MCP
10 min

Your RAG Is Not Broken, Your Retrieval Is

When a RAG system gives a wrong answer, the model is usually not the problem. The right chunk never made it into the prompt. Here is how hybrid search and a reranking pass fix retrieval, with the code and the tradeoffs.

RAG
Retrieval
10 min

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. Here is how to build an eval gate that scores your LLM outputs and blocks regressions before they ship.

LLM
Evals
9 min

LLM Model Routing: Cut AI Costs Without Losing Quality

Sending every request to your most expensive model is the fastest way to burn budget. Here is a practical routing and cascade pattern that sends each request to the cheapest model that can actually handle it.

LLM
Model Routing
8 min

Context Compaction for Long-Running AI Agents

Long-running AI agents fail when context grows without bound, blowing up token costs, latency, and reliability. Here is how anchored summarization and server-side compaction keep agents cheap and coherent.

AI Agents
Context Engineering