Enhancing LLM-Based Short Answer Grading with Retrieval-Augmented Generation

Yucheng Chu, Peng He, Hang Li, Haoyu Han, Kaiqi Yang, Yu Xue, Tingting Li, Joseph Krajcik, Jiliang Tang · DOI

Introduction

In the landscape of modern science education, particularly within the Next Generation Science Standards (NGSS) framework, student assessment has shifted toward evaluating "three-dimensional" learning. This approach requires students to demonstrate mastery across Disciplinary Core Ideas (DCIs), Science and Engineering Practices (SEPs), and Crosscutting Concepts (CCCs). While these open-ended assessments provide a deep window into student understanding, they impose a significant grading burden on educators, requiring both substantial time and specialized subject-matter expertise.

Large Language Models (LLMs) offer a potential solution for Automated Short Answer Grading (ASAG). However, standard LLMs often struggle with two critical issues: domain-specific accuracy and alignment with complex educational rubrics. Without specialized context, LLMs may produce scientifically inaccurate evaluations or fail to apply the nuanced criteria defined by educational standards. To address these challenges, this paper introduces GradeRAG, an adaptive Retrieval-Augmented Generation framework designed to improve the accuracy and reliability of LLM-based grading in science education.

The GradeRAG Framework

GradeRAG enhances the grading capabilities of LLMs by providing them with a curated, domain-specific knowledge base. The core innovation of the framework lies in its specialized knowledge architecture and its multi-faceted retrieval strategy.

Triple-Index Knowledge Base

Rather than relying on a monolithic data source, GradeRAG utilizes a "triple-index" system to provide the LLM with diverse layers of context:

  1. General Standards ($K_{D1}$): Broad educational guidelines, such as the Framework for K-12 Science Education, which provide the foundational principles of the domain.
  2. Task-Specific Knowledge ($K_{D2}$): Detailed learning progressions and specific rubrics tailored to the exact question being graded.
  3. Expert Examples ($K_E$): A library of student responses previously graded by human experts, including "scoring rationales" that explain the logic behind specific scores.

Dual Retrieval and Reranking

To ensure the most relevant information is surfaced, GradeRAG employs a weighted reranking mechanism. Instead of relying solely on semantic vector search, the system combines three metrics: semantic similarity (40%), keyword overlap (30%), and domain-specific concept coverage (30%). This ensures that the retrieved context is not just linguistically similar but also conceptually relevant to the scientific principles at hand.

LLM-as-a-Grader

The framework utilizes GPT-4o-mini as the primary grading engine. A key procedural element is the instruction for the model to generate a reasoning rationale before assigning a numerical score. This chain-of-thought approach encourages the model to ground its evaluation in the retrieved evidence and expert examples, mimicking the process of a human educator.

Experimental Design

The researchers evaluated GradeRAG using a dataset of student responses from two middle schools in the Midwestern United States. The dataset included three NGSS-aligned science tasks. To establish a ground truth, responses were independently graded by two content experts across the three dimensions (DCI, SEP, and CCC), with any discrepancies resolved through consensus.

The performance of GradeRAG was compared against "NonRAG" baselines in both zero-shot and few-shot configurations to determine the impact of retrieved context on grading accuracy and consistency.

Key Results and Insights

Performance Gains

GradeRAG demonstrated significant improvements over baseline models. The most notable gains were observed in Question 1, where the framework achieved a 13.1% increase in DCI accuracy and a 21.8% increase in CCC accuracy. Furthermore, the system showed improved Cohen’s Kappa scores, indicating a higher level of reliability and alignment with human expert grading patterns.

The Impact on Crosscutting Concepts (CCCs)

One of the most significant findings was that CCCs—which involve abstract ideas like "Cause and Effect" or "Systems and System Models"—benefited the most from RAG. These concepts saw an average accuracy boost of 13%. This suggests that the contextual "connective tissue" provided by the retrieval system is particularly effective at helping LLMs navigate abstract scientific reasoning.

The "Sweet Spot" of Context

The study revealed a delicate balance between retrieved knowledge and model performance. In zero-shot settings, retrieving four chunks of knowledge was found to be optimal. However, as more few-shot examples were added to the prompt, the benefit of additional retrieved chunks decreased. In some cases, adding too many examples (e.g., moving from 3-shot to 6-shot) led to "information excessiveness," where the model became overwhelmed by context, resulting in diminishing returns or performance drops.

RAG as a Substitute for Few-Shot Examples

Interestingly, the results indicated that RAG can serve as an effective substitute for extensive few-shot examples. A zero-shot model equipped with GradeRAG often performed comparably to a few-shot model without it, suggesting that dynamic retrieval can reduce the need for manually curated example sets in the prompt.

Discussion and Future Work

While GradeRAG significantly improves grading for many tasks, the researchers noted that gains were more moderate for highly complex questions involving multiple score levels and balanced class distributions. This suggests that while RAG provides the necessary knowledge, the underlying reasoning capabilities of the LLM still face challenges with high-complexity rubrics.

Future research will focus on dynamic "context pruning" to manage the information load and prevent the model from becoming overwhelmed. Additionally, the authors aim to test the framework's generalizability in higher-level university settings, such as physics or chemistry, where the technical terminology and conceptual density are even greater.

In conclusion, GradeRAG represents a significant step forward in automated assessment, demonstrating that specialized retrieval strategies can bridge the domain gap and bring AI-driven grading closer to the standard of human expertise.

Summary updated

Abstract

Short answer assessment is a vital component of science education, allowing evaluation of students' complex three-dimensional understanding. Large language models (LLMs) that possess human-like ability in linguistic tasks are increasingly popular in assisting human graders to reduce their workload. However, LLMs' limitations in domain knowledge restrict their understanding in task-specific requirements and hinder their ability to achieve satisfactory performance. Retrieval-augmented generation (RAG) emerges as a promising solution by enabling LLMs to access relevant domain-specific knowledge during assessment. In this work, we propose an adaptive RAG framework for automated grading that dynamically retrieves and incorporates domain-specific knowledge based on the question and student answer context. Our approach combines semantic search and curated educational sources to retrieve valuable reference materials. Experimental results in a science education dataset demonstrate that our system achieves an improvement in grading accuracy compared to baseline LLM approaches. The findings suggest that RAG-enhanced grading systems can serve as reliable support with efficient performance gains.
BibTeX
@inproceedings{chu2025enhancing,
  author = {Yucheng Chu and Peng He and Hang Li and Haoyu Han and Kaiqi Yang and Yu Xue and Tingting Li and Joseph Krajcik and Jiliang Tang},
  title = {{Enhancing LLM-Based Short Answer Grading with Retrieval-Augmented Generation}},
  booktitle = {EDM},
  year = {2025},
}
Figure