Mohamed Khaled.

Building AI products for a dual audience: humans and the agents that read for them.

Lessons

All lessons →

  • Indirect prompt injection: the under-defended attack

    Indirect prompt injection: the under-defended attack

    Lesson 17 — the user never typed anything malicious. The poisoned PDF landed in the document feed last week. The retrieval pipeline did its job. The model followed instructions. The architect’s job is the validator that catches it. Indirect prompt injection — through the document, not the user Direct prompt injection — a user typing…

  • Cost: per task, not per token

    Cost: per task, not per token

    Lesson 16 — cost has to be measured per task, not per token. A model that’s cheap-per-token but retries ten percent of the time is not actually cheap. This is the calculator that makes the unit economics visible before you ship. Why the rate-card lies Every model provider quotes price-per-million-tokens. gpt-4o-mini is $0.15 in /…

  • Observability: the trace that explains a decision

    Observability: the trace that explains a decision

    Lesson 15 — in lesson 09 the trace was the query and the model’s answer. In production it is twelve more fields, and most of them are also the audit log. Same data; new lens. From “what did it say” to “why did it say it” Lesson 09 showed fifteen RAG traces — each one…

Insights

All insights →

Products

All products →

Featured · Live on WordPress.org

Mokhai — Agent Readiness Kit

Make your site legible to AI agents: a clean Markdown twin of every page, a curated /llms.txt, MCP-exposed operations, and a 0–100 Context Score.

WordPress.org · GitHub · Details →

  • LLM Doctor

    A PyPI package that diagnoses broken LLM-analytics ingestion into PostHog — names the exact failure mode, then repairs spans in flight.

  • TriageFast

    API-first feedback triage that sits between your support inbox and your issue tracker — classifying type, severity, title, and summary automatically. Routes to GitHub Issues, Linear, Notion, or a webhook. Free tier: 100 triages/month.

  • evalspec

    Gold-label evaluation for LLM agents — define correct behavior per question, measure what the model actually did, gate regressions in CI.