Research Article

Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs

Volume: 30 Number: 2 August 25, 2026
TR EN

Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs

Abstract

This study investigates an optimized Retrieval-Augmented Generation (RAG) architecture running entirely on local hardware to address the issues of recency and hallucination encountered in Turkish primary school mathematics education. Within the scope of the research, Llama3, Mistral, Gemma, and Phi3 language models were tested end-to-end using fixed and semantic chunking strategies alongside multilingual MiniLM and Turkish-specific BERTurk embedding models. The primary dataset comprises texts extracted from 25 educational videos, totaling approximately 20 hours of content, which were curated into a 1,270-row "Question-Answer-Context" ground truth set by two domain experts. The reliability of the dataset was validated with a Cohen’s Kappa coefficient of 0.85. Evaluation was conducted using Google Gemini as an LLM-as-a-Judge on a structured 1–5 Likert scale to measure relevance and faithfulness. Experimental findings indicate that the RAG architecture significantly improves reliability by reducing the hallucination rate in the Mistral model from 60% to 35%. The Gemma-7B model emerged as the most successful system, achieving a response time of ~2.4 seconds and an F1 score of 0.28. In conclusion, optimized local RAG architectures provide a robust, privacy-preserving alternative for Turkish educational technologies.

Keywords

References

  1. [1] Gao, Y. et al. 2023. Retrieval-Augmented Generation for Large Language Models: A Survey. arXiv preprint arXiv:2312.10997.
  2. [2] Tonmoy, S. M. et al. 2024. A Comprehensive Survey of Hallucination Mitigation Techniques in Large Language Models. arXiv preprint arXiv:2401.01313.
  3. [3] Liu, N. F. et al. 2024. Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics (TACL), 12, 157-173.
  4. [4] Lewis, P. et al. 2020. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Advances in Neural Information Processing Systems (NeurIPS), 33, 9459-9474.
  5. [5] Ji, Z. et al. 2023. Survey of hallucination in natural language generation. ACM Computing Surveys, 55(12), 1-38.
  6. [6] Kaya, Y. B. and Tantuğ, A. C. 2024. BERT2D: Two Dimensional Positional Embeddings for Efficient Turkish NLP. IEEE Access, 12, 77429-77441.
  7. [7] Schweter, S. 2020. BERTurk- BERT models for Turkish. Zenodo.
  8. [8] Reimers, N. and Gurevych, I. 2019. Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing (EMNLP).

Details

Primary Language

English

Subjects

Natural Language Processing

Journal Section

Research Article

Publication Date

August 25, 2026

Submission Date

March 18, 2026

Acceptance Date

July 28, 2026

Published in Issue

Year 2026 Volume: 30 Number: 2

APA
Ocak, A., Diri, S., & Kilimci, Z. H. (2026). Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi, 30(2), 140-153. https://doi.org/10.19113/sdufenbed.1912302
AMA
1.Ocak A, Diri S, Kilimci ZH. Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs. J. Nat. Appl. Sci. 2026;30(2):140-153. doi:10.19113/sdufenbed.1912302
Chicago
Ocak, Ahmet, Samet Diri, and Zeynep Hilal Kilimci. 2026. “Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs”. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi 30 (2): 140-53. https://doi.org/10.19113/sdufenbed.1912302.
EndNote
Ocak A, Diri S, Kilimci ZH (August 1, 2026) Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi 30 2 140–153.
IEEE
[1]A. Ocak, S. Diri, and Z. H. Kilimci, “Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs”, J. Nat. Appl. Sci., vol. 30, no. 2, pp. 140–153, Aug. 2026, doi: 10.19113/sdufenbed.1912302.
ISNAD
Ocak, Ahmet - Diri, Samet - Kilimci, Zeynep Hilal. “Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs”. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi 30/2 (August 1, 2026): 140-153. https://doi.org/10.19113/sdufenbed.1912302.
JAMA
1.Ocak A, Diri S, Kilimci ZH. Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs. J. Nat. Appl. Sci. 2026;30:140–153.
MLA
Ocak, Ahmet, et al. “Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs”. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi, vol. 30, no. 2, Aug. 2026, pp. 140-53, doi:10.19113/sdufenbed.1912302.
Vancouver
1.Ahmet Ocak, Samet Diri, Zeynep Hilal Kilimci. Mitigating Hallucinations in Third-Grade Primary Mathematics Education: An Empirical Analysis of Local RAG and LLMs. J. Nat. Appl. Sci. 2026 Aug. 1;30(2):140-53. doi:10.19113/sdufenbed.1912302

e-ISSN :1308-6529
Linking ISSN (ISSN-L): 1300-7688

All published articles in the journal can be accessed free of charge and are open access under the Creative Commons CC BY-NC (Attribution-NonCommercial) license. All authors and other journal users are deemed to have accepted this situation. Click here to access detailed information about the CC BY-NC license.