Context-aware educational chatbots via retrieval-augmented generation
Main Article Content
Abstract
Relevance: The rapid digital transformation of higher education has created growing demand for context-aware academic support. Existing educational chatbots suffer from poor grounding and high hallucination rates. Purpose. This study develops a context-aware educational chatbot framework that improves reliability and contextual relevance in bilingual academic environments. Tasks: The tasks include constructing a bilingual corpus, contrastively fine-tuning a multilingual retrieval model, and evaluating the framework against baselines. Methods: Course documents are converted into a structured Vietnamese–English question–answer corpus via semantic chunking, automated question–answer generation and paraphrase augmentation. A Transformer-based bi-encoder is contrastively fine-tuned and indexed in a Facebook AI Similarity Search vector database. Retrieved passages and conversation history are combined before response generation. Scientific novelty: The study integrates a data-centric pipeline with retrieval-augmented generation for bilingual education and introduces contrastive fine-tuning of a compact multilingual bi-encoder for retrieval tasks. Practical significance: The framework delivers a scalable, resource-efficient solution for intelligent tutoring with potential for institutional deployment. Results: Experimental evaluation demonstrates strong retrieval accuracy and contextual relevance. The system retrieves the most relevant content in nearly eighty-seven percent of cases and retrieves relevant information within the top results in more than ninety-five percent of evaluations. Compared with retrieval-free systems, the proposed framework improves factual consistency and reduces inaccurate responses by more than one-half while achieving stronger contextual relevance and semantic similarity than a standard baseline. Conclusions: Structured corpus construction and retrieval quality are key factors affecting chatbot performance. The proposed compact retrieval-augmented framework consistently improves factual grounding and contextual relevance in bilingual educational settings.

