Hybrid Layered Retrieval and Task-aware Embeddings for Efficient Persian RAG Systems
DOI:
https://doi.org/10.13052/jwe1540-9589.2552Keywords:
Retrieval-Augmented Generation (RAG), Natural Language Processing, Task-Specific Embeddings, Hybrid Retrieval, Low-Resource Languages, Layered Retrieval ArchitectureAbstract
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
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.

