mlsanityData to 14 Oct 2026

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

arXiv 2609.18959 ↗First posted 15 Jul 2026cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 18 of its 31 references that are in the map. First posted on arXiv 15 Jul 2026.

Builds on

18 of 31 references.

References · 18

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2021Program Synthesis with Large Language Modelscited by 3,637
  3. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  4. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  5. 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,989
  6. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  7. 2021Measuring Coding Challenge Competence With APPScited by 902
  8. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  9. 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 853
  10. 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 682
  11. 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 452
  12. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 300
6 more
  1. 2025Chain of Draft: Thinking Faster by Writing Lesscited by 297
  2. 2020Byte Pair Encoding is Suboptimal for Language Model Pretrainingcited by 192
  3. 2014A Comparative Study of Programming Languages in Rosetta Codecited by 19
  4. 2024Transforming Software Development: Evaluating the Efficiency and Challenges of GitHub Copilot in Real-World Projectscited by 18
  5. 2025Mix-of-Language-Experts Architecture for Multilingual Programmingcited by 3
  6. 2025Programming Language Confusion: When Code LLMs Can't Keep their Languages Straightcited by 2

Built on by

Not cited yet.