Writing
Field notes from building and scaling production systems — AI engineering, backend practice, database internals, and system design, written to be the reference I wish I'd had.

Database8 min read
I Had the Index. My Query Was Still Timing Out.
A Postgres RPC with the exact right index still threw 57014 statement timeouts at 1.4M calls a day. The index was fine — the predicate wrapped the column in arithmetic and made it unusable.
PostgreSQLIndexingPerformanceProduction Incident

AI Engineering8 min read
Your RAG System Is Lying to You: Index Questions, Not Chunks
Standard RAG returned the wrong page with a confident 0.753 score. A version that scored lower — 0.694 — returned the right one. Here's RAG's silent failure mode, why similarity scores can't be trusted, and the fix I shipped as QIndex.
RAGEmbeddingsRetrievalOpen Source