Detail
Conference Paper
Chain of Grounded Objectives: Concise Goal-oriented Prompting for Code Generation
- Authors
- Sangyeop Yeo, Seung-Won Hwang, Yu-Seung Ma
- Issue Date
- 2025-07
- Citation
- European Conference on Object-Oriented Programming (ECOOP) 2025, pp.1-25
- Language
- English
- Type
- Conference Paper
- Abstract
- The use of Large Language Models (LLMs) for code generation has gained significant attention in recent years. Existing methods often aim to improve the quality of generated code by incorporating additional contextual information or guidance into input prompts. Many of these approaches adopt process-oriented reasoning strategies, mimicking human-like step-by-step thinking; however, they may not always align with the structured nature of programming languages. This paper introduces Chain of Grounded Objectives (CGO), a concise goal-oriented prompting approach that embeds functional objectives into prompts to enhance code generation. By focusing on precisely defined objectives rather than explicit procedural steps, CGO aligns more naturally with programming tasks while retaining flexibility. Empirical evaluations on HumanEval, MBPP, their extended versions, and LiveCodeBench show that CGO achieves accuracy comparable to or better than existing methods while using fewer tokens, making it a more efficient approach to LLM-based code generation.
- KSP Keywords
- Contextual information, Efficient approach, Empirical evaluation, Goal-oriented, Human-like, Language Models, Reasoning strategies, Step-by-step, code generation, process-oriented, programming language
This work is distributed under the term of Creative Commons License (CCL)
(CC BY)
(CC BY)