A fully free local RAG system for course slides
It lets you:
- upload PDF lecture slides
- extract and chunk their text
- embed them with a free sentence-transformers model
- search them with FAISS
- answer questions using a free local Ollama model
- Streamlit
- PyMuPDF
- sentence-transformers
- FAISS
- Ollama
- Python 3.10+
- Ollama installed locally
Install Ollama from the official site, then pull a model:
ollama pull llama3.1:8bYou can also use other local models if your machine supports them.
pip install -r requirements.txtstreamlit run app.py- Upload one or more PDF slide files.
- Click Build / Rebuild Index.
- Ask a question about the slides.
- The app retrieves the most relevant chunks.
- If Ollama is running, it generates an answer grounded in the retrieved slide content.
- If Ollama is not running, the app still shows the retrieved evidence.
- Best with text-based PDFs.
- If your slides are scanned images, you will need OCR for stronger results.
- The vector index and uploaded files are stored locally in
rag_data/.
You can extend this project with:
- OCR for image-only slides
- citation formatting in the final answer
- chat history
- Arabic/English answer mode
- per-course folders
- exportable study notes
- support for DOCX or PPTX
free_course_slides_rag/
├── app.py
├── requirements.txt
└── README.md