ExPairT-LLM: Exact Learning for LLM Code Selection by Pairwise Queries

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Yuviler, Tom, Drachsler-Cohen, Dana
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866912914620809216
author Yuviler, Tom
Drachsler-Cohen, Dana
author_facet Yuviler, Tom
Drachsler-Cohen, Dana
contents Despite recent advances in LLMs, the task of code generation is still challenging. To cope, code selection algorithms select the best program from multiple programs generated by an LLM. However, existing algorithms can fail to identify the correct program, either because they can misidentify nonequivalent programs or because they rely on an LLM and assume it always correctly determines the output for every input. We present ExPairT-LLM, an exact learning algorithm for code selection that selects a program by posing to an LLM oracle two new types of queries: pairwise membership and pairwise equivalence. These queries are simpler for LLMs and enable ExPairT-LLM to identify the correct program through a tournament, which is robust to some LLM mistakes. We evaluate ExPairT-LLM on four popular code datasets. Its pass@1 (success rate) outperforms the state-of-the-art code selection algorithm on average by +13.0% and up to +27.1%. It also improves the pass@1 of LLMs performing complex reasoning by +24.0%.
format Preprint
id arxiv_https___arxiv_org_abs_2511_10855
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ExPairT-LLM: Exact Learning for LLM Code Selection by Pairwise Queries
Yuviler, Tom
Drachsler-Cohen, Dana
Machine Learning
Despite recent advances in LLMs, the task of code generation is still challenging. To cope, code selection algorithms select the best program from multiple programs generated by an LLM. However, existing algorithms can fail to identify the correct program, either because they can misidentify nonequivalent programs or because they rely on an LLM and assume it always correctly determines the output for every input. We present ExPairT-LLM, an exact learning algorithm for code selection that selects a program by posing to an LLM oracle two new types of queries: pairwise membership and pairwise equivalence. These queries are simpler for LLMs and enable ExPairT-LLM to identify the correct program through a tournament, which is robust to some LLM mistakes. We evaluate ExPairT-LLM on four popular code datasets. Its pass@1 (success rate) outperforms the state-of-the-art code selection algorithm on average by +13.0% and up to +27.1%. It also improves the pass@1 of LLMs performing complex reasoning by +24.0%.
title ExPairT-LLM: Exact Learning for LLM Code Selection by Pairwise Queries
topic Machine Learning
url https://arxiv.org/abs/2511.10855