Quick illustration of how one can easily read books together with LLMs.
GitHub RepoImpressions1.3k

Quick illustration of how one can easily read books together with LLMs.

@the_ospsPost Author

Project Description

View on GitHub

Read Books with Your LLM: A Developer's Sidekick for PDFs

Ever found yourself wishing you could just ask a large language model a specific question about a book or research paper, but copying and pasting text feels clunky? What if you could have a conversation with the document itself? That's the neat idea behind reader3, a new project from Andrej Karpathy that provides a clean interface for reading books and PDFs alongside an LLM.

It tackles a common problem: LLMs have limited context windows, making it impossible to feed an entire book at once. This tool elegantly sidesteps that limitation, letting you interact with large documents in a more natural, conversational way.

What It Does

In simple terms, reader3 is a local web application that chunks a PDF—like a book or paper—into manageable segments. It then creates a searchable interface where you can ask questions, and the system finds the most relevant passages from the document to help the LLM generate an accurate answer. Instead of hoping the LLM memorized the book from its training data, you're grounding its responses directly in the text you provided.

Why It's Cool

The cleverness here isn't just in the concept, but in the implementation. It's a local-first tool, meaning your data and the PDF you're processing don't get shipped off to a third-party API. You run the entire pipeline on your machine, which is great for privacy and for tinkering.

It uses sentence-transformers to create embeddings for the text chunks, storing them in a vector store for fast, semantic similarity search. When you ask a question, it doesn't just do a keyword lookup. It finds the passages that are meaningfully closest to your query and injects them into the LLM's prompt as context. This Retrieval-Augmented Generation (RAG) pattern is a powerful way to overcome context limits and reduce model hallucinations, making the LLM a true expert on the book you're reading.

How to Try It

Getting it running is straightforward if you're comfortable in a terminal. You'll need Python and pip on your system.

  1. Clone the repo:

    git clone https://github.com/karpathy/reader3
    cd reader3
    
  2. Install the dependencies:

    pip install -r requirements.txt
    
  3. Run the application:

    python reader3.py
    

The script will automatically open a web browser tab with the interface. From there, you can drag and drop a PDF file to index it and start asking questions. The first run will download the necessary embedding model, so give it a moment.

Final Thoughts

reader3 is a fantastic example of a practical tool that solves a real problem for developers, researchers, and avid readers. It's not about flashy features; it's about providing a solid, local workflow for interacting deeply with long-form text. It's the kind of project you can use as-is to be more productive, or fork and customize—maybe by swapping the local LLM for an API or integrating it into a larger note-taking system. It's a simple idea, executed well, and that's often the most useful kind of tool.


@githubprojects

Back to Projects
Project ID: 1992285370537713900Last updated: November 22, 2025 at 05:33 PM