Engineering for Bounded Cognition
The article reveals that humans can only hold about four things in their minds at a time, and their attention is narrow and fleeting. This limitation is starkly contrasted with the tens of millions of lines of code that underpin modern software systems. For instance, George Miller's 1956 paper "The Magical Number Seven, Plus or Minus Two" showed that the often-cited figure of seven things is likely a coincidence, and the actual number is around four. This disparity between human cognitive capacity and software complexity is a fundamental challenge in engineering.
The limitations of AI models, such as large language models, are similarly constrained. These models have a context window that limits how much information they can consider at one time, and their attention is unevenly distributed, with information in the middle of a long input being more likely to be missed. A study titled "Lost in the Middle" found that these models perform better when the required information is at the start or end of the input but worse when it's buried in the middle. This bounded cognition in silicon mirrors human limitations, with models losing their "thread" and making mistakes similar to those made by humans on their worst days.
The implications of these findings are significant for software engineering and AI development. The article suggests that good engineering is about designing systems that work within these cognitive limitations, rather than trying to overcome them. This involves strategies like giving precise names to concepts, drawing boundaries, and writing tests to reduce the mental load on developers and machines. By acknowledging and adapting to these limitations, engineers can build more robust and maintainable systems.
Key Takeaways
Human cognition is limited to holding about four things in mind at a time, which poses a significant challenge in software engineering.
Large language models have similar cognitive limitations, including a context window and uneven attention distribution.
Good engineering involves designing systems that work within these cognitive limitations, rather than trying to overcome them.
Strategies like precise naming, boundary drawing, and testing can help mitigate these limitations and improve system robustness.
About the Source
This analysis is based on reporting by Hacker News. Here is a short excerpt for context:
CommentsRead the original at Hacker News