Learn Before
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
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
Related
LLM Application in Error Detection and Correction
Simplified Deliberate-then-Generate Method for Deliberation Only
A user wants an AI model to translate the English sentence 'The early bird gets the worm' into formal Spanish. To improve the quality of the translation in a single attempt, the user provides the model with a flawed example. Which of the following prompts most effectively demonstrates the principle of learning from an incorrect example?
Improving LLM Code Generation with Prompting
Designing a Prompt for Enhanced Text Summarization