A fully local, AI-powered research assistant that lets you upload PDFs and ask questions using retrieval-augmented generation (RAG). Powered by Ollama, ChromaDB, and Llama 3.2.
- π PDF Upload & Ingestion - Upload PDFs and automatically extract and index content
- π€ AI-Powered Q&A - Ask natural language questions about your documents
- π Source Attribution - Get page numbers and referenced chunks for every answer
- π Real-time Status Monitoring - Check Ollama and ChromaDB health in real-time
- π Fully Local - No cloud dependencies, complete privacy
- β‘ Fast & Responsive - Built with React, Vite, and FastAPI
Frontend:
- React with TypeScript
- Vite (build tool)
- TailwindCSS (styling)
- Radix UI components
Backend:
- FastAPI (Python)
- ChromaDB (vector database)
- Ollama (LLM & embeddings)
- PyMuPDF (PDF processing)
Before you begin, ensure you have:
- Node.js (v16+) - Download
- Python (v3.8+) - Download
- Ollama - Download
- Required models (pull these first):
ollama pull nomic-embed-text ollama pull llama3.2
- Required models (pull these first):
cd LLM_Research_Assistantpip install -r requirements.txtnpm installBefore running the backend, ensure Ollama is running:
# macOS (if not running as daemon):
ollama serve
# Or ensure the Ollama app is runningPull the required models (if not already done):
ollama pull nomic-embed-text
ollama pull llama3.2In a terminal window, run:
python server.pyYou should see:
INFO: Uvicorn running on http://0.0.0.0:8000
In another terminal window, run:
npm run devThe frontend will be available at http://localhost:8080
-
Ingest a PDF:
- Click "Step 1 β Choose a Book"
- Select a PDF file from your computer
- Click "Ingest Book"
- Wait for the ingestion to complete
-
Ask Questions:
- Once ingestion is complete, go to "Step 2 β Ask Your Book"
- Type your question in the input field
- Press Enter or click "Send"
- View the AI response with page sources
-
Monitor System:
- Check the "System Status" section to ensure Ollama and ChromaDB are running
- All indicators should be green
GET /status- Check system health (Ollama, ChromaDB, models)POST /ingest- Upload and ingest a PDF fileGET /collection-info- Get collection metadata (chunk count, pages)POST /query- Query the ingested documents
You can customize the collection name using environment variables:
export COLLECTION_NAME=my_custom_collection
python server.pyDefault collection name: my_book
Error: model "nomic-embed-text" not found
Solution: Pull the models first:
ollama pull nomic-embed-text
ollama pull llama3.2- Ensure Ollama is running
- Check that port 8000 is available
- Verify all dependencies are installed:
pip install -r requirements.txt
- Make sure backend is running on
http://localhost:8000 - Clear browser cache and refresh
- Check browser console (F12) for network errors
- Ensure the PDF file is valid
- Check that ChromaDB is accessible
- Monitor backend terminal for error messages
LLM_Research_Assistant/
βββ src/
β βββ components/
β β βββ rag/ # RAG-specific components
β βββ lib/
β β βββ api.ts # API client
β βββ pages/
β βββ Index.tsx # Main application page
βββ server.py # FastAPI backend
βββ Research_Assistant_RAG.py # RAG logic
βββ requirements.txt # Python dependencies
βββ package.json # Node.js dependencies
Frontend:
npm run buildnpm run test- First query may take 10-30 seconds as the LLM initializes
- Subsequent queries are faster as the model stays in memory
- Ingestion time depends on PDF size (typically 5-15 seconds)
MIT License - See LICENSE file for details
For issues or questions, please check the troubleshooting section or review the browser console (F12) and backend terminal logs for error messages.
Happy researching! π