[Paper Review] AI-TA: Towards an Intelligent Question-Answer Teaching Assistant using Open-Source LLMs
This paper introduces AI-TA, an open-source, privacy-preserving question-answering teaching assistant for online educational platforms, leveraging retrieval-augmented generation (RAG), supervised fine-tuning (SFT), and Direct Preference Optimization (DPO) on LLaMA-2 to improve answer quality. It achieves a 30% improvement in answer quality on a CS1 course Piazza dataset, demonstrating strong alignment with human evaluations and superior performance over automated metrics like BertScore.
Responding to the thousands of student questions on online QA platforms each semester has a considerable human cost, particularly in computing courses with rapidly growing enrollments. To address the challenges of scalable and intelligent question-answering (QA), we introduce an innovative solution that leverages open-source Large Language Models (LLMs) from the LLaMA-2 family to ensure data privacy. Our approach combines augmentation techniques such as retrieval augmented generation (RAG), supervised fine-tuning (SFT), and learning from human preferences data using Direct Preference Optimization (DPO). Through extensive experimentation on a Piazza dataset from an introductory CS course, comprising 10,000 QA pairs and 1,500 pairs of preference data, we demonstrate a significant 30% improvement in the quality of answers, with RAG being a particularly impactful addition. Our contributions include the development of a novel architecture for educational QA, extensive evaluations of LLM performance utilizing both human assessments and LLM-based metrics, and insights into the challenges and future directions of educational data processing. This work paves the way for the development of AI-TA, an intelligent QA assistant customizable for courses with an online QA platform
Motivation & Objective
- To address the high human cost of responding to thousands of student questions on online QA platforms in large computing courses.
- To develop a scalable, privacy-preserving educational QA system using open-source LLMs instead of third-party proprietary models.
- To improve answer quality through a combination of retrieval-augmented generation, supervised fine-tuning, and preference-based optimization.
- To evaluate model performance using both human-annotated rubrics and LLM-based evaluations, ensuring alignment with human judgment.
- To provide a customizable, extensible pipeline for deploying intelligent teaching assistants across diverse courses with online QA platforms.
Proposed method
- The pipeline integrates retrieval-augmented generation (RAG) using course materials to ground answers in relevant content.
- Supervised fine-tuning (SFT) is applied on 10,000 Piazza QA pairs to align the LLM with course-specific language and content.
- Direct Preference Optimization (DPO) is used as a lightweight alternative to RLHF, fine-tuning the model based on 1,500 preference pairs to improve response quality.
- The base model is LLaMA-2, selected for its strong performance and open-source nature, enabling data privacy.
- Evaluation uses both GPT-4 as a judge model and human-annotated rubrics for usefulness, accuracy, and overall quality.
- Correlation analysis is performed between LLM-based, human, and automated (BertScore) evaluation metrics to validate alignment.

Experimental results
Research questions
- RQ1Can open-source LLMs like LLaMA-2 be effectively fine-tuned and enhanced with RAG, SFT, and DPO to produce high-quality educational QA responses?
- RQ2How does the combination of RAG, SFT, and DPO compare to baseline models in terms of answer quality on real-world educational QA data?
- RQ3To what extent do LLM-based evaluations correlate with human-annotated quality metrics in the educational QA context?
- RQ4How does BertScore compare to human and LLM-based evaluations in measuring answer quality for educational responses?
- RQ5What are the key challenges and limitations in processing and evaluating educational QA data using LLMs?
Key findings
- The proposed pipeline achieved a 30% improvement in answer quality compared to the baseline LLaMA-2 model, with RAG being the most impactful component.
- Human evaluations showed moderate to strong correlation (r = 0.662) between human-annotated overall quality and LLM-based evaluations using GPT-4.
- LLM-based evaluations demonstrated higher agreement with human judgments than BertScore, which showed weak correlation (r = 0.383) with human ratings.
- The confusion matrices revealed that LLM evaluations tend to be more lenient than human raters, assigning higher scores in many cases.
- DPO-based preference optimization proved effective as a lightweight alternative to RLHF, improving response quality without complex reinforcement learning setups.
- The integration of course materials via RAG significantly enhanced factual accuracy and relevance of generated answers.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.