Nutlope/pdftochat

Chat with your PDFs with AI

What it solves

PDFs are often long and dense, making it time-consuming to find specific information. This app lets you upload a PDF and then ask questions in plain language, getting answers drawn directly from the document's content. It removes the need to manually skim or search through pages.

How it works

The app is built on Next.js and LangChain.js for orchestration. When you upload a PDF, it is stored via Bytescale and its content is indexed in Chroma Cloud. Chroma automatically creates a collection per document and combines dense embeddings (Qwen) and sparse embeddings (SPLADE) using Reciprocal Rank Fusion to retrieve the most relevant chunks. When you ask a question, the system retrieves relevant passages from the PDF and hands them to Mixtral (served by Together AI) to generate a contextual answer. User authentication is handled by Clerk, and Vercel hosts the frontend and Postgres database.

Who it's for

This is for anyone who needs to extract knowledge from PDFs efficiently, such as researchers, analysts, or developers. It's also a useful template for developers who want to build their own RAG-based applications, as it provides a full deployment guide with clear instructions for setting up each service.

Highlights

  • Hybrid vector search (dense + sparse) via Chroma Cloud for accurate retrieval.
  • Automatic per-document collections – no manual index setup.
  • Powered by Mixtral through Together AI for high-quality answers.
  • Deployable to Vercel or other hosts with straightforward environment configuration.
  • Includes a ready-to-run tech stack: Next.js, LangChain.js, Clerk auth, and Postgres.

Related

  • Project
  • Project
  • Project
  • Project