Aligning LLMs for the Classroom with Knowledge-Based Retrieval - A Comparative RAG Study

Amay Jain, Liu Cui, Si ChenarXiv 2025 · DOI

Introduction

Large Language Models (LLMs) are increasingly utilized as personalized tutors, yet their application in high-stakes educational environments is hindered by hallucinations and knowledge shifts. An LLM might confidently provide outdated facts or contradict a specific school curriculum. While Retrieval-Augmented Generation (RAG) grounds models in external documents, existing research often relies on generic datasets like Wikipedia. This study addresses the gap by evaluating RAG architectures across diverse academic disciplines and assessing "pedagogical value"—the ability to synthesize broad themes rather than merely reciting isolated facts.

Methodology

The researchers evaluated three primary RAG configurations using GPT-4.1-Mini as the backbone:

  1. OpenAI Vector Search: A standard vector-based RAG retrieving document chunks via semantic similarity.
  2. GraphRAG Global: A graph-based approach that summarizes high-level "communities" of entities, optimized for broad, thematic queries.
  3. GraphRAG Local: A graph-based approach focusing on specific entity neighborhoods for high-precision, multi-hop reasoning.

To balance performance and cost, the authors proposed a Dynamic Branching framework. This system uses a lightweight LLM to analyze student queries and route them to the optimal RAG method based on query complexity and document size.

The pipeline for generating the EduScopeQA dataset, which involves hierarchical summarization and multi-stage filtering.

Datasets

The study utilizes two key datasets:

  • EduScopeQA: A novel dataset of 3,176 QA pairs across History, Literature, Science, and Computer Science, categorized by granularity (Specific, Sectional, and Thematic).
  • KnowShiftQA: A dataset of 3,005 QA pairs with systematically altered facts to test "faithfulness"—the system's ability to prioritize provided text over pre-trained internal knowledge.

Key Results and Insights

The evaluation demonstrates that subject matter and query type significantly influence the choice of architecture.

Comparative performance (win rates) of OpenAI RAG, GraphRAG Local, and GraphRAG Global across different question granularities and evaluation criteria.
  • Thematic Mastery: For thematic questions in Literature, GraphRAG Global achieved a win rate of ~0.825 compared to OpenAI RAG’s ~0.263 in comprehensiveness.
  • Fact Retrieval: OpenAI RAG remains the most effective for directness, providing succinct answers for specific factual queries.
  • Faithfulness in Large Corpora: GraphRAG Local proved most resilient to knowledge shifts. In large textbooks (e.g., Biology, 258k words), it maintained ~77% accuracy on altered facts, whereas vector-based methods struggled as distracting content increased.
  • Resource Usage: GraphRAG indexing is resource-intensive, requiring 10-20x more LLM calls than vector-based RAG, justifying the need for a hybrid routing framework.

Conclusion

No single RAG method is universally superior for education. While vector RAG is a cost-effective generalist for facts, GraphRAG is essential for thematic synthesis. The proposed dynamic branching system offers a scalable path toward accurate and pedagogically sound educational AI. Future work will explore multimodal content and human-in-the-loop validation with educators.

Summary updated

BibTeX
@misc{jain2025aligning,
  author = {Amay Jain and Liu Cui and Si Chen},
  title = {{Aligning LLMs for the Classroom with Knowledge-Based Retrieval - A Comparative RAG Study}},
  year = {2025},
  eprint = {2509.07846},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.07846},
}
Figure