Prompting strategy
To leverage ChatGPT for machine learning, we need to have a clear understanding of how to implement the prompting strategies specifically for code generation for machine learning.
Let’s brainstorm what we would like to achieve in this task to get a better understanding of what needs to go into the initial prompt.
Strategy 1: Task-Actions-Guidelines (TAG) prompt strategy
1.1 – Task: The specific task or goal is to create a simple linear regression model to predict the “Yearly Amount Spent” by dataset based on various attributes in the dataset.
1.2 – Actions: In this case, the strategy is to let ChatGPT decide the steps, hence no specific steps are provided.
1.3 – Guidelines: We will provide the following guidelines to ChatGPT in our prompt:
- The code should be compatible with Jupyter Notebook
- Ensure that there are detailed comments for each line of code.
- You have to explain each...