Architectural Evolution of Retrieval-Augmented Generation Engines: A Deep Dive into a Reactive gRPC Framework with Quarkus
Abstract
Recent advances in Artificial Intelligence (AI) have accelerated the use of Large Language Models (LLMs) in domain-specific applications, including healthcare. However, standalone LLMs remain limited by outdated internal knowledge and the risk of hallucinated responses. Retrieval-Augmented Generation (RAG) addresses this limitation by grounding generation in external knowledge sources. This paper presents the design and evaluation of a reactive gRPC-based engine implemented with Quarkus for low-latency clinical inquiry processing. The study focuses on inter-service communication efficiency through Protocol Buffers, asynchronous execution with SmallRye Mutiny, and native-oriented deployment characteristics. A key design distinction is that the current prototype employs a mock retrieval component for controlled evaluation of the communication layer rather than a production-grade vector store. Experimental results indicate that the architecture maintains sub-100 ms average latency under high concurrency while sustaining high throughput and low resource overhead, demonstrating its suitability for realtime decision-support pipelines.