Turn dry textbooks into interactive conversations. Ask questions, get answers with sources, and learn faster.
Let's be real - reading through dense textbooks and documentation is hard. It's time-consuming, boring, and for people with ADHD or other neurodivergent conditions, it can feel impossible to stay focused.
I built this tool because learning shouldn't be a battle with text. It should be a conversation.
This is a Retrieval-Augmented Generation (RAG) application that lets you:
- Upload any PDF (textbook, manual, research paper)
- Ask questions in plain English
- Get answers with exact page references so you can verify
- Learn at your own pace, through dialogue instead of monologue
| Feature | What It Does |
|---|---|
| 📄 PDF Upload | Upload any document |
| 💬 Natural Language Q&A | Ask questions like you're talking to a tutor |
| 📍 Source Attribution | Every answer shows the page number it came from |
| 🧠 RAG Architecture | Answers are grounded in your document - no hallucinations |
| 🚀 Fast LLM | Powered by Groq's Llama 3.3 (70B) - answers in seconds |
- 📝 Auto-generated quizzes by chapter
- 🗣️ AI discussion partner that debates the material with you
- 📊 Learning assessment that tracks your progress
- 🎯 Flashcard generation from your uploads
Pipeline One: Upload & Index (Ingestion)
- User uploads a PDF file
- PDF processor extracts text from each page
- Text is split into chunks (~1000 characters each)
- Each chunk is converted into a vector (384 numbers)
- Vectors + original text are stored in Qdrant database
Pipeline Two: Ask & Answer (Query)
- User asks a question in plain English
- Question is converted into a vector (same method)
- System searches for the 3 most similar vectors in the database
- Those chunks become the "context" for the LLM
- LLM generates an answer using ONLY the context + question
- Answer is returned with source references (filename + page number)
Why this matters: The LLM never makes up information. It can only answer from your document. No hallucinations. No "I think so." Just grounded answers you can trust.
- Python 3.12+
- Groq API key (free at console.groq.com)
# Clone the repo
git clone https://github.com/yourusername/rag-learning-assistant.git
cd rag-learning-assistant/backend
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Add your API key
echo "GROQ_API_KEY=your_key_here" > .env
## 🚀 Run the Backend
```bash
uvicorn app.main:app --reloadYour API will be live at http://localhost:8000
cd frontend
npm run devUse the upload button to select a PDF file (textbook, manual, research paper, etc.)
Type your question in plain English. For example:
- "What are the main topics in chapter 3?"
- "Explain how this system works"
- "Summarize the key takeaways"
The AI will respond with an answer and show you exactly which page it came from.