Skip to content

Repository files navigation

RAG-Driven Educational Assistant: Enhancing Learning through Contextual Q&A and Knowledge Testing

Master's Dissertation for the Deep Learning and Generative AI Master's Degree at Datamecum | Supervisor: Quique García Vidal | Student: Maria Magdalena Balos

This master's final project focuses on Machine Learning and Deep Learning, with a particular emphasis on NLP generative models and Retrieval-Augmented Generation (RAG) and is part of the Master's Final Thesis (TFM) at Datamecum. It aims to implement tools introduced during the master's program, with a particular emphasis on NLP generative models and Retrieval Augmented Generation (RAG). The repository includes scripts and documentation to support the research and implementation of the project.

Click here to watch the video presentation of this project

Project Description

This project was inspired by the episode AI in the Classroom of the podcast from Google DeepMind, where Professor Hannah Fry converses with Research Lead Irina Jurenka about the integration of AI in educational settings. Some ideas for AI implementations discussed in this episode include:

  • Providing AI tutors for each student
  • Tailoring lessons to each student's learning pace using AI
  • Predicting where a student might struggle before they even realize it

Several important questions about AI in education are raised in this podcast, including:

  • How can new technology integrate into the current educational system?
  • What criteria should define good pedagogy in AI?
  • How can we ensure everyone engages with AI as a tutor to enhance learning?
  • How can we maintain engagement during difficult conversations with an AI tutor?
  • To what extent should an AI tutor mimic human interaction?

This project aims to demonstrate how the educational system can be enhanced with AI, utilizing knowledge assessment to gauge student improvement. The assistant is designed to serve as a RAG-based educational tool for future students in the intensive or master's program. It allows users to ask questions related to specific subjects and provides a tool to evaluate students' knowledge through test questions. These assessments consist of multiple-choice questions with options a, b, c, and d, where only one answer is correct.

Features

  • RAG-Based Question and Answer Platform: A space for students to ask and answer subject-related questions using Retrieval Augmented Generation techniques.
  • Knowledge Evaluation Tool: A system to create and take multiple-choice tests that assess understanding of the material.

Goals

  • Enhance the learning experience for Datamecum master's students.
  • Provide tools for self-assessment and peer support.
  • Illustrate the benefits of applying Machine Learning and Deep Learning concepts, particularly RAG models, in educational tools.

Setup

Please follow these instructions after cloning the repository:

  1. Install the required packages by running pip install . or pip install -r requirements.txt.`

  2. API KEY: Define an API key for the OpenAI and/or Anthropic models in your environment, use: export OPENAI_API_KEY=your-api-key-here

  3. CHROMADB: If you have access to the Datamecum ChroamDB created for this project, make sure to place the database directory inside the rag/. If you don't have access to the database, you can still run this project creating a chroma database with your personal data. Here is how you can do it:

  • Generate_transcriptions: fill the VIDEOS_DIR variable in config.json with the path to the videos directory that you want to transcribe. Now go to scripts/transcribe and run the script with python transcribe.py. Wait for it to finish.
  • Give access to the transcriptions: fill the TRANSCRIPTIONS_DIR variable in config.json with the path to the directory where the transcriptions are saved.
  • When you run the RAG in the next section, the chromadb will be created automatically. The function init_rag() inside the rag.py file it has a condition that will load the chromadb database if its available or creates a new one with the documents available in the given TRANSCRIPTIONS_DIR path.
  1. If you want to run any other process, please ensure to fill the remaining config.json template with your own paths before.

Runing the RAG and app call

  1. Run the CLI version of the RAG system from the root directory with one of the following commands:
  • python scripts/main_rag_launcher.py --model gpt-4o-mini
  • python scripts/main_rag_launcher.py --model claude-3-haiku-20240307
  1. Run the main Flask app from the root directory with:
  • python app.py

Please get in contact if these instructions are not clear for you or if you need any further support.

Tools and Technologies Used

About

Master's dissertation for the DL and GenAI Master's degree at Datamecum. RAG for enhancing education.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages