paper-with-me

Papers

Pragmatic Reasoning improves LLM Code Generation

2025-02-20 · Zhuchen Cao, Sven Apel, Adish Singla, Vera Demberg

Large Language Models (LLMs) have demonstrated impressive potential in translating natural language (NL) instructions into program code. However, user instructions often contain inherent ambiguities, making it challenging for LLMs to generate code that accurately reflects the user's true intent. To address this challenge, researchers have proposed to produce multiple candidates of the program code and then rerank them to identify the best solution. In this paper, we propose CodeRSA, a novel code candidate reranking mechanism built upon the Rational Speech Act (RSA) framework, designed to guide LLMs toward more comprehensive pragmatic reasoning about user intent. We evaluate CodeRSA using one of the latest LLMs on a popular code generation dataset. Our experiment results show that CodeRSA consistently outperforms common baselines, surpasses the state-of-the-art approach in most cases, and demonstrates robust overall performance. These findings underscore the effectiveness of integrating pragmatic reasoning into code candidate reranking, offering a promising direction for enhancing code generation quality in LLMs.

📄 PDF Abstract BibTeX arXiv:2502.15835

Code (0)

등록된 구현이 없습니다.

Tasks

Code GenerationReranking

Similar Papers 제목 키워드 기반

PragReST: Self-Reinforcing Counterfactual Reasoning for Pragmatic Language Understanding

2026-06-17 · Jihyung Park, Minchao Huang, Leqi Liu, Elias Stengel-Eskin arxiv

Natural language understanding often depends on meanings that are implied rather than explicitly stated, requiring pragmatic reasoning. Despite strong performance on math and logical reasoning, large language models (LLM…

Natural Language UnderstandingReinforcement LearningMathematical ReasoningLogical Reasoning

Modeling Cross-Cultural Pragmatic Inference with Codenames Duet

2023-06-04 · Omar Shaikh, Caleb Ziems, William Held, Aryan J. Pariani 외

Pragmatic reference enables efficient interpersonal communication. Prior work uses simple reference games to test models of pragmatic reasoning, often with unidentified speakers and listeners. In practice, however, speak…

Diversity as a By-Product: Goal-oriented Language Generation Leads to Linguistic Variation

2021-07-01 · SIGDIAL (ACL) 2021 7 · Simeon Schüz, Ting Han, Sina Zarrieß

The ability for variation in language use is necessary for speakers to achieve their conversational goals, for instance when referring to objects in visual environments. We argue that diversity should not be modelled as …

DiversityImage CaptioningText Generation

The Pragmatic Mind of Machines: Tracing the Emergence of Pragmatic Competence in Large Language Models

2025-05-24 · Kefan Yu, Qingcheng Zeng, Weihao Xuan, Wanxin Li 외

Current large language models (LLMs) have demonstrated emerging capabilities in social intelligence tasks, including implicature resolution (Sravanthi et al. (2024)) and theory-of-mind reasoning (Shapira et al. (2024)), …

Decoding, Fast and Slow: A Case Study on Balancing Trade-Offs in Incremental, Character-level Pragmatic Reasoning

2021-08-01 · INLG (ACL) 2021 8 · Sina Zarrieß, Hendrik Buschmeier, Ting Han, Simeon Schüz

Recent work has adopted models of pragmatic reasoning for the generation of informative language in, e.g., image captioning. We propose a simple but highly effective relaxation of fully rational decoding, based on an exi…

Image CaptioningInformativenessLanguage ModelingLanguage Modelling+1