pith. sign in

arxiv: 2501.01329 · v1 · pith:2Z6PEGGSnew · submitted 2025-01-02 · 💻 cs.SE · cs.AI· cs.CL

The Prompt Alchemist: Automated LLM-Tailored Prompt Optimization for Test Case Generation

classification 💻 cs.SE cs.AIcs.CL
keywords promptspromptllmstestcasesautomatedcasedifferent
0
0 comments X
read the original abstract

Test cases are essential for validating the reliability and quality of software applications. Recent studies have demonstrated the capability of Large Language Models (LLMs) to generate useful test cases for given source code. However, the existing work primarily relies on human-written plain prompts, which often leads to suboptimal results since the performance of LLMs can be highly influenced by the prompts. Moreover, these approaches use the same prompt for all LLMs, overlooking the fact that different LLMs might be best suited to different prompts. Given the wide variety of possible prompt formulations, automatically discovering the optimal prompt for each LLM presents a significant challenge. Although there are methods on automated prompt optimization in the natural language processing field, they are hard to produce effective prompts for the test case generation task. First, the methods iteratively optimize prompts by simply combining and mutating existing ones without proper guidance, resulting in prompts that lack diversity and tend to repeat the same errors in the generated test cases. Second, the prompts are generally lack of domain contextual knowledge, limiting LLMs' performance in the task.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 7 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. FeedbackLLM: Metadata driven Multi-Agentic Language Agnostic Test Case Generator with Evolving prompt and Coverage Feedback

    cs.SE 2026-05 unverdicted novelty 6.0

    FeedbackLLM uses line and branch coverage feedback agents in an iterative multi-agent process with a redundancy cache to generate test cases achieving higher coverage than baselines on standard C and Python benchmarks...

  2. Generalizing Test Cases for Comprehensive Test Scenario Coverage

    cs.SE 2026-04 unverdicted novelty 6.0

    TestGeneralizer generalizes an initial test into a set of executable tests covering more diverse scenarios, delivering +31.66% mutation-based and +23.08% LLM-assessed scenario coverage gains over ChatTester on 12 open...

  3. Agentic Learner with Grow-and-Refine Multimodal Semantic Memory

    cs.AI 2025-11 unverdicted novelty 6.0

    ViLoMem is a dual-stream grow-and-refine memory system that separates visual and logical error patterns in MLLMs to improve pass@1 accuracy and reduce repeated mistakes across six multimodal benchmarks.

  4. Generating Project-Specific Test Cases with Requirement Validation Intention

    cs.SE 2025-07 unverdicted novelty 6.0

    IntentionTest retrieves a reusable test from the project and edits it with an LLM to match a supplied validation intention, yielding tests that kill 28.1-37.6% more mutants, share 16.9-23.9% more coverage, and produce...

  5. Mutation-Guided Unit Test Generation with a Large Language Model

    cs.SE 2025-06 conditional novelty 6.0

    MUTGEN incorporates mutation feedback into LLM prompts and uses iteration to generate unit tests that achieve higher mutation scores than EvoSuite or vanilla LLM prompting on 204 benchmark subjects.

  6. SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agents

    cs.SE 2026-06 unverdicted novelty 5.0

    SWE-MeM introduces adaptive memory management for coding agents via synthesized trajectories and Memory-aware GRPO, reporting 43.4% and 60.2% resolve rates on SWE-Bench Verified for 4B and 30B models while beating bas...

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

    cs.SE 2026-05 unverdicted novelty 5.0

    PPO-LLM adaptively selects among eight prompting techniques using an 11-dimensional state vector to guide an LLM toward higher branch and line coverage than static baselines on 20 benchmark programs.