[2510.22210] LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation
About this article
Abstract page for arXiv paper 2510.22210: LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation
Computer Science > Software Engineering arXiv:2510.22210 (cs) [Submitted on 25 Oct 2025 (v1), last revised 2 Mar 2026 (this version, v2)] Title:LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation Authors:Gwihwan Go, Quan Zhang, Chijin Zhou, Zhao Wei, Yu Jiang View a PDF of the paper titled LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation, by Gwihwan Go and 4 other authors View PDF HTML (experimental) Abstract:Automated unit test generation is essential for robust software development, yet existing approaches struggle to generalize across multiple programming languages and operate within real-time development. While Large Language Models (LLMs) offer a promising solution, their ability to generate high coverage test code depends on prompting a concise context of the focal method. Current solutions, such as Retrieval-Augmented Generation, either rely on imprecise similarity-based searches or demand the creation of costly, language-specific static analysis pipelines. To address this gap, we present LSPRAG, a framework for concise-context retrieval tailored for real-time, language-agnostic unit test generation. LSPRAG leverages off-the-shelf Language Server Protocol (LSP) back-ends to supply LLMs with precise symbol definitions and references in real time. By reusing mature LSP servers, LSPRAG provides an LLM with language-aware context retrieval, requiring minimal per-language engineering effort. We evaluated LSPRAG on open-s...