A short, hands-on introduction to prompting AI well — before you open RStudio
You'll be prompting AI constantly today — for R code, for debugging help, for explanations of error messages. This short warm-up covers the one skill that determines whether that goes well: writing prompts that actually give the model what it needs. AI is a fast collaborator, not a source of truth — every section below builds toward a habit of verification that you should carry into RStudio right after this.
AI models are fluent, not necessarily correct. A model can produce a confident, well-formatted answer that is factually wrong — a plausible-looking but incorrect statistic, code that runs without error but does the wrong thing. Nothing about how polished the output looks tells you whether it's accurate.
This is the idea of human in the loop: the model generates, but a person checks. That responsibility stays with you today, whether you're refining a prompt or asking AI to write a line of R.
Compare these two prompts. Both were given to the same model.
"I need to understand American democracy for a paper I'm writing."
"You are a PhD student studying comparative political institutions. Explain, in plain terms, how democratic accountability works in the United States, focusing on the checks between the executive and legislative branches. Bullet points, under 150 words, written for an undergraduate audience."
The weak prompt sounds like it has context — "a paper I'm writing" — but tells the model nothing about the argument, the angle, or what "understand" should actually produce. The strong prompt succeeds because it supplies five things the model cannot guess on its own:
Each of these has the same gaps as the example above — "my data," "my research," "my paper" are gestured at but never actually described:
Check your rebuild against a model answer for each discipline:
"I have some GIS data on land use — what should I do with it?"
"You are a PhD student using GIS to study land-use change. I have parcel-level land-use data for a mid-sized U.S. county from 2010–2020. Suggest three exploratory analyses that could reveal patterns of urban sprawl, and briefly explain what each would show. Bullet points, under 200 words."
"I'm looking at crime data for my research — what does the data say?"
"You are a PhD student in criminology analyzing city-level crime data. My dataset has monthly reported crime counts by offense type for one city from 2015–2023. Suggest three visualizations that would help spot seasonal or long-term trends, and explain what each would reveal. Bullet points, under 200 words."
"I found this economic trend in my data — what does it mean?"
"You are a PhD student in economics studying a trend in my dataset. My data shows quarterly unemployment and inflation rates for one country over the last 20 years, both rising together. Explain what that pattern would suggest about the underlying economy, and note two limitations of drawing conclusions from this data alone. Bullet points, under 200 words."
"I need some background on political institutions for my paper."
"You are a PhD student in political science. I'm writing a paper comparing how presidential and parliamentary systems handle legislative gridlock. Summarize the key structural differences relevant to gridlock, formatted as a short comparison table."