Bahgat

Deep Dives

System design, AI engineering, and business finance — complex topics explained simply with interactive visuals.

Finance Software AI Coming Soon

AI

LLM engineering, memory patterns, and building AI applications

6 posts
LLM Engineering

What Changed?
How Modern LLMs Evolved Beyond the Original Transformer

RoPE, RMSNorm, GQA, SwiGLU, Flash Attention, MoE — every upgrade from the 2017 transformer to today's models, explained by what it replaced and why.

Bahgat Bahgat Ahmed · March 2026 · 30 min read
2017
Upgrade
MoE
2026
LLM Engineering

RAG & Agents:
How LLMs Find Answers & Take Action

From keyword search to autonomous agents — retrieval pipelines, vector databases, chunking strategies, tools, planning, memory, and the safety guardrails that keep AI from going rogue.

Bahgat Bahgat Ahmed · October 2025 · 20 min read
Retrieve
Generate
Verify
Agent
LLM Engineering

Is It Actually Working?

Why "94% accuracy on the benchmark" almost hospitalized patients, why self-correction makes models worse, and how to build evaluation that catches what benchmarks miss.

Bahgat Bahgat Ahmed · November 2025 · 22 min read
Build
Evaluate
Measure
Ship
LLM Engineering

When RAG Isn't Enough

Your RAG retrieves the right documents, but the model still gets the answer wrong. Sometimes the model needs to actually learn your domain — and that changes everything.

Bahgat Bahgat Ahmed · December 2025 · 20 min read
RAG
Fails
Fine-Tune
Works
LLM Engineering

AI Memory:
From Stateless to Context-Engineered

Your chatbot forgets the user's name on message 48. A triage bot drops "allergic to penicillin" on message 12. These aren't edge cases — they're what happens when memory is an afterthought.

Bahgat Bahgat Ahmed · January 2026 · 25 min read
Context
Memory
Retrieve
Engineer
LLM Engineering

Teaching Agents to Remember

Your AI agent forgets preferences, overwrites history, and can't answer "what changed?" From knowledge graphs to temporal awareness — the complete guide to agent memory.

Bahgat Bahgat Ahmed · February 2026 · 35 min read
Agent
Graph
Temporal
Remember

The Blog Map

All posts by topic, reading paths by goal, and what's coming next.

10 Published
19 Coming Soon
6 Paths
Explore the Map