A Hybrid BM25–Dense Retrieval Augmented Generation Framework for Reliable Turkish NLP
Özet
Large language models rely solely on the parametric knowledge acquired during training, and can therefore generate content that is inconsistent with the provided context — a phenomenon known as hallucination. This reliability problem becomes even more pronounced in low-resource languages such as Turkish, whose resources are limited and whose morphological structure is complex. Accordingly, this study proposes a Retrieval-Augmented Generation framework based on BM25 and dense retrieval in order to reduce hallucination.
The proposed system processes the user query through two parallel channels — classical keyword search and semantic vector search — and combines the resulting outputs to select the five most relevant documents. These documents are supplied as input to the Gemini 2.5 Pro model, which generates the answer solely on the basis of the provided context; the knowledge base is composed of approximately 49,394 Turkish academic articles compiled from DergiPark between 2020 and 2025.
In the evaluation phase, an automatically generated synthetic question–answer set was used, and measurement independence was ensured by employing different embedding models for generation and for evaluation.
The findings identify the retrieval side as the weak link of the system; its performance in locating relevant documents does not reach the expected level. Generation quality, however, is highly satisfactory. The faithfulness of the answers to the context was measured above 96% for both Gemini 2.5 Pro and Flash. Consequently, the model's rate of producing fabricated content appears to fall to almost zero.
In line with these results, the study reveals a hybrid design that addresses the agglutinative structure of Turkish through vector search and domain-specific English terms through keyword search, an independent evaluation approach, and the use of the faithfulness metric as a quantitative indicator of hallucination. Future work is planned to investigate query expansion, multi-step retrieval, and open-source Turkish models.
Anahtar Kelimeler: Large Language Models, RAG, Hallucination, Hybrid Information Retrieval, BM25, Dense Vector Retrieval, Context Faithfulness
Konu Alanı: Mühendislik -> Mühendislik (diğer) -> Bilgisayar Bilimleri ve Mühendisliği
Acikgoz, E. C., Erdogan, M., & Yüret, D. (2024). Bridging the Bosphorus: Advancing Turkish Large Language Models through Strategies for Low-Resource Language Adaptation and Benchmarking. 242–268. https://doi.org/10.18653/v1/2024.mrl-1.21
Atagong, S. D., Tonnang, H., Senagi, K., Wamalwa, M., Agboka, K., & Odindi, J. (2025). A review on knowledge and information extraction from PDF documents and storage approaches. Frontiers in Artificial Intelligence, 8, 1466092. https://doi.org/10.3389/frai.2025.1466092
Atagün, E., Güllü, M., Biroğul, S., & Barışçı, N. (2025). RETRIEVAL-AUGMENTED GENERATION IN TURKISH NATURAL LANGUAGE UNDERSTANDING: A COMPARATIVE STUDY OF LARGE LANGUAGE MODELS. Mugla Journal of Science and Technology, 11(2), 56–65. https://doi.org/10.22531/muglajsci.1781095
Bıkmaz, E. (2024). Türkçe Doğal Dil İşleme için Geri Çağırma Artırılmış Üretim (RAG) Yaklaşımı. Türkiye Bilişim Vakfı Bilgisayar Bilimleri ve Mühendisliği Dergisi.
Chen, J. B., Xiao, S., Zhang, P., Luo, K., Lian, D., & Liu, Z. (2024). M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2402.03216
Costa, A., Buccio, E. D., Melucci, M., & Nannicini, G. (2017). Efficient Parameter Estimation for Information Retrieval Using Black-Box Optimization. IEEE Transactions on Knowledge and Data Engineering, 30(7), 1240–1253. https://doi.org/10.1109/tkde.2017.2761749
Demner‐Fushman, D., & Lin, J. (2007). Answering Clinical Questions with Knowledge-Based and Statistical Techniques. Computational Linguistics, 33(1), 63–103. https://doi.org/10.1162/coli.2007.33.1.63
Es, S., James, J., Espinosa-Anke, L., & Schockaert, S. (2024). RAGAs: Automated Evaluation of Retrieval Augmented Generation. 150–158. https://doi.org/10.18653/v1/2024.eacl-demo.16
Gao, Y., Xiong, Y., Gao, X., Jia, K., Pan, J., Bi, Y., Dai, Y., Sun, J., Meng, W., & Haofen, W. (2023). Retrieval-Augmented Generation for Large Language Models: A Survey. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2312.10997
Gheorghe, C., Eric, B., Mike, S., Ice, P., Noveen, S., Inderjit, D., Marcel, B., Ori, R., Dan, Z., Evan, R., Luke, M., Sam, P., Colin, G., Asaf, A., Nathan, L., Cardal, P., Tiago, Henrik, J., Idan, S., Nan-Jiang, J., … Leland, R. (2025). Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilities. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2507.06261
Guan, X., Liu, Y., Lin, H., Lu, Y., He, B., Han, X., & Sun, L. (2024). Retrieval-Augmented Generation with Adaptive Retrieval. Proceedings of the ACL.
Huang, J., Chen, J., Lin, J., Qin, J., Feng, Z., Zhang, W., & Yu, Y. (2024). A Comprehensive Survey on Retrieval Methods in Recommender Systems. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2407.21022
Kalra, R. S., Wu, Z., Gulley, A., Hilliard, A., Guan, X., Koshiyama, A., & Treleaven, P. (2024). HyPA-RAG: A Hybrid Parameter Adaptive Retrieval-Augmented Generation System for AI Legal and Policy Applications. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2409.09046
Kaur, P., Pannu, H. S., & Malhi, A. (2020). Comparative analysis on cross-modal information retrieval: A review. Computer Science Review, 39, 100336. https://doi.org/10.1016/j.cosrev.2020.100336
Kim, J., & Min, M. (2024). From RAG to QA-RAG: Integrating Generative AI for Pharmaceutical Regulatory Compliance Process. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2402.01717
Knollmeyer, S., Caymazer, O., Koval, L., Akmal, M. U., Asif, S., Mathias, S. G., & Großmann, D. (2026). Evaluating Retrieval Augmented Generation: A Comprehensive Review of Evaluation Dimensions, Question Types, and Application. SN Computer Science, 7(5). https://doi.org/10.1007/s42979-026-05134-x
Köse, Ş., Baytekin, M. C., Aktaş, B. Y., Görür, B. K., Munis, E. A., Yılmaz, D., Kartal, M., & Toraman, Ç. (2026a). RAGTurk: Best Practices for Retrieval Augmented Generation in Turkish. ArXiv.Org. http://arxiv.org/abs/2602.03652
Köse, Ş., Baytekin, M. C., Aktaş, B. Y., Görür, B. K., Munis, E. A., Yılmaz, D., Kartal, M., & Toraman, Ç. (2026b). RAGTurk: Best Practices for Retrieval Augmented Generation in Turkish. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2602.03652
Krallinger, M., Rabal, O., Lourenço, A., Oyarzábal, J., & Valencia, A. (2017). Information Retrieval and Text Mining Technologies for Chemistry. Chemical Reviews, 117(12), 7673–7761. https://doi.org/10.1021/acs.chemrev.6b00851
Liu, F., Kang, Z., & Han, X. (2024). Optimizing RAG Techniques for Automotive Industry PDF Chatbots: A Case Study with Locally Deployed Ollama Models. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2408.05933
Malin, B., Kalganova, T., & Boulgouris, N. V. (2025). A Review of Faithfulness Metrics for Hallucination Assessment in Large Language Models. IEEE Journal of Selected Topics in Signal Processing, 19(7), 1362–1375. https://doi.org/10.1109/jstsp.2025.3579203
Malkov, Yu. A., & Yashunin, D. A. (2018). Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42(4), 824–836. https://doi.org/10.1109/tpami.2018.2889473
Mensah, F. K. (2026). From TF-IDF to BM25: Foundations of Term Weighting and Implications for Modern Information Retrieval Systems. Zenodo (CERN European Organization for Nuclear Research). https://doi.org/10.5281/zenodo.18358874
Meyer, S. D., Singh, S., Tam, B., Ton, C., & Ren, A. (2024). A Comparison of LLM Finetuning Methods & Evaluation Metrics with Travel Chatbot Use Case. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2408.03562
Mohtadi, S., & Demartini, G. (2026). Query-Document Dense Vectors for LLM Relevance Judgment Bias Analysis. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2601.01751
Omrani, P., Hosseini, A., Hooshanfar, K., Ebrahimian, Z., Toosi, R., & Akhaee, M. A. (2024). Hybrid Retrieval-Augmented Generation Approach for LLMs Query Response Enhancement. 22–26. https://doi.org/10.1109/icwr61162.2024.10533345
Onan, A., & Balbal, K. F. (2024). Improving Turkish Text Sentiment Classification Through Task-Specific and Universal Transformations: An Ensemble Data Augmentation Approach. IEEE Access, 12, 4413–4458. https://doi.org/10.1109/access.2024.3349971
Saad-Falcon, J., Khattab, O., Potts, C., & Zaharia, M. (2024). ARES: An Automated Evaluation Framework for Retrieval-Augmented Generation Systems. 338–354. https://doi.org/10.18653/v1/2024.naacl-long.20
Şakar, T., & Emekci, H. (2024). Maximizing RAG efficiency: A comparative analysis of RAG methods. Natural Language Processing., 31(1), 1–25. https://doi.org/10.1017/nlp.2024.53
Shen, C., Zhang, X., Shi, T., Zhang, C., Xie, G., & Xu, J. (2024). A Survey of Controllable Learning: Methods and Applications in Information Retrieval. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2407.06083
Terven, J., Córdova‐Esparza, D., Romero-González, J.-A., Ramírez-Pedraza, A., & Chávez‐Urbiola, E. A. (2025). A comprehensive survey of loss functions and metrics in deep learning. Artificial Intelligence Review, 58(7). https://doi.org/10.1007/s10462-025-11198-7
Uysal, E. S., & Amasyalı, M. F. (2025). Turkuaz-RAG — A Turkish Multi-Context Retrieval Benchmark. 1–6. https://doi.org/10.1109/asyu67174.2025.11208268
Wang, X., Wang, Z., Gao, X., Zhang, F., Wu, Y., Xu, Z., Shi, T., Wang, Z., Li, S., Qi, Q., Yin, R., Lv, C., Zheng, X., & Huang, J. X. (2024). Searching for Best Practices in Retrieval-Augmented Generation. In arXiv (Cornell University). Cornell University. https://doi.org/10.48550/arxiv.2407.01219
Whissell, J. S., & Clarke, C. L. A. (2011). Improving document clustering using Okapi BM25 feature weighting. Information Retrieval, 14(5), 466–487. https://doi.org/10.1007/s10791-011-9163-y
Wu, S., Sun, F., Zhang, W., Xie, X. H., & Cui, B. (2022). Graph Neural Networks in Recommender Systems: A Survey. ACM Computing Surveys, 55(5), 1–37. https://doi.org/10.1145/3535101
Wu, S., Xiong, Y., Cui, Y., Wu, H., Chen, C., Yuan, Y., Huang, L., Liu, X., Kuo, T., Guan, N., & Xue, C. J. (2026). Retrieval-augmented generation for natural language processing: a survey. In Artificial Intelligence Review. Springer Science+Business Media. https://doi.org/10.1007/s10462-026-11605-7
Xue, L., Constant, N., Roberts, A. P., Kale, M., Al‐Rfou, R., Siddhant, A., Barua, A., & Raffel, C. (2021). mT5: A Massively Multilingual Pre-trained Text-to-Text Transformer. 483–498. https://doi.org/10.18653/v1/2021.naacl-main.41
Yıldız, S. (2024). Turkish scene text recognition: Introducing extensive real and synthetic datasets and a novel recognition model. Engineering Science and Technology an International Journal, 60, 101881. https://doi.org/10.1016/j.jestch.2024.101881
Baş, T. Y., Karatoprak, B., & Sarıman, G. (2026). A Hybrid BM25–Dense Retrieval Augmented Generation Framework for Reliable Turkish NLP. In GÜLBANDILAR, E. (Ed.), Veriden Karara Bilgisayar Bilimlerinde Yapay Zekâ Temelli Yaklaşımlar (pp. 473-491). Vizetek Yayıncılık. https://doi.org/10.54637/vizetek.9786253824938
| Kitap: |
| Yayınevi:
Vizetek Yayıncılık |