How can artificial intelligence help with research tasks that are traditionally arduous and time-consuming? With the rise of machine learning algorithms like large language models, professionals of various fields have been looking for ways to reduce the manual labor involved in tedious tasks. Professor Killian Clarke (SFS) together with data scientist Noah Darwish aimed to implement an AI-powered application that can support the qualitative coding of news articles, by identifying and coding protest events more efficiently.
Objective
This qualitative coding application project emerged from the need to identify protest events in news articles, a task originally done by hand and required the labor of professional coders. Professor Killian Clarke and Data Scientist Noah Darwish set out to design an application that could ease this tedious process without sacrificing quality or precision. Their goal was to make qualitative coding more efficient by integrating AI into the workflow of identifying and labeling protest-related news articles. The result was a semi-automated system that could recognize, extract, and organize protest events into an Excel spreadsheet through the use of a fine-tuned large language model.
By combining GPT-3.5’s natural language capabilities with a carefully labeled dataset and prompt-based instructions, the team was able to train this model on how to identify protest-related events from news articles. This consisted of two main steps: the first was the identification of protests events in the articles and the second was the organization of events recognition in a well structured dataset. Their final dataset included fields such as the type of protest, motive, location, and date. This process not only streamlined the task of event recognition but also reduced the need for repetitive manual tagging. Ultimately, they were able to create a semi-automated system that could support researchers by speeding up the coding process while still preserving the nuance and structure required for qualitative coding.
Workflow
The first crucial step in this project was creating a well-labeled dataset, which included both the original articles and the human-identified protest events. This dataset was essential for the supervised learning task, as it provided the model with clear examples of how to extract accurate protest information from new articles. To extract the protest events, the researchers stored article files locally and preprocessed them using either direct text extraction or optical character recognition (OCR), depending on the file format.
From there, they implemented a two-part workflow:
The first stage focused on fine-tuning a ChatGPT-3.5 model for protest event recognition using their labeled dataset. By training on the labeled dataset of protest articles and their corresponding annotations, the model was able to achieve approximately a remarkable 85% accuracy in identifying protest events from texts. However, it occasionally generated duplicate entries, making it necessary for human coders to review and validate the model’s output. The evaluation of the model by human coders was a crucial part of this stage not only for validating the extracted events but also for identifying recurring errors and informing future improvements to the prompts and training data. This human-in-the-loop approach helped maintain a higher level of accuracy and reliability in the outputs.
The second stage involved formatting the extracted events into structured Excel files. This was achieved through carefully crafted prompts that guided the model to organize the data according to a predefined schema. This step enabled the researcher to achieve persistent storage as their output files were stored locally and gave the team a replicable way to manage and analyze the extracted information. Persistent storage is a known limitation of platform-based GPT assistants, which often lack memory across sessions. By creating a custom-built Python application that integrated a fine-tuned OpenAI model for event extraction and automated Excel formatting, the researchers were able to store generated outputs efficiently and create a more reliable, long-term solution.
This workflow is highly replicable and shows strong potential for broader use particularly when paired with a well-labeled training dataset. While large language models like ChatGPT-3.5 excel at generating coherent and context-aware text, task-specific supervision helps unlock their full potential for precision-driven applications like qualitative coding. For projects that may not have access to labeled data, alternatives such as pre-trained named entity recognition models or prompt-only GPT approaches offer flexible starting points. Though these methods may yield less reliable results, they still present valuable opportunities to reduce manual tasks through AI based applications, as long as any output is reviewed.
Key Takeaways
This qualitative coding project has supported the notion that tedious tasks can be efficiently automed through AI powered applications. This project has purported that integrating AI into qualitative research workflows can dramatically reduce the time spent on repetitive tasks like qualitative coding, allowing researchers to focus more on interpretation and analysis.
A key takeaway from this project is that fine-tuning language models with task-specific annotations leads to more accurate and reliable outputs. However, in cases where annotated datasets are not available, alternative approaches such as prompt-only GPT pipelines or pre-trained named entity recognition models can still offer value.
In either case, detailed prompt engineering and well labeled training datasets are essential to guide transformer models toward targeted outputs. The creation of external applications powered by an OpenAI model can help ensure that the results are efficiently organized, stored for later analysis. As AI streamlines the coding process, human input continues to elevate the quality of results and unlock new opportunities for insight. Taken together, this approach offers a replicable framework that can be adapted to other domains where unstructured text needs to be converted into structured, actionable insights.
Technical Stack
- Programming Language: Python
- APIs Used: OpenAI API
- Data Storage: Excel
For more information about the qualitative coding project, please refer to the video:
Team
Project Lead: Killian Clarke, Assistant Professor, Edmund A. Walsh School of Foreign Service
Lead Developer: Noah Darwish, Independent Data Scientist, Georgetown University
| Stakeholder | How They Benefit |
|---|---|
| Academic Researchers | Reduce time spent manually coding large volumes of qualitative data; focus more on interpretation. (est. time saved: ~2.9 years from Manual coding: ~3 years to AI-assisted: ~3 weeks) |
| Human Coders / RAs | Shift from repetitive tagging to higher-level quality control and pattern recognition. |
| Faculty | Automate parts of labor-intensive research tasks; scale up project scope without proportional labor. |
| Data Scientists | Demonstrate real-world application of supervised learning in a high-precision task. |
| Students | Access real-world applications of AI in research; potential to participate in applied learning. |
| Other Disciplines / Fields | Gain a replicable model for using AI to code unstructured text data (e.g., legal, policy, journalism). |
| Institution | Demonstrates leadership in AI-integrated research; enhances faculty research productivity. |