AI Prompting Guide for Economics Students
The Golden Rule
AI is your tutor, not your ghostwriter.
The goal is to understand code, not to have code written for you. When you graduate, you'll need to understand what code does, debug issues, and modify existing systems. AI helps you build these skills faster—but only if you use it correctly.
The EXPLORE Framework
When you encounter code you don't understand, use this framework:
E - Examine First
Before asking AI anything, spend 2 minutes examining the code yourself.
-
What do you think it does?
-
Which parts make sense?
-
Which parts are confusing?
X - eXplain Your Confusion
Tell AI specifically what confuses you, not just "explain this code."
Poor prompt: "Explain this code"
Better prompt: "I understand that this loads data from a file, but I don't understand what the square brackets do in line 5: df[df['year'] > 2000]"
P - Probe Deeper
Ask follow-up questions to build understanding.
-
"Why this approach instead of...?"
-
"What would happen if I changed X to Y?"
-
"When would I use this pattern?"
L - Link to Economics
Connect programming concepts to economic intuition.
-
"How is filtering data similar to selecting a subset of observations in a study?"
-
"Is this like calculating a summary statistic in Excel?"
O - Output Prediction
Before running code, predict what it will output. Ask AI to check your prediction.
-
"I think this will print the average GDP. Is that right?"
-
"I expect this will show a line graph. What will the axes be?"
R - Recreate Understanding
After AI explains something, explain it back in your own words.
- "So let me check I understand: this code is doing X because Y..."
E - Extend with Modifications
Test your understanding by modifying the code.
-
"If I wanted to filter for years after 2010 instead, what would I change?"
-
"How would I add another column to this calculation?"
Prompt Templates by Situation
When You Don't Understand Syntax
I'm looking at this Python code:
[paste the specific line or small block]
I understand [what you do understand], but I don't understand [specific confusion].
Can you explain what [specific syntax] does in simple terms?
Example:
I'm looking at this Python code:
growth_rates = df['gdp'].pct_change() * 100
I understand that df['gdp'] selects the GDP column, but I don't understand
what .pct_change() does and why we multiply by 100.
Can you explain what pct_change() calculates in simple terms?
When Code Gives an Error
I ran this code:
[paste your code]
And got this error:
[paste the full error message]
I expected the code to [what you expected].
Can you help me understand:
1. What does this error message mean in plain English?
2. Which line is causing the problem?
3. What might be wrong?
Don't give me the fix yet—I want to understand the problem first.
When You Want to Modify Code
I have this working code:
[paste the code]
It currently [what it does].
I want to modify it to [what you want instead].
Before you give me the solution:
1. Which part of the code controls [the thing you want to change]?
2. What concept or pattern is being used there?
Then show me the modification with explanation.
When You're Stuck on an Exercise
I'm working on this exercise: [describe the task]
Here's what I've tried:
[paste your attempt]
It's not working because [your diagnosis, or "I'm not sure why"].
Rather than giving me the answer, can you:
1. Tell me if I'm on the right track conceptually
2. Give me a hint about what to look at
3. Point me to a similar pattern in [reference notebook or example]
When Checking Your Understanding
I just learned about [concept].
Let me explain it back to check my understanding:
[your explanation in your own words]
Is this correct? What am I missing or getting wrong?
Red Flags: When You're Using AI Wrong
🚩 Copy-Paste Without Reading
If you paste AI's code and run it without reading each line, you're not learning.
Instead: Read the code AI provides. For each line, ask yourself: "What does this do? Why is it here?"
🚩 "Write code that does X"
Starting with this prompt skips the learning entirely.
Instead: "I need to do X. What approach should I take? What functions or patterns should I learn about?"
🚩 Multiple Errors in a Row
If you're asking AI to fix error after error, you're in debugging hell without understanding.
Instead: Stop. Ask AI to explain what your code is trying to do line by line. Rebuild understanding before continuing.
🚩 Can't Explain What Your Code Does
If someone asked "what does line 5 do?" and you couldn't answer, that's a problem.
Instead: Go through your code line by line with AI: "Explain what this line does in the context of my program."
🚩 Identical Code to AI Output
If your submitted work is character-for-character what AI produced, that's not your work.
Instead: Understand AI's suggestion, then rewrite it yourself. Make small modifications. Add your own comments.
Effective Learning Patterns
The "Explain Like I'm 5" Technique
Can you explain [concept] in very simple terms, without jargon?
Then show me the simplest possible code example.
The "Why Not" Technique
I see the code does [X]. Why doesn't it do [alternative approach]?
What are the trade-offs?
The "Break It" Technique
What would happen if I removed line [X]?
What would happen if I changed [value] to [other value]?
Help me understand by showing what goes wrong.
The "Trace Through" Technique
Can you trace through this code step by step, showing me:
- What's in each variable after each line
- What order things happen in
- What the final output would be
The "Connect the Dots" Technique
I learned [concept A] last week and now I'm seeing [concept B].
How are they related? When would I use one vs. the other?
Economics-Specific Prompts
For Data Analysis
I have economic data about [topic].
A economist would typically want to know [question].
What's the standard way to calculate/visualize this in Python?
For Interpreting Results
I ran a regression and got these results:
[paste output]
Can you help me interpret this economically?
- What does the coefficient on [variable] mean in real-world terms?
- Is the R-squared good or bad for this type of analysis?
- What should I be cautious about?
For Visualization
I want to visualize [economic concept/relationship].
What type of chart would an economist typically use?
Show me a simple example and explain why this chart type is appropriate.
Remember
The students who learn the most from AI are those who:
-
Try first before asking
-
Ask specific questions about what they don't understand
-
Verify understanding by explaining back and modifying
-
Connect concepts to economics and prior knowledge
-
Build gradually rather than copying complete solutions
AI can make you a faster learner or a lazier one. The choice is yours.
"The goal is not to get the right answer. The goal is to understand how to get the right answer."