Skip to main content
ahad.works

Writing & Architecture Notes

Engineering Blog

Field notes on Corrective RAG, hybrid retrieval, Model Context Protocol servers, streaming telemetry, and local LLM evaluation.

Latest Essay·Oct 12, 2026·3 min read

Inside Meridian: Corrective RAG, pgvector RRF, and <15ms Semantic Caching

How Meridian pairs a LangGraph 1.2 Corrective RAG loop with PostgreSQL tsvector + pgvector RRF fusion, cosine semantic caching, FastMCP tool discovery, guardrails, and automated RAGAS evaluation.

LangGraphCorrective RAGpgvectorFastMCP
Read article
Streaming LangGraph state updates to the browser in real time
Jul 15, 2026·4 min readLangGraphFastAPISSE

Streaming LangGraph state updates to the browser in real time

WebSockets add complexity you don't need for agent telemetry. An async FastAPI generator and the browser's native EventSource API is 30 lines of code that actually works.

We stopped writing custom tool schemas. We use MCP now.
Jun 5, 2026·4 min readMCPFastAPILangGraph

We stopped writing custom tool schemas. We use MCP now.

Every AI agent team eventually writes the same glue code: a tool registry, a schema validator, a context injector. Model Context Protocol replaces all of it with a standard your agent runtime already speaks.

Why pure vector search fails in enterprise RAG — and how RRF fixes it
May 10, 2026·6 min readRAGAzure AI SearchInformation Retrieval

Why pure vector search fails in enterprise RAG — and how RRF fixes it

Vector search fails on exact product codes, acronyms, and part numbers. Learn how combining BM25 keyword matching with dense vectors using Reciprocal Rank Fusion (RRF) and cross-encoder reranking boosts retrieval precision by +23%.

Mar 1, 2026·2 min readRAGLoRA/PEFTINT4 Quantization

Reproducing MiA-RAG Locally: +25% on NarrativeQA with INT4 LoRA & Ollama

Engineering report from reproducing Mindscape-Aware RAG (arXiv:2512.17220) locally using INT4-quantized LoRA-adapted MiA-Emb-8B, Qwen2.5-14B-Instruct via Ollama, 3-channel ChromaDB + BM25 + RRF retrieval, and a Streamlit LLM-as-a-judge harness.

Feb 10, 2026·7 min readLLMAgentic AIOn-Prem

How I Set Up an On-Prem Agentic AI Stack with Open-Source Embeddings and Fully Local Inference

A practical guide to building a fully on-prem agentic AI system using open-source embeddings and local LLM inference — no APIs, no cloud, complete data control.

Showing 6 of 6 articles