Retrieval-Augmented Generation for Natural Language Processing: A Survey
To address hallucination, knowledge staleness, and poor domain adaptability in large language models (LLMs), this paper conducts a systematic study of retrieval-augmented generation (RAG). We propose a full-stack RAG framework encompassing retriever design (dense, sparse, and hybrid), query rewriting, context fusion, LLM fine-tuning, and prompt engineering. We introduce the first taxonomy for dynamic knowledge updating and establish a multidimensional evaluation benchmark that balances academic rigor with industrial practicality. Additionally, we release a structured RAG knowledge graph and fully reproducible open-source code. Our contributions significantly enhance RAG’s robustness and maintainability in real-world deployments, providing both theoretical foundations and engineering best practices for knowledge-enhanced generative systems.