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