Enhanced Retrieval-Augmented Generation with Adaptive Query Rewriting and Caching
Bryan Lee, Yuto Mori
Department of Computer Science
Faculty Supervisor: Robert Mateescu
This project introduces enhancements to Retrieval-Augmented Generation (RAG) systems through adaptive query rewriting and intelligent caching. By implementing a dual-threshold mechanism for query reformulation, the system significantly improves its ability to interpret nuanced user intent. Additionally, a dynamic caching layer is employed to accelerate retrieval performance while maintaining high accuracy. It demonstrates these techniques within the legal domain, using the U.S. Constitution as the primary knowledge base. The system is designed not only to improve the precision and efficiency of RAG pipelines in real-world applications but also to address the issue of hallucination in large language models (LLMs). By optimizing query interpretation and minimizing redundant retrievals, the approach reduces computational costs and retrieval latency.