← Latest papers
💻 computer science

Human–AI collaboration in deductive coding of classroom dialogue: prompt engineering and collaboration patterns

This study employs design-based research to demonstrate that a customised GPT coding assistant, when integrated with structured prompts and a collaborative human-first workflow, effectively supports deductive coding of classroom dialogue while highlighting that successful human–AI collaboration depends on the dynamic interplay between prompt architecture, workflow sequencing, and the researcher's stance toward AI.

Original authors: Luwei Bai, Dongkeun Han, Sara Hennessy

Published 2026-07-13
📖 7 min read🧠 Deep dive

Original authors: Luwei Bai, Dongkeun Han, Sara Hennessy

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to decode a secret language spoken in a classroom. Teachers and students are having a deep, complex conversation, and your job is to sort every single sentence into specific categories like "Reasoning," "Invitation to think," or "Agreement." Doing this by hand is like trying to drink from a firehose: it's exhausting, takes forever, and your brain gets tired.

Enter the Customised GPT Coding Assistant (CGCA). Think of this AI not as a magic robot that knows everything, but as a very smart, very fast intern who has been given a specific rulebook (called the Cambridge Dialogue Analysis Scheme) and a few sample sentences to study. The researchers from the University of Cambridge wanted to see: Can we train this intern to do the heavy lifting? And how do we work together without the intern taking over or the human getting annoyed?

Here is what they found, served up with a few metaphors to keep things clear.

1. The "Intern" Needs the Right Instructions (Prompt Engineering)

At first, the researchers just handed the AI the entire rulebook and said, "Go!" The result? The AI got confused. It was like giving a new employee a 500-page manual and expecting them to know exactly what to do on day one. The AI's accuracy was low, sometimes as low as 6.7% for certain categories.

The researchers realized the AI has a "brain" that works differently than a human's. It gets overwhelmed if you give it too much text at once. So, they started prompt engineering. This is like rewriting the instructions for the intern. Instead of a giant wall of text, they:

  • Broke the rules down into a "decision tree" (If X happens, then do Y).
  • Gave the AI fewer, but better, examples (about 5–15 carefully chosen ones instead of hundreds).
  • Made the instructions step-by-step.

The Result: After these tweaks, the AI's accuracy jumped to 64.9%. That's not perfect (humans usually agree with each other about 70–75% of the time), but it's good enough to be a helpful sidekick. The paper suggests that simply pasting a human's training manual into a computer prompt doesn't work; you have to restructure the instructions to fit how the AI thinks.

2. Who Goes First? The "Human-First" vs. "AI-First" Dance

The researchers tested two ways to work with this AI intern. They had six educational researchers (some new to coding, some experts) try both methods on 55 turns of classroom dialogue.

  • Condition A (Human-First): The human codes the sentence first, then asks the AI, "What do you think?"
  • Condition B (AI-First): The human asks the AI, "What do you think?" first, then the human decides if they agree.

The Findings:
When the human went first, the agreement between the human and the "gold standard" (the original expert coder) was around 0.40 (a measure of how well they matched).
When the AI went first, that number bumped up slightly to 0.45.
Note: The paper says this difference is small and not statistically "proven" to be a huge win because the group was so small, but the trend suggests starting with the AI might help people stick to the rules better.

Also, when the AI went first, the humans finished the job faster. However, the researchers noticed something tricky: in the "AI-First" group, some people felt like they were just checking the AI's work, while in the "Human-First" group, they felt like they were being checked by the AI.

3. The Secret Ingredient: How You Treat the AI

This is the most interesting part. The researchers found that how the human felt about the AI mattered more than the order of operations. They spotted two distinct "personalities" in how the coders worked:

The "Dialogic" Partner (The Collaborators)
About half the team (Participants C, D, and E) treated the AI like a critical friend or a debate partner.

  • The Metaphor: Imagine playing tennis with a partner who hits the ball back to you so you can hit it harder. They didn't blindly trust the AI, but they used its suggestions to test their own thinking. "Hmm, the AI says this is 'Reasoning.' Why? Oh, I see, because of the word 'because.' Okay, I agree."
  • The Outcome: Even though some of these people were beginners at coding, they actually improved the most. They treated the AI as a tool to help them learn and refine their decisions.

The "Supervisory" Watchdog (The Skeptics)
The other half (Participants A, B, and F) treated the AI like a suspect or a machine that needed constant checking.

  • The Metaphor: Imagine a security guard who thinks the camera is broken and is constantly trying to prove it's wrong. They said things like, "I'm checking ChatGPT" or "I don't think it's a colleague." They kept their distance, refusing to have a "conversation" with the tool.
  • The Outcome: These people didn't improve as much. Their coding accuracy stayed lower, and they spent less time engaging with the AI's reasoning. They were so focused on verifying the AI that they missed the chance to collaborate with it.

4. What the Paper Rules Out

It is important to know what this study says does not work:

  • It is NOT a magic fix: You cannot just dump a huge pile of data and a standard rulebook into an AI and expect it to work perfectly. The paper explicitly argues that "directly transferring a human training codebook into a prompt is insufficient."
  • It is NOT a replacement for skill: The study does not claim that the AI makes humans instantly experts. In fact, one participant (Participant E) started by deferring to the AI because they lacked confidence, and only later learned to judge the AI's work critically. The paper suggests this might be a temporary boost in confidence, not necessarily a permanent leap in independent skill.
  • It is NOT a "one-size-fits-all" solution: The paper argues that there is no single perfect way to use the AI. What works for a "dialogic" partner might not work for a "supervisory" watchdog.

5. How Sure Are We?

The researchers are careful with their words. They say their findings suggest that a "dialogic" approach (treating the AI as a partner) leads to better results. They suggest that starting with the AI (AI-first) might help consistency.

  • The Confidence Level: The study is a "small-scale" exploration with only six people. The authors admit that because the group is so small, they cannot say for sure that the "AI-first" method is definitely better; they can only say the numbers trended that way.
  • The Accuracy: The AI reached 64.9% precision. The paper states this is "approaching" the human agreement level of 70–75%, but it is not there yet. It is a "structured decision-support tool," not a final answer key.

The Big Picture

This study paints a picture of human-AI collaboration not as a simple "human vs. machine" or "machine doing the work" scenario. Instead, it's a dynamic dance.

The success of the dance depends on three things moving together:

  1. The Steps (The AI Design): The instructions must be simple, step-by-step, and tailored to the AI's brain (like a decision tree).
  2. The Music (The Context): The order of operations (who goes first) changes the rhythm.
  3. The Dancer's Mindset (The Human): If you treat the AI as a partner to learn from, you dance better. If you treat it as an enemy to be checked, you stumble.

The paper concludes that AI in research is a socio-technical process. It's not just about the code; it's about how the human feels, thinks, and interacts with the tool. For a curious teenager, the takeaway is this: The tool is only as good as the relationship you build with it. If you treat it like a smart teammate, it helps you grow. If you treat it like a suspicious stranger, it just sits there waiting to be checked.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →