Comparative analysis of generative AI approaches for emotion-aware educational content generation.
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.
| 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).
- 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.
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
cd experiments
chmod +x setup-jupyter.sh start-jupyter.sh
./setup-jupyter.sh # One-time conda env setup
./start-jupyter.sh # Start JupyterLab- Generation Quality: BLEU, ROUGE, BERTScore
- Emotional Appropriateness: Emotion alignment, tone appropriateness
- Pedagogical Quality: Examples, analogies, engagement, clarity
- Factual Consistency: Semantic similarity to reference
The main branch contains an initial web app prototype (FastAPI + React). Development focus shifted to this research branch.
This project is licensed under the MIT License. See LICENSE for the full license text.