Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A full-stack demo showcasing a local RAG (Retrieval Augmented Generation) pipeline to chat with your PDFs.
| Date | Stars |
|---|---|
| 2026-07-31 | 532 |
| 2026-08-01 | 533 |
| 2026-08-02 | 533 |
| 2026-08-06 | 533 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# 🤖 Chat with PDF locally using Ollama + LangChain
A powerful local RAG (Retrieval Augmented Generation) application that lets you chat with your PDF documents using Ollama and LangChain. This project includes multiple interfaces: a modern Next.js web app, a Streamlit interface, and Jupyter notebooks for experimentation.
[](https://github.com/tonykipkemboi/ollama_pdf_rag/actions/workflows/tests.yml)
## ✨ Features
- 🔒 **100% Local** - All processing happens on your machine, no data leaves
- 📄 **Multi-PDF Support** - Upload and query across multiple documents
- 🧠 **Multi-Query RAG** - Intelligent retrieval with source citations
- 🎯 **Advanced RAG** - LangChain-powered pipeline with ChromaDB
- 🖥️ **Two Modern UIs** - Next.js (primary) and Streamlit interfaces
- 🔌 **REST API** - FastAPI backend for programmatic access
- 📓 **Jupyter Notebooks** - For experimentation and learning
## 🖼️ Screenshots
### Next.js Interface (Recommended)

*Modern chat interface with PDF management, source citations, and reasoning steps*
### Streamlit Interface

*Classic Streamlit interface with PDF viewer and chat functionality*
## 📺 Video Tutorial
<a href="https://youtu.be/ztBJqzBU5kc">
<img src="https://img.youtube.com/vi/ztBJqzBU5kc/hqdefault.jpg" alt="Watch the video" width="100%">
</a>
## 🏗️ Project Structure
```
ollama_pdf_rag/
├── src/
│ ├── api/ # FastAPI REST API
│ │ ├── routers/ # API endpoints
│ │ ├── services/ # Business logic
│ │ └── main.py # API entry point
│ ├── app/ # Streamlit application
│ │ ├── components/ # UI components
│ │ └── main.py # Streamlit entry point
│ └── core/ # Core RAG functionality
│ ├── document.py # PDF processing
│ ├── embeddings.py # Vector embeddings
│ ├── llm.py # LLM configuration
│ └── rag.py # RAG pipeline
├── web-ui/ # Next.js frontend
│ ├── app/ # Next.js app router
│ ├── components/ # React components
│ └── lib/ # Utilities & AI integration
├── data/
│ ├── pdfs/ # PDF storage
│ └── vectors/ # ChromaDB storage
├── notebooks/ # Jupyter notebooks
├── tests/ # Unit tests
├── docs/ # Documentation
├── run.py # Streamlit runner
├── run_api.py # FastAPI runner
└── start_all.sh # Start all services
```
## 🚀 Getting Started
### Prerequisites
1. **Install Ollama**
- Visit [Ollama's website](https://ollama.ai) to download and install
- Pull required models:
```bash
ollama pull llama3.2 # or your preferred chat model
ollama pull nomic-embed-text # for embeddings
```
2. **Clone Repository**
```bash
git clone https://github.com/tonykipkemboi/ollama_pdf_rag.git
cd ollama_pdf_rag
```
3. **Set Up Python Environment**
```bash
python -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
pip install -r requirements.txt
```
4. **Set Up Next.js Frontend** (for the modern UI)
```bash
cd web-ui
pnpm install
pnpm db:migrate
cd ..
```
### 🎮 Running the Application
#### Option 1: Next.js + FastAPI (Recommended)
Start both services:
```bash
# Terminal 1: Start the FastAPI backend
python run_api.py
# Runs on http://localhost:8001
# Terminal 2: Start the Next.js frontend
cd web-ui && pnpm dev
# Runs on http://localhost:3000
```
Or use the convenience script:
```bash
./start_all.sh
```
**Service URLs:**
| Service | URL | Description |
|---------|-----|-------------|
| Next.js Frontend | http://localhost:3000 | Modern chat interface |
| FastAPI Backend | http://localhost:8001 | RESExcerpt of 7,174 characters
Read on GitHubTony Kipkemboi · Rekody · United States
46
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:a197f20fe022feab, topic:rag, desc:retrieval-augmented generation, desc:retrieval augmented