Hybrid Layered Retrieval and Task-aware Embeddings for Efficient Persian RAG Systems

Authors

  • Toktam Zoughi Department of Computer Engineering, Technical and Vocational University (TVU), Tehran, Iran https://orcid.org/0000-0002-1797-6910
  • Ehsan Arianyan Information Technology Faculty, ICT Research Institute, Tehran, Iran
  • Maryam Mahmoudi Information Technology Faculty, ICT Research Institute, Tehran, Iran
  • Mahtab Aghdamifard Department of Computer Engineering, Technical and Vocational University (TVU), Tehran, Iran
  • Mohadese Nikoogoftar Department of Computer Engineering, Technical and Vocational University (TVU), Tehran, Iran

DOI:

https://doi.org/10.13052/jwe1540-9589.2552

Keywords:

Retrieval-Augmented Generation (RAG), Natural Language Processing, Task-Specific Embeddings, Hybrid Retrieval, Low-Resource Languages, Layered Retrieval Architecture

Abstract

This study introduces task-injected layered hybrid retrieval-augmented generation (TILHR-RAG), a framework specifically designed for Persian to address the scarcity of native-language resources and the limitations of English-centric approaches. The architecture combines task-aware query augmentation, a layered retrieval strategy, and a hybrid semantic–lexical retriever, all supported by a multi-stage pipeline that includes preprocessing, document chunking, question generation, and embedding. A novel mechanism for injecting task-specific vectors directs retrieval toward domain intent while preserving comparability across documents. The layered design operates in three stages: per-task frequently asked questions (FAQ) retrieval, hybrid document search using FAISS semantic similarity combined with BM25 keyword matching, and a fallback response generated by a large language model (LLM). This structure ensures both precision and robustness. Comprehensive experiments across five progressively refined configurations demonstrate that TILHR-RAG achieves the best balance among accuracy, efficiency, and scalability, reaching 89.67% semantic accuracy with moderate latency and memory consumption on NVIDIA A100 hardware. Further evaluations on low-resource graphics processing units (GPUs) confirm that accuracy remains stable under hardware constraints, although latency increases significantly. Moreover, multilingual E5 embedding models substantially improve retrieval and generation quality for Persian – outperforming ParsBERT and Sentence-BERT (SBERT) – by mitigating challenges such as orthographic variation and complex compound word structures. Taken together, these findings establish task-injected layered hybrid retrieval-augmented generation as a practical, reproducible, and resource-efficient blueprint for Persian question answering, advancing retrieval-augmented generation for low-resource languages without requiring costly large language model fine-tuning, while also offering adaptable strategies for broader multilingual applications.

Downloads

Download data is not yet available.

Author Biographies

Toktam Zoughi, Department of Computer Engineering, Technical and Vocational University (TVU), Tehran, Iran

Toktam Zoughi received her Ph.D. in computer engineering (artificial intelligence) from Amirkabir University of Technology, Tehran, Iran, in 2019, and her M.Sc. in computer engineering (artificial intelligence) from Shiraz University, Shiraz, Iran, in 2010. Since January 2020 she has been an Assistant Professor in the Department of Electrical and Computer Engineering at Shariaty College, Technical and Vocational University (TVU), Tehran, Iran. Her research interests include natural language processing, deep learning, machine learning, speech processing, and image processing.

Ehsan Arianyan, Information Technology Faculty, ICT Research Institute, Tehran, Iran

Ehsan Arianyan received the M.S. and Ph.D. degrees from Amirkabir University of Technology, Tehran, Iran, in 2010 and 2015, respectively. Now, he is the head of the information technology research faculty and an assistant professor at the ICT Research Institute (ITRC). He is the author of more than 20 peer-reviewed papers as well as 5 books. His areas of interest include cloud computing, big data, parallel processing, and data centers.

Maryam Mahmoudi, Information Technology Faculty, ICT Research Institute, Tehran, Iran

Maryam Mahmoudi holds a B.S. in Software Engineering and an M.S. in Information Technology Engineering. She has been a researcher at the ICT Research Institute since 2012. Her research focuses on information retrieval, data mining, natural language processing, artificial intelligence, and generative AI. She is actively engaged in the enhancement and evaluation of large language models and intelligent assistants, with a particular focus on benchmark design and model assessment.

Mahtab Aghdamifard, Department of Computer Engineering, Technical and Vocational University (TVU), Tehran, Iran

Mahtab Aghdamifard received her technical diploma in computer and network systems from Honarafarinan Technical School. She earned both her associate’s and bachelor’s degrees in computer engineering from Shariaty Technical and Vocational College, Tehran, Iran. Her research interests include natural language processing (NLP), particularly Persian language processing, artificial intelligence, and data-driven approaches. She has been involved in several NLP-related projects and is interested in applying language technologies to real-world problems. She is currently a junior data scientist focusing on text processing and intelligent systems, with a particular interest in developing chatbots and intelligent assistants.

Mohadese Nikoogoftar, Department of Computer Engineering, Technical and Vocational University (TVU), Tehran, Iran

Mohadese Nikoogoftar received her diploma in mathematics and physics from Farzanegan4 High School and a bachelor’s degree in computer engineering from the Dr. Shariaty Technical and Vocational College. She is currently pursuing a master’s degree in computer engineering with a specialization in artificial intelligence at the University of Science and Culture. Her areas of expertise include Python programming and artificial intelligence, with a focus on chatbot development and predictive model design. She also has a strong interest in data analysis and enjoys working on projects that combine technical precision with practical problem-solving.

References

Petroşanu, D. M., Pîrjan, A., and Tãbuşcă, A. (2023). Tracing the influence of large language models across the most impactful scientific works. Electronics, 12(24), 4957.

Kumar, P. (2024). Large language models (LLMs): survey, technical frameworks, and future challenges. Artificial Intelligence Review, 57(10), 260.

Fan, W., Ding, Y., Ning, L., Wang, S., Li, H., Yin, D., … and Li, Q. (2024, August). A survey on rag meeting llms: Towards retrieval-augmented large language models. In Proceedings of the 30th ACM SIGKDD conference on knowledge discovery and data mining (pp. 6491–6501).

Han, B., Susnjak, T., and Mathrani, A. (2024). Automating systematic literature reviews with retrieval-augmented generation: a comprehensive overview. Applied Sciences, 14(19), 9103.

Wiratunga, N., Abeyratne, R., Jayawardena, L., Martin, K., Massie, S., Nkisi-Orji, I., … and Fleisch, B. (2024, June). CBR-RAG: case-based reasoning for retrieval augmented generation in LLMs for legal question answering. In International Conference on Case-Based Reasoning (pp. 445–460). Cham: Springer Nature Switzerland.

Shiraee Kasmaee, A. (2025). Domain-Specific Text Embedding Models for Information Retrieval (Doctoral dissertation).

Barron, R. C., Grantcharov, V., Wanna, S., Eren, M. E., Bhattarai, M., Solovyev, N., … and Alexandrov, B. S. (2024, December). Domain-specific retrieval-augmented generation using vector stores, knowledge graphs, and tensor factorization. In 2024 International Conference on Machine Learning and Applications (ICMLA) (pp. 1669–1676). IEEE.

Amur, Z. H., Kwang Hooi, Y., Bhanbhro, H., Dahri, K., and Soomro, G. M. (2023). Short-text semantic similarity (stss): Techniques, challenges and future perspectives. Applied Sciences, 13(6), 3911.

Jolfaei, S. A., and Mohebi, A. (2025). A review on persian question answering systems: from traditional to modern approaches. Artificial Intelligence Review, 58(5), 127.

Nurzhanov, A., and Sharipbay, A. (2024). Modern AI models for text analysis: A comparison of ChatGPT and RAG. Journal of Data Analytics and Artificial Intelligence Applications, 1(1), 1–13.

Tahir, H. A., Panula, T., Feli, M., and Omobolaji, A. R. (2025). Development of a Medical Question-Answering System Using Large Language Models with Retrieval Augmented Generation and Prompt Engineering. Health Technology.

Petroşanu, D. M., Pîrjan, A., and Tãbuşcã, A. (2023). Tracing the influence of large language models across the most impactful scientific works. Electronics, 12(24), 4957.

Chakraborty, S., Chowdhury, R., Shuvo, S. R., Chatterjee, R., and Roy, S. (2025). A scalable framework for evaluating multiple language models through cross-domain generation and hallucination detection. Scientific Reports, 15(1), 29981.

Toftdahl, J. C., Shahin, K. I., and Hylle, T. (2024, July). Enhancing Data Retrieval with Custom Embedding Models and ChatGPT. In 2024 IEEE 24th International Conference on Software Quality, Reliability and Security (QRS) (pp. 455-461). IEEE.

Mahboub, A., Za’ter, M. E., Al-Rfooh, B., Estaitia, Y., Jaljuli, A., and Hakouz, A. (2024). Evaluation of semantic search and its role in retrieved-augmented-generation (rag) for arabic language. arXiv preprint arXiv:2403.18350.

Abdelazim, H., Tharwat, M., and Mohamed, A. (2023). Semantic Embeddings for Arabic Retrieval Augmented Generation (ARAG). International Journal of Advanced Computer Science & Applications, 14(11).

Badaro, G., Baly, R., Hajj, H., El-Hajj, W., Shaban, K. B., Habash, N., … and Hamdi, A. (2019). A survey of opinion mining in Arabic: A comprehensive system perspective covering challenges and advances in tools, resources, models, applications, and visualizations. ACM Transactions on Asian and Low-Resource Language Information Processing (TALLIP), 18(3), 1–52.

Atlam, H. F. (2025). LLMs in Cyber Security: Bridging Practice and Education. Big Data and Cognitive Computing, 9(7), 184.

Kuratomi, G., Pirozelli, P., Cozman, F. G., and Peres, S. M. (2025). A RAG-Based Institutional Assistant. arXiv preprint arXiv:2501.13880.

Ding, W., Liang, P., Tang, A., and Van Vliet, H. (2014). Knowledge-based approaches in software documentation: A systematic literature review. Information and Software Technology, 56(6), 545–567.

Teixeira de Lima, R., Gupta, S., Berrospi, C., Mishra, L., Dolfi, M., Staar, P., and Vagenas, P. (2024). Know Your RAG: Dataset Taxonomy and Generation Strategies for Evaluating RAG Systems. arXiv e-prints, arXiv-2411.

Yang, J., Liu, Z., Xiao, S., Li, C., Lian, D., Agrawal, S., … and Xie, X. (2021). Graphformers: Gnn-nested transformers for representation learning on textual graph. Advances in Neural Information Processing Systems, 34, 28798–28810.

Hasan, S., and Rezai, A. (2025). LLM: Retreival vs. ParametricMemory Tradeoff: A Comparison of Retrieval-Augmented Generation and Standalone LargeLanguage Models Using RAGAS Answer Accuracy.

Burger, J., Cardie, C., Chaudhri, V., Gaizauskas, R., Harabagiu, S., Israel, D., … and Weishedel, R. (2001, July). Issues, tasks and program structures to roadmap research in question & answering (Q&A). In Document Understanding Conferences Roadmapping Documents (pp. 1–35).

Shehmir, S., and Kashef, R. (2025). LLM4Rec: A Comprehensive Survey on the Integration of Large Language Models in Recommender Systems – Approaches, Applications and Challenges. Future Internet, 17(6), 252.

Moniri, S., Schlosser, T., and Kowerko, D. (2024). Investigating the Challenges and Opportunities in Persian Language Information Retrieval through Standardized Data Collections and Deep Learning. Computers, 13(8), 212.

Downloads

Published

2026-07-06

How to Cite

Zoughi, T. ., Arianyan, E. ., Mahmoudi, M. ., Aghdamifard, M. ., & Nikoogoftar, M. . (2026). Hybrid Layered Retrieval and Task-aware Embeddings for Efficient Persian RAG Systems. Journal of Web Engineering, 25(05), 765–796. https://doi.org/10.13052/jwe1540-9589.2552

Issue

Section

Articles