The Generative Library

28 July 2021
28 Jul 2021
New York, NY
7 mins

This is a short story about AI, which I would usually write and share on my second blog linus.coffee. But I liked this one enough, and thought it was interesting enough, that I’ve opted to publish it here, instead.


The town was called Aperia. A quiet but sophisticated sprawl of high-ceilinged atria and modest houses in a dry patch of land overlooking the Mediterranean. From a distance, Aperia could have fit in naturally to either the eighteenth century or the twenty-second. It seemed to live a little outside time, petrified into a timeless specimen like aged parchment under the warmth of the dry sun.

The streets of Aperia traced the outlines of a grid like in many other towns of this size, a main artery boulevard running through the most populous districts, with smaller, veiny roads extending through the neighborhoods into the outskirts. There was one road into the city, and one road out. They met at the mouth of the main boulevard, so that from high enough up in the sky the town looked like a leaf perched atop two branches that fused together at a point.

Neither of those roads into and out of Aperia were used much at all. The residents mostly subsisted on crafts of their own, exchanging groceries and lumber grown in the area for glass and textile fashioned within the same city borders. Occasionally, a mail carrier would arrive, a few letters in tow from the outside world. And on even rarer occasion still, I would see a scholar stumble into those quiet roads, eyes wide, as if they’d stumbled into a page out of a book of myths.

Those scholars, dear listener, are the subject of my story, for they were the ones I was bound to serve.

Such a scholar arrived only once every few years. I never understood why so few of them ever showed up, but I infer the journey here was simply too treacherous for most. The scholar would hardly seek a drink of water or a bench to rest before continuing on ever so deliberately down the city’s wide streets, passing shop after shop and home after home, in pursuit of one particular street, about three-quarters of the way down the road.

The street bent sharply right after diverging from the main thoroughfare, then ascended into the mountains at a gradual slope. The scholar would follow the path upwards as the green and brown of vegetation slowly replaced the white and beige of civilization, until they came to the end of the road, where the trail morphed into the mouth of a cave.

It was there that I greeted these scholars and welcomed them further into the cave, their steps trailing audibly behind my own. During the short journey further inwards, I would tell them the story of the Great Library. The Great Library, of course, was what lay within the cave – the library the scholars sought, and the library whose guardianship was my duty for seven hundred years.

The Great Library, like the town it neighbored, never quite had a defined origin. Some said it was created along with heaven and earth. Others told legends of Herculean architectural feats thousands of years ago that carved it into the mountainside. Yet others claimed the library was built by a secret society of monks who lived in the mountains and avoided contact with the outside world. Regardless of its provenance, this library was just like many other in most ways. It offered many books, from stories of fiction to records of the natural sciences. The diversity of stories it held and knowledge it harbored were unparalleled, putting even the great library in Alexandria to shame. Like most other libraries, visitors could query all the literature in the Great Library to locate the knowledge that they sought.

The main difference between this library and the others, as I would explain to every scholar, was the method by which they needed to query the library.

See, in an ordinary library, one would typically locate a book by looking through an index, a static record of all the books it held, organized by their common topics or themes. This was not so in the Great Library. Instead, at the end of the cave, there lay a piece of paper and an ink-dipped pen. The pen replenished itself of its ink by some mechanism known only to the Guardians of the Library, and the paper extended from a seemingly infinite roll.

To query the Great Library, the scholar would write their question on the paper. After a pause and a rumble through the walls, a shelf would appear in front of the scholar, filled with books that addressed exactly the questions posed moments before.

If none of the books answered their query to satisfaction, the scholar could then extend their query further on paper, after which the rumbling walls would provide the scholar with yet more books, every one of which addressed the exact query posed by the scholar, yet again. A question of science would summon encyclopedias of knowledge. A prompt to a story would summon a shelf full of exotic tales.

Hearing this, you may suppose that the Great Library was some elaborate magic trick pulled by a peeving owner of a great collection of books, seeing a scholar’s query and quickly sorting through their collection to find a handful of relevant literature to show off. This was not so, however. Such an operation would require an immense collection of literature and a hundred laborers sorting through it constantly, and no scholar who devoted significant time to understanding the magic of the Great Library ever found even a trace of such an operation.

No, the Great Library operated by an even stranger mechanism. I shall relay to you what was explained to me when I first arrived here.

The Great Library is neither the operation of a wealthy, clever bibliophile, nor an elaborate optical illusion. There is no great collection of books, no endless shelves of infinite wisdom. Instead, on every scholar’s query, the Great Library simply generates a hundred books of believable stories and plausible explanations prompted by the query. Exactly how it writes such books are not known to anyone – even querying the Library itself of such a question only seems to generate half-intelligible responses.

Upon hearing such an explanation, nearly every scholar dismisses my claim as ignorant pseudoscience, and will attempt to compose a query which will thwart the Great Library’s intelligence. They will ask of recent discoveries in the natural sciences, of their own childhood past, and even of potential future events. After each query, without an exception, every scholar would grow more and more agitated, driven mad by the uncanny powers of the Library, and would disappear, ultimately, into the depths of the cave. Those who do seem never to return.

Once every few centuries, a scholar would arrive who would come to terms with the Great Library’s powers, and, failing to comprehend it fully, simply accept it for what it is – a cosmic intelligence, an impossible mystery, something beyond the limits of their own cognitive reaches. Having come to grips with reality, they would then query the Library not only of their original question, which now seemed feeble and pointless, but also of other unattainable mysteries – of life and death, of the origin of the universe, of eternal satisfaction, and of endless youth.

Armed with such knowledge, they would vow not to return to their hometown, but instead to live on in the Library, guarding its powers and welcoming its visitors, however rare they may be. That’s right – those few who survive become the Guardians of the Great Library, of which I am one.

On the seven hundred and second year of my guardianship, during a quiet summer afternoon shift, I walked into the Library’s querying room and picked up the pen I had held so many times before. I began writing. And, as always, a shelf full of stories, each beginning with my exact query, appeared before me. I pulled the first one off the shelf, and began reading:

The town was called Aperia. A quiet but sophisticated sprawl…


Building Monocle, a universal personal search engine for life

The web browser as a tool of thought

I share new posts on my newsletter. If you liked this one, you should consider joining the list.

Have a comment or response? You can email me.