Personalizing Student-Agent Interactions Using Log-Contextualized Retrieval Augmented Generation (RAG)

Collaborative dialogue offers rich insights into students' learning and critical thinking. This is essential for adapting pedagogical agents to students' learning and problem-solving skills in STEM+C settings. While large language models (LLMs) facilitate dynamic pedagogical interactions, potential hallucinations can undermine confidence, trust, and instructional value. Retrieval-augmented generation (RAG) grounds LLM outputs in curated knowledge, but its effectiveness depends on clear semantic links between user input and a knowledge base, which are often weak in student dialogue. We propose log-contextualized RAG (LC-RAG), which enhances RAG retrieval by incorporating environment logs to contextualize collaborative discourse. Our findings show that LC-RAG improves retrieval over a discourse-only baseline and allows our collaborative peer agent, Copa, to deliver relevant, personalized guidance that supports students' critical thinking and epistemic decision-making in a collaborative computational modeling environment, XYZ.
View on arXiv@article{cohn2025_2505.17238, title={ Personalizing Student-Agent Interactions Using Log-Contextualized Retrieval Augmented Generation (RAG) }, author={ Clayton Cohn and Surya Rayala and Caitlin Snyder and Joyce Fonteles and Shruti Jain and Naveeduddin Mohammed and Umesh Timalsina and Sarah K. Burriss and Ashwin T S and Namrata Srivastava and Menton Deweese and Angela Eeds and Gautam Biswas }, journal={arXiv preprint arXiv:2505.17238}, year={ 2025 } }