PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generation

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Koushik, Gourisetty Venkata Sai, Aditya, Dama, Sai, Mahankali Harish, Siddarhta, Peddi, Ahmad, Shadab, Yelleti, Vivek
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911639704436736
author Koushik, Gourisetty Venkata Sai
Aditya, Dama
Sai, Mahankali Harish
Siddarhta, Peddi
Ahmad, Shadab
Yelleti, Vivek
author_facet Koushik, Gourisetty Venkata Sai
Aditya, Dama
Sai, Mahankali Harish
Siddarhta, Peddi
Ahmad, Shadab
Yelleti, Vivek
contents Developing effective test cases capable of thoroughly exercising large-scale software systems is inherently difficult, especially if such systems have voluminous, complex, and deeply nested source codes. In this work, we present a novel approach for generating test cases using a reinforcement learning-driven agentic framework where Proximal Policy Optimization (PPO) is coupled with an LLM engine to guide prompt selection during test generation. Our approach consists of two phases. In Phase I, the ToT-guided optimization agent partitions and minimizes the source code by removing redundancies without changing the functional behavior of the source code. In Phase II, a PPO-based policy network is trained to solve the problem of selecting prompts among eight different prompting techniques, such as Boundary Value Analysis, Random Fuzzing, etc., based on the inputted 11-dimensional state vector representing the source code complexity metrics and live coverage metrics to direct the LLM engine towards exploring unvisited paths in the program. The PPO agent receives rewards based on a combination of increases in line and branch coverages, penalties for unexplored branches, and rewards for reducing source code length. From experiments conducted on twenty benchmark programs, it is evident that the proposed approach, PPO-LLM, outperforms CBMC, kS-LLM, and kS-LLM++ in terms of branch and line coverage in almost all cases, for various loop bound values ranging from BOUND~1 to BOUND~2000. While at BOUND~1, the coverage of branches is 100\% using PPO-LLM on the PALS suite, in comparison, it is around 86.8\% using kS-LLM++. This confirms that adaptive prompt selection driven by PPO substantially outperforms static prompting strategies on PALS type programs.
format Preprint
id arxiv_https___arxiv_org_abs_2605_00942
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generation
Koushik, Gourisetty Venkata Sai
Aditya, Dama
Sai, Mahankali Harish
Siddarhta, Peddi
Ahmad, Shadab
Yelleti, Vivek
Software Engineering
Machine Learning
Developing effective test cases capable of thoroughly exercising large-scale software systems is inherently difficult, especially if such systems have voluminous, complex, and deeply nested source codes. In this work, we present a novel approach for generating test cases using a reinforcement learning-driven agentic framework where Proximal Policy Optimization (PPO) is coupled with an LLM engine to guide prompt selection during test generation. Our approach consists of two phases. In Phase I, the ToT-guided optimization agent partitions and minimizes the source code by removing redundancies without changing the functional behavior of the source code. In Phase II, a PPO-based policy network is trained to solve the problem of selecting prompts among eight different prompting techniques, such as Boundary Value Analysis, Random Fuzzing, etc., based on the inputted 11-dimensional state vector representing the source code complexity metrics and live coverage metrics to direct the LLM engine towards exploring unvisited paths in the program. The PPO agent receives rewards based on a combination of increases in line and branch coverages, penalties for unexplored branches, and rewards for reducing source code length. From experiments conducted on twenty benchmark programs, it is evident that the proposed approach, PPO-LLM, outperforms CBMC, kS-LLM, and kS-LLM++ in terms of branch and line coverage in almost all cases, for various loop bound values ranging from BOUND~1 to BOUND~2000. While at BOUND~1, the coverage of branches is 100\% using PPO-LLM on the PALS suite, in comparison, it is around 86.8\% using kS-LLM++. This confirms that adaptive prompt selection driven by PPO substantially outperforms static prompting strategies on PALS type programs.
title PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generation
topic Software Engineering
Machine Learning
url https://arxiv.org/abs/2605.00942