Browsing readable books in Borges’ Library of Babel with ChatGPT
An article blending fiction with real technology, about how to simulate access to books with readable content in the infinite library

Index - Introduction - Accessing all books - Browsing books with readable text
Jorge Luis Borges’ short story “The Library of Babel” describes a vast library that contains every book that has ever been written, as well as every book that could ever be written. The library is so vast and complex that it is impossible for anyone to fully understand or navigate it, and the characters in the story struggle to make sense of the seemingly endless collection of books. The story is often seen as a metaphor for the vastness and complexity of human knowledge, and the difficulty of comprehending it in its entirety.
As described by Borges, the books in the Library of Babel contain every possible combination of 1312000 characters including letters, spaces, commas and periods. Of course, the vast majority of these books are pure nonsense, unreadable text. Somehow paradoxically, though, since every possible content that can ever be written is already there in one of the books, the library provides a place for philosophers, artists, writers and scientists to find inspiration.
Because sporadically, random combinations of characters will create something meaningful, either readable like a poem or a piece of it, or totally unreadable yet inspiring such as a provoking string of letters. Or even a whole book charged with meaning, or describing yet-unknown science, or writing the source code of the smart contract for a yet unknown blockchain, or of the ultimate artificial intelligence program.
Can we actually read some of the pages of the books in the Library of Babel?
A website at https://libraryofbabel.info/ attempts to display all the pages of all the books available at the Library of Babel. Of course, storing all this information would be impossible, so the pages are generated by the website on request from the numbers of chamber, bookcase, shelf, and volume chosen by the visitor.
As the about page says, Every possible permutation of letters is accessible at this very moment in one of the library’s books, only awaiting its discovery.
Here’s for example page 1 of volume 9 on shelf 4 of the bookshelf on wall 3 of chamber 1:

This page happens to have no single meaningful word, at least in the languages I know (I see some like “zoe”, “papa”, “wet”, but inside other bigger words, so I’m not counting them).
But be sure there is readable content waiting to be discovered.
In fact, in a jittery sea of randomized characters, many pages in the books of the library will contain actual words that exist in some language. By chance, some books will contain meaningful sentences, possibly a paragraph, maybe even whole pages with meaning. Even whole books, including those that differ by a single character as if it were a typo.
Can we find some readable content in the library’s books?
Yes, we can. And we can even search it thematically.
How? By running a text generation program based on one of the modern natural language models.
Here I show you the results of using ChatGPT to pull out readable text from the books in the library.
First I asked ChatGPT to “show me the first chapter of a fictional page from a book in the Library of Babel”. Chance and random numbers led to the first page of a book called “The Secrets of the Universe”:

Next, I asked ChatGPT to “show me some internal chapter of a fiction novel somewhere in the library”. Chance led me to this page, which seemed to be the end of a chapter:

I was curious to know what this book was about. I asked ChatGPT, and it explained that this page was the end of Chapter 7 of a novel called “The Adventures of Captain John Swift”, published in 1925 by author John Swift -who cannot be the same John Swift who wrote Gulliver’s travels for he lived in the XVIII century.
The novel is quite short, all self-contained within a few pages surrounded by tens of pages that seem to be filled with random characters. I will try to pull out the whole book, or the novel at least, and if it’s interesting enough I might post it here in a dedicated article.
Now that you know how to explore the Library of Babel yourself, for example using ChatGPT here, let me know if you find something interesting!
Some more reads
www.lucianoabriata.com I write and photoshoot about everything that lies in my broad sphere of interests: nature, science, technology, programming, etc. Become a Medium member to access all its stories (affiliate links of the platform for which I get small revenues without cost to you) and subscribe to get my new stories by email. To consult about small jobs check my services page here. You can contact me here.
