Case Study

Improving LLM Code Generation with Prompting

A developer is using a large language model to generate Python code. They have a strict, unconventional coding style requirement: all function names must be in PascalCase. However, their simple prompts consistently result in code with standard snake_case function names. Based on the principle of improving model performance by providing a flawed example, describe a new prompt the developer could use to get the desired output. Explain why this new prompt is more likely to succeed.

0

1

Updated 2025-10-03

Contributors are:

Who are from:

Tags

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Application in Bloom's Taxonomy

Cognitive Psychology

Psychology

Social Science

Empirical Science

Science