PromptCraft-RAG: Context-based Prompt Enhancement of Refining Query for Retrieval Augmented Generation
Abstract
Retrieval-augmented generation (RAG) has become a transformative framework in Natural Language Processing (NLP). It contributes to the generation process by retrieving relevant information from external knowledge bases, thus making the responses more accurate and contextualized. Recent developments in RAG have renewed interest in optimizing RAG frameworks, such as improving the efficiency of the retrieval module, query reconstruction, refinement, ranking mechanisms, and resolution of hallucinations. However, RAG still faces significant bottlenecks, especially when it comes to understanding knowledge sources and user prompts. Prompt enhancement is a critical but not explored aspect of the RAG field. Inspired by Refine Query for Retrieval Augmented Generation (RQ-RAG), this paper proposes prompt pruning and prompt enhancement as innovative solutions to improve prompts iteratively for better retrieval and generated results. It also attempts to expand the dataset to cover multiple tasks in various scenarios. Experimental comparisons between RQ-RAG and PromptCraft-RAG (PC-RAG) show competitive performance: RQ-RAG achieves 68.3 (single-hop Question Answering (QA)) and 49.7 (multi-hop QA), while PC-RAG scores 68.1 and 51.7, respectively.
References
- Rikkat, D. R., Sagar, M., & Morris, M. R. (2024). IntellBot: Retrieval augmented LLM chatbot for cyber threat knowledge delivery. arXiv print, 5442.
- Roth, K., Gupta, R., Halle, S., & Liu, B. (2024). Pairing analogy-augmented generation with procedural memory for procedural Q&A. arXiv print, 1344.
- Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., ... & Kiela, D. (2020). Retrieval-augmented generation for knowledge-intensive NLP tasks. Advances in neural information processing systems, 33, 9459-9474.
- Chan, C. M., Xu, C., Yuan, R., Luo, H., Xue, W., Guo, Y., & Fu, J. (2024). Rq-rag: Learning to refine queries for retrieval augmented generation. arXiv print, 610.
- Anjum, S., Zhang, H., Zhou, W., Paek, E. J., Zhao, X., & Feng, Y. (2024). HALO: Hallucination analysis and learning optimization to empower LLMs with retrieval-augmented context for guided clinical decision making. arXiv print, 10011.
- Guo, Z., Xia, L., Yu, Y., Ao, T., & Huang, C. (2024). LightRAG: Simple and fast retrieval-augmented generation. arXiv print, 5779.
- Jin, Q., Dhingra, B., Liu, Z., Cohen, W. W., & Lu, X. (2019). Pubmedqa: A dataset for biomedical research question answering. arXiv print, 6146.
- Lin, C. Y., & Och, F. J. (2004). Looking for a few good metrics: ROUGE and its evaluation. Ntcir workshop, 1-8.
- Walker, S. M. (2023). What is the ROUGE score (Recall-Oriented Understudy for Gisting Evaluation). Klu.ai. Retried from https://klu.ai/glossary/rouge-score.