ChatGPT is a recently introduced artificial intelligence program that is gaining broad popularity across a number of fields, one of which is the analysis of qualitative data in health-related research. Traditionally, many forms of qualitative data have relied on a detailed process of coding the data by labeling small segments of the data, and then aggregating those codes into more meaningful themes. Instead, generative artificial intelligence programs such as ChatGPT can reverse this process by developing themes at the beginning of the analysis process and then refining them further. This article presents a specific three-step process, query-based analysis, for using ChatGPT in qualitative data analysis. The first step is to ask broad, unstructured queries; the second is to follow up with more specific queries; and the third is to examine the supporting data. A demonstration of this process applies query-based analysis of an empirical dataset that consists of six focus groups with caregivers for a family member experiencing cognitive impairment, who discussed their experiences in seeking diagnosis for their family member. The conclusions consider the potential impacts of query-based analysis on traditional approaches based on the coding of qualitative data.
Keywords: ChatGPT; artificial intelligence; coding; qualitative data analysis.