Hamed Taherkhani
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Research Subjects
Hamed Taherkhani has a total of 8 co-authors. Here are the top co-authors by number of shared publications:
- Hadi Hemmati
York University, Canada
2 shared publications - Hung Viet Pham
York University, Toronto, Canada
1 shared publication - Jiho Shin
Queen's University, Kingston, Canada
1 shared publication - Melika Sepidband
York University, Toronto, Ontario, Canada
1 shared publication - Muhammad Ammar Tahir
University of Washington, Seattle, WA, USA
1 shared publication - Rakib Hossain Misu
University of California, Irvine, CA, USA
1 shared publication
Latest Publications
- Open Access
- 18 November 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (12) , 1-26
Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithms
Large Language Models (LLMs) have seen increasing use in various software development tasks, especially in code generation. The most advanced recent methods attempt to incorporate feedback from code execution into prompts to help guide LLMs in generating correct code in an iterative process. While effective, these methods could be costly due to numerous interactions with the LLM and extensive token usage. To address this issue, we propose an alternative approach named Evolutionary Prompt Engineering for Code ( EPiC ) , which leverages a lightweight evolutionary algorithm to refine the original prompts into improved versions that generate high-quality code, with minimal interactions with the LLM. Our evaluation against State-of-the-Art (SOTA) LLM-based code generation agents shows that EPiC not only achieves up to 5% improvement in pass@k but is also 1.2–10 times more cost-effective than the baselines.
- 18 November 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (12) , 1-26
Open AccessAutomated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithms
Large Language Models (LLMs) have seen increasing use in various software development tasks, especially in code generation. The most advanced recent methods attempt to incorporate feedback from code execution into prompts to help guide LLMs in generating correct code in an iterative process. While effective, these methods could be costly due to numerous interactions with the LLM and extensive token usage. To address this issue, we propose an alternative approach named Evolutionary Prompt Engineering for Code ( EPiC ) , which leverages a lightweight evolutionary algorithm to refine the original prompts into improved versions that generate high-quality code, with minimal interactions with the LLM. Our evaluation against State-of-the-Art (SOTA) LLM-based code generation agents shows that EPiC not only achieves up to 5% improvement in pass@k but is also 1.2–10 times more cost-effective than the baselines.
- 13 February 2026
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 52 (4) , 1426-1445
Toward Automated Validation of Language Model Synthesized Test Cases Using Semantic Entropy
Modern Large Language Model (LLM)-based programming agents often rely on test execution feedback to refine their generated code. These tests are synthetically generated by LLMs. However, LLMs may produce invalid or hallucinated test cases, which can mislead feedback loops and degrade the performance of agents in refining and improving code. This paper introduces VALTEST, a novel framework that leverages semantic entropy to automatically validate test cases generated by LLMs. By analyzing the semantic structure of test cases and computing entropy-based uncertainty measures, VALTEST trains a machine learning model to classify test cases as valid or invalid and filters out invalid test cases. Experiments on multiple benchmark datasets and various LLMs show that VALTEST not only boosts test validity by up to 29% but also improves code generation performance, as evidenced by significant increases in pass@1 scores. Our extensive experiments also reveal that semantic entropy is a reliable indicator to distinguish between valid and invalid test cases and provides a robust solution for improving the correctness of LLM-generated test cases used in software testing and code generation.
- 13 February 2026
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 52 (4) , 1426-1445
Toward Automated Validation of Language Model Synthesized Test Cases Using Semantic Entropy
Modern Large Language Model (LLM)-based programming agents often rely on test execution feedback to refine their generated code. These tests are synthetically generated by LLMs. However, LLMs may produce invalid or hallucinated test cases, which can mislead feedback loops and degrade the performance of agents in refining and improving code. This paper introduces VALTEST, a novel framework that leverages semantic entropy to automatically validate test cases generated by LLMs. By analyzing the semantic structure of test cases and computing entropy-based uncertainty measures, VALTEST trains a machine learning model to classify test cases as valid or invalid and filters out invalid test cases. Experiments on multiple benchmark datasets and various LLMs show that VALTEST not only boosts test validity by up to 29% but also improves code generation performance, as evidenced by significant increases in pass@1 scores. Our extensive experiments also reveal that semantic entropy is a reliable indicator to distinguish between valid and invalid test cases and provides a robust solution for improving the correctness of LLM-generated test cases used in software testing and code generation.