Writing & Notes
Essays and walkthroughs on LLMs, retrieval, AI agents and the engineering around them. Also published on Medium.
Your RAG Found the Right Document. So Why Is the Answer Still Wrong?
I read 106 wrong answers where retrieval worked. Half came from old and new versions of the same page, a fifth from the right document arriving without the right passage.
LLMs · AI
I Tested 10 Ways to Stop an AI Chatbot From Lying. The Fix Wasn’t the AI.
Better search, citations, fact-checking and confidence thresholds left accuracy flat. Telling it which documents were genuine and current took it from 77% to 93%.
LLMs · AI
We Costed an AI Audit System Two Ways. The Fine-Tuned Model Won, But Not for the Reason Everyone Says.
A real cost breakdown for building document-heavy AI systems in the UK and Europe, with September 2026 prices.
AI Agents · LLMs · GDPR · AI
Stop Chasing the Best LLM — Find the Bottleneck Instead
I have recently been seeing some version of the same question. Should I use GPT or Claude? Is Gemini better than DeepSeek? Which embedding model has the highest MTEB score? What’s the fastest…
AI Agents · LLMs · ChatGPT · AI
Iron Man’s Jarvis Is Almost Ready — And It Explains the Evolution of AI
When I first started my AI journey, shaving half a point off the error rate on MNIST was a legitimate research event. Many people built careers on incremental gains against benchmarks most outsiders…
AI Agents · LLMs · Machine Learning · AI
Building an Agentic RAG System from Scratch
By the end of this article, you’ll have implemented an agentic RAG system twice: once from scratch to understand every moving part, and once with LlamaIndex and LangGraph to see how production…
AI Agents · LLMs · Generative AI · AI
Agentic RAG vs. RAG: Why Your Retrieval Pipeline Needs to Start Reasoning
A support agent asks your AI assistant why their invoice changed this month. Your RAG pipeline embeds the question, pulls back a generic help article about how billing works, and confidently tells…
AI Agents · Chatbots · LLMs · AI
Functions in JavaScript
A function is a block of JavaScript code that is defined once but may be executed, or invoked, any number of times. JavaScript functions are parameterized (function definition may include a list of…
JavaScript
JavaScript Hoisting
When a variable is declared with var, the declaration is lifted up or hoisted to the top of the enclosing function. The initialization of variable remains where it is, but the definition of the…
JavaScript