LearnMate is an AI-powered educational chatbot designed to assist students in understanding academic materials more effectively. The system uses a Retrieval-Augmented Generation (RAG) approach to provide accurate, context-based answers from course-related documents.
Unlike traditional chatbots, LearnMate retrieves relevant information from a knowledge base before generating responses, ensuring higher accuracy and relevance.
- 📚 Context-aware chatbot using RAG architecture
- 🔍 Retrieval of relevant content from academic materials
- 💡 Follow-up prompt suggestions for continuous learning
- 🧠 Topic-based learning support
- ⚡ Fast response using vector search (FAISS)
- Python
- FAISS (Vector Database)
- LLM Integration (Ollama)
- VS Code
The system follows a Retrieval-Augmented Generation pipeline:
-
Data Preprocessing
- Convert documents (PDF, PPTX, DOCX) into text
- Split text into smaller chunks
-
Embedding Generation
- Convert text chunks into vector embeddings
-
Vector Storage
- Store embeddings using FAISS index
-
Query Processing
- User inputs a question
-
Retrieval
- System retrieves most relevant chunks
-
Response Generation
- LLM generates answer based on retrieved context
LearnMate_Project/
│
├── app/ # Main application (chatbot interface)
├── rag/ # Retrieval and chatbot logic
├── preprocessing/ # Text extraction and chunking
├── embeddings/ # Embedding generation scripts
├── vectorstore/ # FAISS index handling
│
├── .gitignore
└── README.md
- Clone the repository:
git clone https://github.com/Edryana/LearnMate_Project.git
cd LearnMate_Project
- Install dependencies:
pip install -r requirements.txt
- Run preprocessing (if needed):
python preprocessing/convert_to_text.py
python preprocessing/chunk_text.py
- Generate embeddings:
python embeddings/create_embeddings.py
- Run the chatbot:
python app/app.py
- Dataset files are not included due to size limitations
- Users may need to provide their own academic materials for testing
- Web-based UI integration
- More advanced ranking for retrieval
- Support for multiple subjects
- Performance optimization
Edryana Bachelor of Computer Science (Hons.) UiTM Jasin, Melaka