Prompt Engineering for Research

Master four prompting techniques to supercharge your research workflow.

Introduction

⚡️ 30 Second Summary

Every research project lives or dies by the quality of its methodology, but choosing the right approach and designing solid instruments takes years of experience.

In this project, you will use four core prompt engineering techniques to tackle real research methodology tasks with Claude. You'll generate methodology recommendations, design instruments, analyze data, and stress-test a research design.

What You'll Build

You'll create a tested collection of research-focused prompts that demonstrate role prompting, iterative refinement, chain-of-thought prompting, and adversarial prompting.

Each technique targets a different stage of the research process: choosing a methodology, designing instruments, analyzing data, and finding weaknesses.

By the end of this project, you'll have:

  • 🎯 A methodology recommendation generated through role prompting.
  • 📋 A data collection instrument (survey or interview guide) refined through iterative prompting.
  • 🔍 A step-by-step data analysis walkthrough produced via chain-of-thought prompting.
  • 🛡️ A methodology critique that stress-tests your research design through adversarial prompting.
  • 💎 Secret Mission: Build a structured "mega-prompt" template that combines all four techniques.

Want a complete demo of how to do this project, from start to finish? Check out our walkthrough video with Maya.

Do I need to pay to do this project?

This project is completely free. You'll use Claude on the free tier at claude.ai. You can also substitute any other AI chatbot you prefer, such as ChatGPT or Gemini.

Not sure if this project is right for you? Check if it matches your goals

If you're up for a bit of a challenge, quiz yourself on the key concepts up ahead in this project.

Get Your Tools Ready

To build effective prompts for research, you need two things: an AI chatbot to work with and real data to analyze. Before we dive into prompt writing, let's make sure both are set up and ready to go.

In this step, get ready to:

  • Set up a Claude account.
  • Download a sample dataset for your research.
  • Verify your setup by starting a new conversation.

Set Up Claude

Claude by Anthropic is the AI chatbot we will use throughout this project. It is free to use and works well for research tasks.

Do you already have a Claude account?

✔️ I already have an account

  • Click Log in and enter your email and password.

You're all set. Move on to the next section below.

ⓧ I don't have an account yet

  • Enter your email address and create a password.
  • Verify your email.
  • Once verified, you will be logged in and ready to go.

Can I use a different AI chatbot?

Yes. While this project uses Claude, you can follow along with ChatGPT, Gemini, or another AI chatbot of your choice. The prompting techniques you learn here apply to any large language model.

Download Your Sample Data

To practice prompt engineering for research, you need real data to work with. Choose one of the datasets below based on your research interest, or bring your own data.

Quantitative (GPA dataset)

Link not working?

Download a backup copy here: gpa-dataset.csv.

💡 About this dataset

The OpenIntro GPA dataset comes from a study of 55 university students. It contains five variables: GPA, weekly study hours, nightly sleep hours, nights out per week, and gender. The variables have clear, testable relationships, which makes it a great fit for practicing quantitative analysis prompts.

Qualitative (interview transcripts)

Link not working?

Download a backup copy here: sheffield-interview-transcripts.zip.

💡 About this dataset

The Sheffield interview transcripts come from a University of Sheffield study on open qualitative research practices. The collection contains 15 .docx files of semi-structured interviews with researchers discussing data sharing, transparency, and collaboration in qualitative work. The interviews cover rich, thematic content, which makes them a great fit for practicing qualitative analysis prompts.

Bring your own data

Have your own dataset from a class, research project, or work? You can use that instead.

  • Make sure your data is in a text-friendly format (.csv, .txt, .docx, or similar).
  • Save the file somewhere easy to find, like your Desktop.

What formats work best?

Claude can read text pasted directly into the chat, and can also accept uploaded files. Plain text, CSV, and Word documents all work well.

🚨 Using your own qualitative data?

If you are working with real interview or survey data from human participants, check with your IRB (Institutional Review Board) or ethics committee before sharing it with an AI chatbot. Pasting participant responses into Claude sends that data to Anthropic's servers, which may violate your study's data handling agreement. The public datasets used in this project are already openly published, so they are safe to use.

Verify Your Setup

Now let's confirm everything is working. You will start a new conversation in Claude and check that you can provide data to it.

  • Go back to claude.ai.
  • Click New chat to start a fresh conversation.
  • Try typing a short message like Hello, I'm going to use you for a research project. and press Enter.

Claude should respond with a friendly reply. This confirms your account is active and ready.

  • Click the plus sign icon at the bottom of the chat window.
  • Click the paperclip icon or the attachment button to Add files.
  • Select your dataset file from your computer.
  • Type a message like Here is my dataset. Can you summarize what it contains? and press Enter.

Claude should read the file and respond with a summary of your data. This confirms file uploads are working.

Your AI chatbot is ready and your data is loaded.

Choose Your Research Question

Before moving on, decide on a research question that you will use throughout the rest of this project. This question will guide your methodology recommendation, instrument design, data analysis, and critique.

  • Write down a clear, focused research question: enter your research question

Not sure what research question to use?

Try one of these sample questions:

  • Quantitative: "What factors most influence undergraduate academic performance?"
  • Qualitative: "What are the key barriers and enablers for researchers adopting open qualitative research practices?"

Get Claude to Recommend a Research Approach

Your research environment is set up and you have a research question ready to explore. Now the real challenge begins: figuring out the best way to actually study your question. Choosing the wrong research methodology can waste months of effort or produce unreliable results.

This is where role prompting comes in. Instead of asking Claude a generic question, you will assign it a specific expert persona. This technique shapes the depth, perspective, and quality of the response you get back.

In this step, get ready to:

  • Craft a role prompt that assigns Claude an expert research methodology persona.
  • Generate a methodology recommendation from Claude based on your research question.
  • Evaluate how role framing shapes the quality of Claude's response.

Learn What Role Prompting Is

Before crafting your prompt, it helps to understand the technique you are about to use.

Role prompting is a prompt engineering technique where you assign the AI a specific identity, job title, or area of expertise before asking your question. Instead of asking Claude as a general assistant, you tell it to respond as a particular kind of expert.

Why does role prompting work?

When you assign Claude a role, it activates patterns from its training data that match that expertise. A prompt starting with "You are a research methodology professor" produces more structured, academically rigorous responses than the same question asked without a role. The framing acts like a filter, focusing the response on what matters for that domain.

Think about your research question from Step 1. You are going to ask Claude to recommend the best research methodology for studying it. Would you rather get advice from a general chatbot, or from a professor who has supervised 50+ dissertations? That is the power of role prompting.

Craft Your Role Prompt

Now it is time to build a prompt that assigns Claude the persona of a research methodology expert.

  • Open your Claude conversation from Step 1.
  • Copy and paste the following role prompting prompt into Claude:
You are an experienced research methodology professor
who has supervised 50+ dissertations across social sciences,
health sciences, and education.

A student comes to you with the following research question:
[[RESEARCH_QUESTION="enter your research question"]].

Recommend the most appropriate research methodology,
explaining your reasoning and listing the strengths
and limitations of your recommendation.
  • Press Enter to send the prompt.

What makes this a good role prompt?

Notice the structure: it defines who Claude is (experienced professor), establishes credibility (50+ dissertations, multiple fields), sets the scenario (student asking for advice), and specifies the output format (recommendation with reasoning, strengths, and limitations). Each of these elements guides the response.

Evaluate the Response

With Claude's recommendation in front of you, it is time to think critically about what you received.

  • Read through Claude's full response.

The recommendation should be structured with clear reasoning, not just a one-word answer. Pay attention to the specific research methodology recommended (e.g., mixed methods, case study, survey-based), the reasoning behind it, and the strengths and limitations listed.

The research methodology expert persona led Claude to give academic-style advice with structured pros and cons, rather than a casual suggestion. That is the role framing at work.

What if I disagree with the recommendation?

That is perfectly fine. The goal is not to blindly follow AI advice. The goal is to get a well-reasoned starting point that you can evaluate critically. Disagreeing with the AI is a sign of strong research thinking.

Compare your prompt

Now let's compare the structure of this response to what a generic, unframed question would produce.

  • Open a new Claude conversation.
  • Ask the same research question, but this time without any role assignment. Just type:
What research methodology should I use for:
[[RESEARCH_QUESTION="enter your research question"]]?
  • Compare the two responses side by side.

The role-prompted version should be noticeably more detailed, structured, and expert-sounding.

Your first role prompt is complete and you have seen the difference framing makes. Next up, you will learn a second technique to push Claude's responses even further by structuring your prompts with clear constraints and output formats.

Build a Survey or Interview Guide Through Iteration

You have a solid methodology picked out from Step 2. Now, to actually collect data for your research, you need a well-designed instrument. A generic first draft rarely captures the nuance your research question demands, so you will use a technique called iterative refinement to improve your instrument across multiple rounds of prompting.

In this step, you will start with a broad prompt and then sharpen it through follow-up conversations with Claude. This mirrors how real researchers draft, test, and revise their instruments before going into the field.

In this step, get ready to:

  • Draft an initial survey instrument or interview guide with Claude.
  • Refine your instrument through multiple rounds of follow-up prompts.
  • Evaluate the improvements between each round.

Draft Your First Instrument

Iterative refinement means you do not try to get a perfect result in a single prompt. Instead, you start broad and improve through a series of focused follow-up prompts. Each round of conversation builds on the last, letting you steer Claude toward exactly what you need. This is also called multi-turn prompting.

  • Continue your conversation with Claude from Step 2.
  • Choose the tab below that matches the type of research you are doing.

Quantitative (Survey)

  • Paste the following prompt into Claude:
Based on the methodology you just recommended
for my research question,
draft a 10-question survey instrument.

Include a mix of question types
(Likert scale, multiple choice, open-ended).
  • Press Enter and review Claude's response.

Claude will generate a full draft instrument with a mix of question types. Read through the questions carefully before moving on.

Qualitative (Interview Guide)

  • Paste the following prompt into Claude:
Based on the methodology you just recommended
for my research question,
draft a semi-structured interview guide
with 8-10 open-ended questions.

Include an opening question to build rapport,
core questions that explore the research topic,
and probing follow-up questions for each core question.
  • Press Enter and review Claude's response.

Claude will generate a structured interview guide with opening, core, and probing questions. Read through the guide carefully before moving on.

Why start broad?

A broad first prompt gives Claude room to interpret your topic and suggest question types you might not have considered. Starting too narrow can cause you to miss important angles.

Refine Your Instrument

Now that you have a first draft, it is time to refine it. Instead of starting over, you will continue the same conversation and ask Claude to improve specific parts. This is the core of iterative refinement.

Quantitative (Survey)

  • In the same conversation, paste the following prompt:
Revise questions 3 and 7 to reduce social desirability bias.

Add skip logic so that respondents who answer 'No'
to question 2 skip to question 5.

Also add a demographic section at the end.
  • Press Enter and review the updated instrument.

Notice how the revised version is more targeted. The questions are worded to reduce bias, the skip logic makes the survey smarter, and the demographic section gives you data to segment your results.

What is social desirability bias?

Social desirability bias is the tendency for respondents to answer in a way they think is socially acceptable rather than truthfully. Rewording questions to be less leading helps reduce this bias.

  • Review the changes and decide if you want to refine further. Try one more round with a prompt like:
Reorder the questions so they flow from general to specific.

Simplify any question that uses jargon
a non-expert would not understand.
  • Press Enter and compare this version to your original draft.

Qualitative (Interview Guide)

  • In the same conversation, paste the following prompt:
Revise the core questions to be more open-ended
and avoid leading language.

Add 1-2 probing follow-up questions for each core question
that dig deeper into the participant's experience.

Also add a closing question that invites the participant
to share anything else they think is relevant.
  • Press Enter and review the updated interview guide.

Notice how the revised version has more natural, open-ended phrasing and gives participants space to share deeper insights through the probing questions.

  • Review the changes and decide if you want to refine further. Try one more round with a prompt like:
Reorder the questions so they flow from broad context
to specific experiences.

Simplify any question that uses academic jargon
a participant would not understand.
  • Press Enter and compare this version to your original draft.

How do I know when my instrument is ready?

Your instrument is ready when each question clearly connects to your research question, the flow feels natural for a respondent, and there is no unnecessary jargon. If you are unsure, copy this prompt to Claude to ask it to evaluate your instrument.

You now have a polished research instrument that went through multiple rounds of refinement. Next up, you will put this instrument to use and learn how to analyze the data it collects.

Walk Claude Through a Step-by-Step Analysis

In Step 3, you built your data collection instrument and gathered sample data for your research project. Now it is time to actually analyze that data. But here is the challenge: if you just ask Claude to "analyze this data," the output can be shallow, inconsistent, or skip important steps entirely.

To get a thorough, reliable analysis, you need to teach Claude how to think through the problem systematically. That is exactly what chain-of-thought prompting does.

In this step, get ready to:

  • Write a chain-of-thought prompting prompt for your chosen analysis path.
  • Generate a complete AI analysis where Claude explains its reasoning at each stage.
  • Evaluate Claude's step-by-step analytical output.

See the Difference Chain-of-Thought Makes

Try this quick comparison to see chain-of-thought prompting in action.

  • Open a new conversation with Claude and paste or upload your dataset.
  • Type: Analyze this dataset. and press Enter.
  • Now open another new conversation, paste the same data, and type:
Walk me through an analysis step by step, explaining what you are doing and why at each stage.
  • Compare the two responses.

The first response likely gives a surface-level summary. The second forces Claude to work through each stage methodically, showing its reasoning. That is chain-of-thought prompting. You ask Claude to show its work.

Why does this matter for research?

Research analysis needs to be transparent and reproducible. When Claude explains each step, you can verify the logic, catch errors early, and cite the AI's process in your methodology section.

Run a Full Analysis

Now use chain-of-thought prompting to produce a complete analysis of your dataset. Choose the tab below that matches your data type.

Quantitative (GPA Dataset)

What is this dataset?

You will work with the OpenIntro GPA dataset. This dataset contains 55 rows of university student data with five variables: gpa, studyweek (study hours per week), sleepnight (sleep hours per night), out (nights out per week), and gender.

Exploratory data analysis is a systematic process of summarizing and visualizing data to understand its structure before running formal statistical tests.

  • Open a new conversation with Claude.
  • Paste the CSV data directly into the chat, or upload the CSV file.
  • Use the following chain-of-thought prompting prompt.
I have a dataset of 55 university students with these variables:
GPA, study hours per week, sleep hours per night,
nights out per week, and gender.

Walk me through a complete exploratory data analysis
step by step. For each step, explain what you are doing
and why before showing the result.

Start with descriptive statistics,
then look for patterns and relationships.
  • Press Enter to send your prompt.

Notice how Claude structures its response into distinct phases. It starts with descriptive statistics (means, medians, standard deviations), then moves to distributions, then examines correlations and patterns between variables.

What should I see?

Claude should produce a multi-section response with clear headings for each analytical step. You should see summary statistics, observations about the data distribution, and commentary on relationships between variables like study hours and GPA. Each section should include an explanation of why that step matters.

  • Review Claude's output carefully. Check whether it explains each analytical step before presenting results.
  • If Claude skips steps or provides results without explanation, ask a follow-up: "Can you go back and explain why you chose that approach before showing the results?"

Qualitative (Interview Transcripts)

Remind me what the Sheffield qualitative dataset contains?

You will work with interview transcripts from the Sheffield qualitative dataset. This collection contains 15 .docx interview files. For this exercise, pick one or two transcripts and paste the relevant sections into Claude.

Thematic analysis is a method for identifying, analyzing, and reporting patterns (themes) within qualitative data. It involves reading through text, generating codes, grouping codes into themes, and defining what each theme means.

  • Open a new conversation with Claude.
  • Copy and paste the relevant sections of your chosen transcript into the chat.
  • Use the following chain-of-thought prompting prompt.
I am going to share an interview transcript with you.

Walk me through a thematic analysis step by step.
For each step, explain what you are doing and why.

Start by reading through the transcript and noting
initial impressions, then identify codes, group them
into themes, and explain how the themes relate to each other.

Here is the transcript:
  • Press Enter to send your prompt.

Notice how Claude works through the analysis in distinct phases. It begins with initial impressions, then identifies specific codes in the text, groups those codes into broader themes, and finally discusses how the themes connect.

What should I see?

Claude should produce a structured response that mirrors the stages of thematic analysis. You should see initial observations, a list of codes with supporting quotes from the transcript, themes that group related codes together, and a discussion of how themes relate. Each section should explain the reasoning behind the analytical choices.

  • Review Claude's output carefully. Check whether it cites specific quotes from the transcript to support each code and theme.
  • If Claude provides themes without evidence, ask a follow-up prompt like: "Can you provide specific quotes from the transcript that support each theme?"

Evaluate Your Chain-of-Thought Output

Now that Claude has produced a step-by-step analysis, take a moment to evaluate the quality of the output.

  • Compare Claude's analysis to what you would expect from a manual analysis process and check whether it follows a logical sequence.
  • Check whether each step in Claude's response includes both an explanation (why this step) and a result (what was found).
  • Note any steps where Claude's reasoning seems unclear or where it jumped to conclusions without showing its work.

Why evaluate AI-generated analysis?

Chain-of-thought prompting improves Claude's output, but it does not guarantee perfection. As a researcher, your job is to critically evaluate AI-generated analysis the same way you would evaluate a human research assistant's work. Look for logical gaps, unsupported claims, and steps that were skipped.

  • Save your chain-of-thought prompt and Claude's full response. You will need them in the next step.

With a chain-of-thought analysis complete, you now have structured analytical output that shows its reasoning at every stage. Next up, you will learn how to critique and refine both your prompts and Claude's methodology to make your research even stronger.

Find Weaknesses in a Research Design

You have a complete data analysis plan from Step 4. But before any research can be trusted, it needs to survive scrutiny. Real researchers submit their work to peer review, where other experts actively try to find flaws. If the design holds up under that pressure, it is worth pursuing.

In this step, you will use a technique called adversarial prompting to make Claude act as a tough reviewer and find weaknesses in your research design. This is different from simply asking "is my design good?" because adversarial framing pushes the AI to dig deeper and be more critical.

In this step, get ready to:

  • Write an adversarial prompting prompt that makes Claude act as a harsh peer reviewer.
  • Get a critique of your research design that identifies weaknesses and threats to validity.
  • Compare adversarial and neutral prompt outputs.

Learn About Adversarial Prompting

So far in this project, you have been prompting Claude with neutral, cooperative instructions. You asked it to help you build a hypothesis, design a methodology, and plan your analysis. Claude was your collaborator.

Now you are going to flip that dynamic. Instead of asking Claude to help, you are going to ask it to attack.

Adversarial prompting is a technique where you deliberately frame the AI's role as a critic, opponent, or skeptic. The goal is to surface problems that a helpful, agreeable prompt would miss.

Why does adversarial prompting work?

When you ask an AI "is my design good?", it tends to focus on strengths and offer polite suggestions. When you tell it to act as a harsh reviewer whose job is to find every flaw, it shifts into a different mode. The framing changes what the model prioritizes in its response. This is the same reason real research goes through peer review rather than just self-assessment.

  • Open a new conversation with Claude.
  • Copy and paste the following prompt into Claude:
Act as a harsh but fair peer reviewer for a top-tier
research journal. Your job is to find every weakness,
gap, and potential flaw in the following research design.

Do not hold back -- identify methodological weaknesses,
threats to validity, sampling issues, ethical concerns,
and analytical limitations.

Here is the research design:
  • Replace the placeholder with your actual research design from Steps 2-3.
  • Press Enter and wait for Claude's response.

What are threats to validity?

Threats to validity are factors that could make your research conclusions unreliable. They include things like selection bias in your sample, confounding variables you did not control for, or measurement tools that do not actually capture what you intend to measure. A good peer reviewer looks for these systematically.

Evaluate the Critique

  • Read through Claude's critique carefully.
  • Identify which concerns are about your methodology (how you plan to collect data) versus your analysis plan (how you plan to interpret data).
  • Note any weaknesses you had not considered before.

The critique should cover several categories. Look for feedback on your sampling approach, your variable definitions, potential biases, and whether your analysis methods match your research question.

What if Claude's critique seems too harsh?

That is the point. Real peer reviewers at top journals are thorough and direct. If Claude's feedback feels uncomfortable, it means the adversarial framing is working. The goal is not to feel good about your design but to find real problems before they undermine your research.

Compare Adversarial and Neutral Prompts

Now try the same task with a neutral prompt to see the difference.

  • Open a new conversation with Claude.
  • Paste the following neutral prompt with the same research design.
Please review my research design and let me know
if there are any areas I could improve.

Here is the research design:
  • Press Enter and compare this response to the adversarial critique.

Notice how the neutral prompt produces softer, more general feedback. The adversarial version is more specific, identifies more issues, and is more actionable. This is adversarial prompting in practice.

You have seen how adversarial framing produces sharper, more actionable feedback than a neutral prompt. Next up, put all four techniques together in a secret mission challenge.

Secret mission

You've practiced four prompt engineering techniques individually. But what happens when you combine them all into one prompt?

In this secret mission, you'll build a mega-prompt that layers role prompting, iterative refinement, chain-of-thought prompting, and adversarial prompting into a single reusable template for generating professional research methodology proposals.

In this secret mission, get ready to:

  • Build a mega-prompt with labeled sections for each technique.
  • Test the mega-prompt with a new research question.
  • Save the mega-prompt as a reusable template.

Build a Research Methodology Mega-Prompt

Clean Up Your Resources

Clean Up Your Resources

Decide whether to keep your resources running, pause them to come back later, or delete them entirely. This project runs entirely in a web browser, so there are no ongoing costs.

Resources you used:

  • Claude conversation history.
  • Downloaded datasets (OpenIntro GPA CSV, Sheffield transcripts .docx).
  • Saved prompts (if you copied them to a text editor).

✔️ Keep everything running

No action needed. Choose this if you're still actively building or want to keep testing right away.

Your Claude conversation history is saved automatically in your account, and your downloaded files are stored locally with no ongoing costs.

✋ Pause - I'll come back to this later

Shut down running processes to free up memory, but keep all your files and data so you can pick up where you left off.

  • Close the Claude browser tab if you are done for now. Your conversation history will still be available when you return.
  • Keep your downloaded datasets in a folder you can find later.

To restart later, open claude.ai and find your conversation in the sidebar.

ⓧ Delete - I don't want to use this again

Remove all project resources and start fresh if you ever want to rebuild.

  • Delete the Claude conversation from your sidebar.
  • Delete the downloaded GPA dataset CSV and Sheffield transcripts .docx from your computer.
  • Delete any saved prompts you copied to a text editor.

That's a wrap!

That's a wrap!

Nice work! 🚀 You've just used prompt engineering techniques to guide an AI through an entire research methods workflow, from designing a methodology to critiquing a full research plan.

You've learned how to:

  • 🤖 Set up Claude for research tasks.
  • 🎭 Use role prompting to get a methodology recommendation from an AI acting as a research expert.
  • 🔄 Apply iterative refinement to build a data collection instrument one improvement at a time.
  • 🧠 Use chain-of-thought prompting to walk an AI through step-by-step data analysis.
  • ⚔️ Apply adversarial prompting to critique and stress-test a research design.
  • 💎 Combine all four techniques into a reusable mega-prompt.

Ready to quiz yourself? 💪

p.s. Does it say "Still tasks to complete!" at the bottom of the screen?

This means you still have screenshots left to upload, or questions left to answer!

  1. Press Ctrl+F (Windows) or Command+F (Mac) on your keyboard.
  2. Search for the text Return to later.
  3. Jump straight to your incomplete tasks!
  4. 🙋‍♀️ Still stuck? Ask the community!