How rakeshvarma007/smart-study-buddy works
Smart Study Buddy is a Streamlit app for asking natural-language questions about an uploaded PDF and receiving answers with page references. The main flow extracts and chunks PDF pages, embeds them into a FAISS index, retrieves relevant chunks for a question, and generates an answer using a prompt that requests page citations. The README describes a distil GPT-2 model, but the sampled implementation loads Qwen2-1.5B-Instruct. All runtime components are in one file; the graph reflects that file’s visible calls.
Main entry points: smart-study-buddy.py Streamlit interface
Components 11
Study interface
- Streamlit interface
smart-study-buddy.py - Answer and citations
smart-study-buddy.py
Document indexing
- PDF processing
smart-study-buddy.py - Text chunking
smart-study-buddy.py - Embedding model
smart-study-buddy.py - FAISS index
smart-study-buddy.py
Question answering
- Retriever
smart-study-buddy.py - Retrieval chain
smart-study-buddy.py - Prompt and context
smart-study-buddy.py - Language model
smart-study-buddy.py
Other components
- Student
Connections 15
- Student → Streamlit interface: uploads PDF
smart-study-buddy.py - Streamlit interface → PDF processing: processes PDF
smart-study-buddy.py - PDF processing → Text chunking: splits pages
smart-study-buddy.py - Streamlit interface → Embedding model: initializes
smart-study-buddy.py - Streamlit interface → FAISS index: indexes chunks
smart-study-buddy.py - Text chunking → FAISS index: provides chunks
smart-study-buddy.py - Embedding model → FAISS index: embeds chunks
smart-study-buddy.py - Student → Streamlit interface: asks question
smart-study-buddy.py - FAISS index → Retriever: creates retriever
smart-study-buddy.py - Retrieval chain → Retriever: queries
smart-study-buddy.py - Retrieval chain → Prompt and context: passes context
smart-study-buddy.py - Prompt and context → Language model: generates answer
smart-study-buddy.py - Streamlit interface → Retrieval chain: invokes
smart-study-buddy.py - Retrieval chain → Answer and citations: returns answer and context
smart-study-buddy.py - Answer and citations → Student: shows answer and pages
smart-study-buddy.py