PDF GPT is a chatbot application that lets you ask questions about the contents of PDF files using GPT language models.
The tool solves the problem of extracting and querying information from PDF documents by converting PDFs to text, breaking that text into chunks of approximately 150 words, and generating embeddings for each chunk. When you ask a question, the system performs semantic search using K-nearest neighbors to find the top five most relevant chunks, embeds those chunks into a prompt sent to OpenAI's API, and returns a generated answer. The system can accept PDFs either as file uploads or via URL, and it caches embeddings to disk to avoid regenerating them on subsequent queries.
You should consider this tool if you need a straightforward way to build a question-answering interface over PDF documents without managing complex infrastructure. It works best for PDFs where semantic search over chunked text produces useful results. The tool supports multiple OpenAI models including Turbo, GPT-4, and variants with extended token limits like the 16K and 32K models, giving you flexibility in choosing between cost and capability. A demo is available as a Hugging Face Space if you want to try it before integrating it into your own project.
The project shows active maintenance with improvements to error handling and the addition of features like chat history and pre-defined questions for input auto-filling. The codebase is written in Python and includes a clear processing pipeline documented through sequence and flow diagrams in the README, making it relatively straightforward to understand how data moves through the system.