Define themes and retain their evidence
The codebook has three themes: Discovery for finding a control, Format for selecting a file format, and Assistance for seeking or receiving help. The two excerpts below are made-up examples. Each is stored in a scenario with both adocument_id and an excerpt_id, allowing a longer interview to contribute several separately identifiable passages.
QuestionCheckBox lets the model select several themes for one excerpt. With min_selections=0, it can also return an empty list if none is supported; it does not have to force every passage into a category. The second question asks for evidence, and targeted memory supplies the selected themes so the model can connect its quotations to those choices.
This codebook captures topics mentioned in an excerpt. For example, mentioning that a control was easy to find and mentioning that it was hard to find can both concern Discovery. If your research question is specifically about barriers, change the definition to require difficulty, or add a separate question about whether the experience was positive or negative.
Read themes with the original passage
With model access configured, run the coding survey and display the source, assigned themes, and evidence together:answer.themes contains a list, while answer.evidence contains free text. The evidence question requests quotations for each theme, but it does not enforce a separate structured field for every quotation. Read the response with the excerpt to see whether the quoted words support the assigned themes.
To work with the coding in pandas, convert the selected columns with .to_pandas(). When counting themes, decide whether you want the number of excerpts mentioning a theme or the number of documents containing it. An interview with five coded excerpts contributes five passages but only one document; the two identifiers let you make either calculation.
Choose how much structure your coding needs
Use this checkbox-and-evidence design when themes may overlap and you want a compact set of answers. Other EDSL question types support different coding needs:
For a larger collection, import excerpts from a table or extract text from documents and PDF pages. Choose the amount of text in each scenario to suit the question: a short excerpt supports passage-level coding, while a whole document provides broader context. To compare the coding with independent human judgments, follow Human validation; for this multi-theme design, compare the assigned themes rather than using a single-category match.
