Inspiration

Long PDFs are slow to get through. When you only need one answer from a syllabus, report, or manual, Ctrl+F only helps if you already know the exact words. We wanted a faster way to get answers from a document.

What it does

AI PDF Chat Assistant turns a PDF into a conversation. You drag in a PDF up to 2MB, ask questions in plain English, and get answers based on that document. The chat keeps its history, so follow-up questions work, and you can copy, share, or export the conversation. You can choose an AI provider or use Auto Failover.

How we built it

We built the app with React, TypeScript, Vite, and Tailwind CSS. PDF.js extracts the text in the browser. The app then sends that text and the user's question to the selected AI model, along with instructions to answer from the document. It supports Grok, OpenAI, Claude, and Gemini through their APIs. If a provider fails, the app tries the next one with a key, then falls back to a basic keyword search if none are available.

Challenges we ran into

Each AI provider formats requests differently, especially system instructions and message history, so each one needed its own integration. Connecting to these APIs from a browser app also took extra work, so we added a proxy to the local development server.

Accomplishments that we're proud of

We built a working app that can read a PDF and hold a conversation about it. We're also proud of the failover system, which keeps the chat going if one AI provider fails and tells the user which provider answered.

What we learned

We learned how to extract text from PDFs in the browser, connect several AI APIs to one chat interface, and plan for failures. We also learned that a public version would need a backend to keep API keys out of the browser.

What's next for AI PDF Chat Assistant

  • Add a backend so the app can be deployed publicly without exposing API keys
  • Support scanned PDFs with OCR
  • Handle larger files
  • Show the page number behind each answer so users can check it
  • Let users chat with multiple PDFs at once

Built With

Share this project:

Updates

Submission history