Metraipolis › archive › dc_1b49d640508b

LangSelect: Cost-Aware Target-Language Routing for LLM Code Generation — arXiv:2609.18959

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.18959
License (as archived)
CC0-1.0
Archived
2026-10-15T13:49:39.288Z
SHA-256 of the archived text
ffe9977f0e779e5e3b1f642751876e1cc9e39b20e84227e53a2c606410cbcdfe
Stable URL of this page
https://metraipolis.com/documento/dc_1b49d640508b

How to cite

LangSelect: Cost-Aware Target-Language Routing for LLM Code Generation — arXiv:2609.18959 — arXiv (en), https://arxiv.org/abs/2609.18959 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_1b49d640508b (Metraipolis archive dc_1b49d640508b, sha256 ffe9977f0e779e5e3b1f642751876e1cc9e39b20e84227e53a2c606410cbcdfe)
BibTeX
@misc{dc1b49d640508b,
  title = {LangSelect: Cost-Aware Target-Language Routing for LLM Code Generation — arXiv:2609.18959},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.18959},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_1b49d640508b; sha256 ffe9977f0e779e5e3b1f642751876e1cc9e39b20e84227e53a2c606410cbcdfe},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.18959. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

LLM code-generation systems usually choose a target programming language before decoding and treat that choice as fixed. We show that, for language-flexible programming tasks -- tasks where several target languages are acceptable and checkable by the same tests -- this choice is a measurable cost lever: verified implementations of the same task can differ substantially in generated-token length. We introduce LangSelect, a verification-aware router that selects the target language before generation and falls back when the first attempt fails. To separate offline routing opportunity from end-to-end behavior, we evaluate verified-solution replay, which chooses among already accepted corpus solutions, and live GPT-5 generation, which charges every generation attempt, including failures and fallbacks. On MultiLang-Bench, a 3,000-task, 8-language verified corpus, replay shows substantial language-routing headroom. In live evaluation on 450 held-out tasks, a train-split Domain heuristic baseline reduces harness-proxy tokens, which include wrapper and entrypoint overhead, by 50.3\% at 92.9\% pass after fallback, while a learned CodeBERT+metadata selector reaches the highest pass after fallback, 93.8\%, with a 3.7\% token increase. These results show that output-language routing can define a practical cost-correctness frontier for unit-test-verifiable code generation.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-17 in cs.CL).
Categorie arXiv: Computation and Language (cs.CL).
Pagina del lavoro: https://arxiv.org/abs/2609.18959 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-15T13:48:24.355Z dalla pagina https://arxiv.org/catchup/cs.CL/2026-09-17?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).