Skip to content
A AhsanLab.Tech

The archive

All articles

Notes, experiments, and write-ups from the AhsanLab workbench.

Architecture 16 min

Microservices Behind an API Gateway: A Real Case Study

Five services, one gateway, and the honest reason we split a Django app that was working fine. Service boundaries that survived, the two I drew wrong and pulled back, what belongs in a gateway and what must never, and the failure modes that only exist once a call can cross a network.

Apr 28, 2026
AI 15 min

The 940ms Voice Agent: Where Every Millisecond Goes

A conversation has a social latency budget, not a technical one — go past a second and people think the thing is broken. How a voice agent went from 1,530ms to 940ms to first audio, why every millisecond came from overlapping stages rather than speeding them up, the speculative optimisation that cost 38% more tokens for 60ms, and what a user hears when a dependency vanishes mid-sentence.

Apr 12, 2026
AI 14 min

Your AI System Is Failing Right Now and Nothing Is Alerting

On a Tuesday my RAG system got quietly worse. Every request returned 200, no alert fired, and the answers stayed fluent and confident while being subtly about the wrong thing. Why AI systems fail silently, what a trace must actually record, why the mean is a lie, and the forty-minute root cause that would have taken days.

Mar 27, 2026
AI 14 min

How Do You Know Your AI Got Worse? Build the Eval Set First

I opened a pull request that made my RAG system measurably worse and was completely certain it was an improvement. The build failed instead. What a golden evaluation pair actually contains, the four metrics that localise a failure, why 21% of my questions have no answer, how to pick a threshold from the noise floor, and the three of my own PRs it blocked.

Feb 24, 2026
AI 16 min

Inside the Agent Loop: How an AI Agent Actually Decides What to Do

My first agent made 41 tool calls to answer a question that needed two — and never threw a single error. The twelve lines an agent actually is, the five decisions inside the loop, why the tool schema is the real prompt, and the ten guardrails between a demo and something you would let near a customer.

Feb 9, 2026