Local PDF chat: Ollama, LangChain, and two UIs in one repo
It wires Ollama, LangChain, and ChromaDB into a full-stack demo so you can query your PDFs without uploading them to someone else's server.

What it does
This is a demo application that lets you upload PDFs and ask questions about them using a fully local retrieval-augmented generation pipeline. The backend uses Python, LangChain, and ChromaDB to chunk, embed, and retrieve text, while Ollama runs the LLM and embedding model entirely on your machine. You can interact with it through a Next.js web interface, a Streamlit app, a FastAPI REST layer, or Jupyter notebooks.
The interesting bit
Most RAG tutorials stop at a notebook; this one ships a complete frontend-backend pair with source citations and reasoning steps visible in the UI. It is essentially glue code, but it is honest glue code: the project structure cleanly separates document processing, vector storage, and LLM configuration, making it a practical reference for wiring local AI pieces together.
Key highlights
- Runs fully offline with Ollama; no API keys or cloud egress required.
- Supports querying across multiple PDFs with retrieved source citations.
- Ships with a Next.js chat UI (primary), a Streamlit interface, and a FastAPI backend.
- Includes Jupyter notebooks for experimentation and a test suite with GitHub Actions.
- Uses ChromaDB for local vector storage and
nomic-embed-textfor embeddings.
Caveats
- Windows users may hit an ONNX DLL error and need a separate Visual C++ Redistributable install.
- CPU-only systems may need to reduce chunk sizes to avoid memory issues.
- It is a demo, not a production service; the troubleshooting section suggests re-uploading PDFs if the vector database fails to retrieve chunks.
Verdict
Grab this if you want a working, local-only RAG blueprint to crib from or adapt for internal tools. Skip it if you are looking for a managed, production-ready document platform.
Frequently asked
- What is tonykipkemboi/ollama_pdf_rag?
- It wires Ollama, LangChain, and ChromaDB into a full-stack demo so you can query your PDFs without uploading them to someone else's server.
- Is ollama_pdf_rag open source?
- Yes — tonykipkemboi/ollama_pdf_rag is open source, released under the MIT license.
- What language is ollama_pdf_rag written in?
- tonykipkemboi/ollama_pdf_rag is primarily written in TypeScript.
- How popular is ollama_pdf_rag?
- tonykipkemboi/ollama_pdf_rag has 532 stars on GitHub.
- Where can I find ollama_pdf_rag?
- tonykipkemboi/ollama_pdf_rag is on GitHub at https://github.com/tonykipkemboi/ollama_pdf_rag.