Antilibrary

GitHub →

A tool that lets you ask questions of your PDFs, EPUBs, text files, and Word documents. Think ChatPDF or Box AI, but running as a notebook you control. Built on langchain and gradio.

The name comes from Umberto Eco’s concept of the antilibrary — the books you haven’t read yet, which are arguably more valuable than the ones you have.

How it works

Antilibrary reads your documents, generates embeddings, and uses those embeddings to find text relevant to your question. That relevant text is then passed to OpenAI’s API alongside your question to generate a response. It’s a straightforward RAG (Retrieval Augmented Generation) pipeline.

The Antilibrary interface
The Antilibrary interface

How to use

  1. Download Antilibrary-OpenAI.ipynb
  2. Create a folder named books in the same directory — put your documents there
  3. Add your OpenAI API key where indicated in the notebook
  4. Run each section; the last section opens the UI

Supported formats: PDF, DOC, DOCX, TXT, MD, EPUB. If you add new documents while the program is running, hit “Scan the library again.”

If you’re running in Google Colab, you can point it at a Drive folder instead of a local books directory.

Note: Because of how the search works, specific and detailed questions get much better results than broad or generic ones. This isn’t a chatbot — it’s a document searcher with a language model on top.

License

MIT.


Back to top

To get in touch, reach out to hello [at] yudhanjaya [dot] com, or contact finegan [at] zenoagency [dot] com to talk to my agent (Stevie Finegan). Responses from my end may take time.

This site uses Just the Docs, a documentation theme for Jekyll.