Skip to content

AliHamzaAzam/StudyBuddy

Repository files navigation

StudyBuddy - Research Branch

Comparative analysis of generative AI approaches for emotion-aware educational content generation.

Goal

Students learn differently depending on their emotional state. A frustrated student needs patience and step-by-step breakdowns. A confident student wants challenges. A tired student needs concise summaries.

This research explores how to build AI tutors that adapt their responses to student emotions. We compare three approaches to find the best trade-off between response quality, emotional appropriateness, and computational cost.

The Three Approaches

Approach Method Trade-off
Baseline LLM Emotion-conditioned prompts only Simple, but limited adaptation
RAG Pipeline Retrieval from knowledge base + prompts Better accuracy, higher latency
Fine-Tuned LLM LoRA fine-tuned on emotion-response pairs Fastest inference, requires training

All models use the same base: Llama 3.2 3B (4-bit quantized via MLX on Apple Silicon).

Key Findings

  • RAG provides the best factual consistency (grounded in knowledge base)
  • Baseline LLM generates longer, more empathetic responses
  • Fine-tuned LLM is 65% faster but more concise
  • Emotion alignment varies significantly by student emotion type

See experiments/results/model_comparison_analysis.md for detailed analysis.

Structure

experiments/
├── src/
│   ├── models/       # BaselineLLM, RAGModel, FineTunedLLM
│   ├── evaluation/   # Evaluator and metrics
│   ├── data/         # Dataset loaders
│   └── utils/        # Config and helpers
├── notebooks/        # Jupyter experiments
├── scripts/          # Utility scripts
├── results/          # Evaluation CSVs and analysis
├── chromadb/         # Vector store for RAG
└── deployment/       # Docker deployment

Quick Start

cd experiments
chmod +x setup-jupyter.sh start-jupyter.sh
./setup-jupyter.sh    # One-time conda env setup
./start-jupyter.sh    # Start JupyterLab

Evaluation Metrics

  • Generation Quality: BLEU, ROUGE, BERTScore
  • Emotional Appropriateness: Emotion alignment, tone appropriateness
  • Pedagogical Quality: Examples, analogies, engagement, clarity
  • Factual Consistency: Semantic similarity to reference

Other Branches

The main branch contains an initial web app prototype (FastAPI + React). Development focus shifted to this research branch.

License

This project is licensed under the MIT License. See LICENSE for the full license text.

About

Research comparing Baseline LLM, RAG, and Fine-tuned approaches for building AI tutors that respond appropriately to frustrated, curious, confident, and tired students.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors