Skip to content

Writing

Engineering notes

Working notes on the parts of AI systems that are hard: control flow, retrieval quality, output contracts and evaluation.

Nothing published yet

I’d rather this section were empty than padded. The essays below are the ones I’m actually working on — each one comes out of a problem I hit while building something on this site. Until they’re finished, the case studies in Work carry the same reasoning in more depth.

Want to know when the first one lands? Get in touch.

In progress

  • Designing Reliable AI Agents

    Why agent failures are almost always control-flow failures, and what changes when you model an agent as an explicit graph rather than a prompt loop.

    • Agents
    • Reliability
    • LangGraph
  • What Breaks in Production RAG

    Chunk boundaries, embedding mismatches, stale corpora and unverifiable citations — the four failures that account for most bad answers, and how each one is fixed.

    • RAG
    • Retrieval
    • Vector search
  • RAG vs Fine-Tuning: Choosing on Constraints, Not Preference

    A decision framework based on how often knowledge changes, whether answers must be attributable, and what the cost of being wrong is.

    • RAG
    • Fine-tuning
    • Architecture
  • Treat Model Output as an Untrusted Interface

    Schema-constrained responses move an entire class of parsing bugs from deep inside application code to a single validation error at the boundary.

    • LLM applications
    • Type safety
    • Structured output
  • Evaluating AI Systems Without a Ground Truth

    How to build a question set, establish a retrieval baseline and make prompt changes provable instead of anecdotal.

    • Evaluation
    • Testing
    • Observability
  • Long-Term Memory for AI Agents

    What an agent should remember between sessions, where that memory should live, and why forgetting has to be designed as deliberately as recall.

    • Agents
    • Memory
    • Architecture

Contact

Have an AI product or workflow worth building?

Send me the problem — not the spec. If it’s a fit I’ll tell you how I’d approach it; if it isn’t, I’ll say so.

Faisalabad, Pakistan · PKT (UTC+5) · Working remotely