Learn Before
Crafting a Code Completion Prompt for a Python Dictionary
You are working with a dataset of user profiles and need to create a Python dictionary representing a single user. You have started the dictionary but want a language model to complete it according to specific requirements. The user should have an 'age' key (with an integer value) and an 'interests' key (with a list of strings). Write a clear and effective prompt that instructs a language model to complete the following Python code snippet:
user_profile = {'name': 'Alex',
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
A developer wants to use a language model to generate a Python function that takes two numbers as input and returns their sum. Which of the following prompts is best structured to elicit the most accurate and complete code for this specific task?
Debugging a Code Completion Prompt
Crafting a Code Completion Prompt for a Python Dictionary