ARTFEED — Contemporary Art Intelligence

CangjieBench: New Benchmark for LLMs on Low-Resource Programming Language

ai-technology · 2026-08-15

A new benchmark called CangjieBench has been developed by researchers to assess large language models (LLMs) using Cangjie, a general-purpose programming language with limited resources. This benchmark features 248 carefully translated samples from HumanEval and ClassEval, encompassing both text-to-code and code-to-code tasks. The investigation evaluates various LLMs across four scenarios: direct generation, syntax-constrained generation, retrieval-augmented generation (RAG), and agent. Findings reveal that direct generation yields unsatisfactory results, while syntax-constrained generation strikes an optimal balance between accuracy and computational efficiency. This research fills a void in previous studies, which largely concentrated on domain-specific languages (DSLs), neglecting the challenges faced by general-purpose languages. The results underscore the difficulties LLMs encounter with low-resource languages and propose syntax-constrained generation as a viable enhancement strategy.

Key facts

  • CangjieBench is a contamination-free benchmark for Cangjie, a low-resource general-purpose programming language.
  • The benchmark includes 248 high-quality samples manually translated from HumanEval and ClassEval.
  • It covers both Text-to-Code and Code-to-Code tasks.
  • Four evaluation settings were used: Direct Generation, Syntax-Constrained Generation, Retrieval-Augmented Generation (RAG), and Agent.
  • Direct Generation performed poorly, while Syntax-Constrained Generation offered the best trade-off between accuracy and computational cost.
  • Existing research on low-resource programming languages has focused on Domain-Specific Languages (DSLs), leaving general-purpose languages underexplored.
  • The study was published on arXiv under the identifier 2603.14501.

Entities

Institutions

  • arXiv

Sources