| TL;DR | Prompt engineering is the craft of writing instructions that reliably elicit the desired output from an LLM — a non-trivial skill that can make or break LLM-assisted research tasks. |
|---|
What it means
LLMs interpret natural language instructions, but small changes in wording, structure, or context can substantially affect output quality and consistency. Prompt engineering is the iterative process of designing, testing, and refining those instructions.
For research applications like llm-qualitative-research, good prompts:
- Specify the task precisely (what to look for, how to format output)
- Include relevant synonyms and examples to enrich semantic context
- Set constraints (e.g., word limits for category labels, exclusivity rules)
- Use step-by-step instructions (chain-of-thought) for complex reasoning tasks
In qualitative research
(bijker-chatgpt-qca-2024) demonstrates how thorough prompt engineering is necessary — but not sufficient — for reliable LLM-assisted coding. Their prompts went through multiple iterations before reaching acceptable performance. Key lessons:
- Richer labels → better consistency. Category labels with examples improved intercoder-agreement because they gave the model more semantic anchors.
- Explicit constraints help but don’t guarantee compliance. Even with instructions to code into a single best-matching domain, ChatGPT sometimes assigned data to multiple domains.
- Prompts generalize across topics. Their final prompts can be adapted for new research areas by substituting topic keywords — but researchers should verify LLM familiarity with any theory or framework used.
Practical techniques
- Chain-of-thought prompting: ask the model to reason step-by-step before giving a final answer
- Few-shot examples: include 2–3 examples of desired input/output in the prompt
- Synonym enrichment: use varied terminology to improve recall on diverse phrasings
- Iterative refinement: run the prompt, evaluate output, adjust instructions, repeat
Techniques specific to interpretivist and Big-Q research
wise-et-al-2026-ai-not-the-enemy proposes prompting practices designed not for reliability but for interpretive depth — specifically to support the five qualitative commitments their AI-in-the-loop framework maps to LLM properties:
- Persona prompting for positionality: instruct the model to adopt different analytic stances (“read this as a researcher concerned with power relations”; “now read as a researcher looking for counter-narratives”). Operationalizes positionality as analytic resource rather than source of bias to be controlled.
- Systematic disconfirmation prompting: explicitly ask the model to find passages that contradict, complicate, or resist the emerging interpretation. Directly addresses epistemic-flattening — the model’s tendency toward statistically probable outputs.
- Temporal audit prompts: run the same prompts at multiple stages of analysis and document changes. Supports dependability: the audit trail shows how interpretations evolved over time.
- Underrepresented voice search: ask the model to identify voices, perspectives, or patterns that appear infrequently but deserve closer attention. Counteracts the dominant-pattern bias.
Critical requirement (Wise et al.): these techniques require the full corpus in the model’s active context — not RAG (retrieval-augmented generation), which selectively retrieves fragments. Long-context models (128K–1M tokens) make full-corpus prompting feasible. Selective retrieval reintroduces the sampling bias these techniques are designed to prevent.
Limits
Prompt engineering cannot fully compensate for inherent model limitations: overlapping theoretical frameworks, ambiguous constructs, or data that simply doesn’t map cleanly to predefined categories will produce inconsistent output regardless of prompt quality.
See also
- llm-qualitative-research — the research context where prompt engineering matters most
- bijker-chatgpt-qca-2024 — empirical study with detailed prompt engineering process
- intercoder-agreement — the metric used to evaluate whether prompts are working
- wise-et-al-2026-ai-not-the-enemy — most developed prompting framework for interpretivist research; persona, disconfirmation, temporal audit techniques
- wheeler-technological-reflexivity-2026 — prompts as methodological choices requiring documentation in the audit trail
What links here
- Bijker et al. (2024) — ChatGPT for Automated Qualitative Research: Content Analysis
- Brailas (2025) — AI in Qualitative Research: Beyond Outsourcing Data Analysis to the Machine
- Christou (2023) — How to Use Artificial Intelligence (AI) as a Resource, Methodological and Analysis Tool in Qualitative Research?
- Christou (2024) — Thematic Analysis through Artificial Intelligence (AI)
- Costa et al. (2025) — AI as a Co-researcher in the Qualitative Research Workflow: Transforming Human-AI Collaboration
- Fischer & Biemann (2024) — Exploring Large Language Models for Qualitative Data Analysis
- Friese (2026) — From Coding to Conversation: A New Methodological Framework for AI-Assisted Qualitative Analysis
- Goyanes et al. (2025) — Thematic Analysis of Interview Data with ChatGPT: Designing and Testing a Reliable Research Protocol
- AI in Qualitative Research
- Human-AI Collaboration — Frameworks and Models
- Index
- Intercoder Agreement
- LLMs for Qualitative Research
- Naeem et al. (2025) — Thematic Analysis and Artificial Intelligence: A Step-by-Step Process for Using ChatGPT
- Nguyen-Trung (2025) — ChatGPT in Thematic Analysis: GAITA and the ACTOR Framework
- Nguyen-Trung & Nguyen (2026) — Narrative-Integrated Thematic Analysis (NITA)
- Qualitative AI Methods — A Living Taxonomy
- Salazar et al. (2025) — Comparison of Qualitative Analyses Conducted by Artificial Intelligence Versus Traditional Methods
- Sinha et al. (2024) — The Role of Generative AI in Qualitative Research: GPT-4's Contributions to a Grounded Theory Analysis
- Wheeler (2026) — Technological Reflexivity in Practice: How MAXQDA, NVivo, and ChatGPT Shape Qualitative Survey Analysis
- Wise et al. (2026) — Why AI is Not the Enemy: Trustworthy AI-in-the-Loop Analysis
- Xu (2026) — Doing Thematic Analysis in the Age of Generative AI: Practices, Ethics and Reflexivity
- Yang & Ma (2025) — Artificial Intelligence in Qualitative Analysis: A Practical Guide Using GPT-4 on Substance Use Interview Data
- Zhang et al. (2025) — Harnessing the Power of AI in Qualitative Research: Exploring, Using and Redesigning ChatGPT