Enhancing LLM Code Generation with Ensembles: A Similarity-Based Selection Approach
Abstract
Ensemble learning has been widely used in machine learning to improve model robustness, accuracy, and generalization, but has not yet been applied to code generation tasks with large language models (LLMs). In this paper, we propose an ensemble approach for LLMs in code generation. Instead of relying on the output of a single model, we generate multiple candidate programs from different LLMs and apply a structured voting mechanism to select the most reliable solution.
Fields of Study & Subjects
Digital Rights Management and Security
Publication details
- Journal / source
- Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering
- Publisher
- ACM
- Pages
- 220–232
- Publication date
- 12 April 2026
- Language
- EN