Building LLM applications rarely goes as smoothly as the demo. You set out to automate email summaries or extract structured data, but once you move past toy examples, the system starts to miss the mark in ways you didn’t anticipate. Hamel Husain (OpenAI, formerly Airbnb and GitHub) and Shreya Shankar (UC Berkeley) have seen this pattern across more than 35 companies and 4,500 trained engineers. Their Three Gulfs framework, excerpted here from their book Evals for AI Engineers, names the points where LLM-powered products most often break down.
The framework is designed for engineers already shipping AI: you have a trained model, now you’re building prompts and agent logic around it, and you need to verify that its outputs actually meet your product’s goals. Each step—defining objectives, writing instructions, and validating behaviour—introduces its own set of challenges. The Three Gulfs model gives you a way to spot and address these systematically.
Where LLM Application Development Breaks Down
The Three Gulfs are:
- Comprehension: Do you understand what your data really looks like—and how your LLM behaves on it?
- Specification: Can you make your requirements explicit enough that the model and agent logic consistently follow them?
- Generalisation: Does your solution hold up when it meets the full variability of real-world inputs?
Each gulf is a failure point with its own diagnostic and mitigation strategies.
The Gulf of Comprehension: Know Your Data
The first gulf is between you (the developer) and the data. If you only sample clean, simple inputs when designing your prompts, you risk building against an idealised version of the problem. The real data—forwarded emails, multilingual signatures, ugly formatting—will break brittle instructions. The same applies to outputs: if you only check a few good examples, you’ll miss recurring mistakes like pulling the wrong sender or copying boilerplate into summaries. Bridging this gulf means developing scalable ways to characterise both your inputs and outputs, so you aren’t blindsided by edge cases.




