Nobody Writes Code Anymore

Capítulo 16. Memory and Context

Part V. The Computer Plays Misha9 min · en inglés

16

Memory and Context

A huge library card catalogue in a tall hall: dozens of drawers pulled out at once, a man in a 1920s suit standing among them, back to us.illustration
A memory in which everything is kept equally vivid gets in the way of thinking. Luria observed one in Shereshevsky for about thirty years.

In the 1920s a newspaper reporter named Solomon Shereshevsky came to the laboratory of the young psychologist Alexander Luria. He had been sent by his editor, who had noticed that Shereshevsky took no notes at editorial meetings and yet repeated his assignments word for word afterwards. Luria began testing his memory and quite soon realised that he could not find its limits: Shereshevsky memorised tables of dozens of numbers, long series of meaningless syllables and formulas he did not understand, and reproduced them months and years later, in any order. Luria observed him for about thirty years and in 1968 wrote about him in The Mind of a Mnemonist, one of the strangest and saddest books in the history of psychology.

It is sad because his enormous memory turned out to be more of a misfortune for Shereshevsky. He had trouble understanding figurative meaning, because every word called up a vivid concrete image in him, and the images got in the way of grasping the thought. He got lost in long texts, where details overshadowed the main point. And he suffered from being unable to forget: unneeded tables and series of syllables went on standing before his eyes, and he tried to get rid of them in the most naive ways, writing down on paper what he wanted to forget so that his head could let it go.

A quarter of a century before Luria’s book, the Argentine writer Jorge Luis Borges invented a similar man. In the 1942 story “Funes the Memorious,” a young man, after a fall from a horse, begins to remember absolutely everything: every leaf on every tree, every cloud at every moment, every one of his memories of every memory. Funes remembers more than anyone in the world, and yet he is almost incapable of thinking. Borges explains why, in one of the most precise sentences ever written about memory: to think is to forget differences, to generalise, to abstract.


When developers talk about memory for AI agents, they most often mean a so-called vector database. It works like this: every piece of text, whether a document, a fragment of code or the record of a conversation, is turned by the program into a set of numbers that can be pictured as a point in a space of very many dimensions, with texts of similar meaning ending up close together. When the agent needs something, its question is also turned into a point, and the pieces nearest to it are found. This works well, and it is a very useful tool.

Tras entrar

El resto del libro es para quien ha entrado

Entra con INITE o crea una cuenta. Lleva un minuto, y el libro se abre aquí mismo.