Skip to content
A AhsanLab.Tech

Category

AI

Applied AI, LLM workflows, agents, and tooling.

← All articles
AI 13 min

Connecting OpenAI to a Real Backend: Lessons From SEO Automation

The naive version worked perfectly on fifty pages and failed four ways on twelve thousand — none of them about prompt quality. Wiring a model into a real backend is a batch-processing problem with an expensive, rate-limited, non-deterministic function in the middle, and it needs everything batch processing always needed.

May 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