Please note: This course will be taught online only.
Maximilian Weber is a Postdoctoral Researcher in the Department of Education at the University of Mainz. In Summer 2025, he will serve as interim Professor of Sociology at Goethe University Frankfurt. His research focuses on the intersection of education, technology, and society, with a particular interest in text-as-data methods for social science research. He worked on the rollama R package, which facilitates the use of generative models in research applications.
Course Content
Generative AI (GenAI) is enabling new ways to analyze and generate human-like text and images. This transformation is driven by recent breakthroughs in large language models (LLMs) and their demonstrated capabilities in processing natural language. These advances are reshaping social science research by introducing new methodological approaches and expanding analytical possibilities. The course provides a practical introduction to working with generative AI models, from basic interactions to advanced applications in social science research.
The course will explore both proprietary models (like ChatGPT and GPT-4) and open-weight alternatives (like Llama), with a particular focus on open models. While we will discuss commercial models to understand the broader landscape, we will primarily work with open-weight models as they offer researchers greater control, transparency, and customization possibilities for research applications.
The first week covers foundational concepts of LLMs, including their architecture, capabilities, and limitations, along with hands-on experience in prompt selection. This establishes the technical groundwork while ensuring students can effectively interact with these models for research purposes. The first half of the course also serves as an introduction to practical applications such as text summarization and advanced reasoning techniques.
The second half of the course moves into more advanced applications, focusing on model fine-tuning. Students will learn how to adapt models for specific research tasks and scale their applications to handle large datasets. At the end of the course the students will apply these technologies in practical projects to social science research questions, working with datasets such as parliamentary speeches and open-ended survey responses.
Course Objectives
Generative AI has emerged as a tool for social science research, offering new possibilities for analyzing complex textual and multimodal sources. These technologies enable researchers to process and analyze data in ways that were previously impractical or impossible. However, effectively leveraging these tools requires understanding both their capabilities and limitations. How can researchers appropriately apply GenAI to their research questions? What are the best practices for prompt engineering and model fine-tuning? How can we ensure the reliability and validity of AI assisted analyses? This course addresses these questions while providing hands-on experience with current GenAI technologies, with particular emphasis on open models.
Course Prerequisites
Students should have basic programming experience in Python. Familiarity with fundamental data science concepts and basic statistical methods is helpful. While no prior experience with GenAI is required, students should be comfortable learning new technical concepts. Those wishing to prepare for the course might benefit from reviewing basic Python programming through resources like “Python for Data Science” or completing an introductory machine learning course in Python. Experience with natural language processing (NLP) concepts is helpful but not required.
For the duration of the course, a paid subscription to Google Colab (or a similar service) is highly recommended to fully engage with the course materials and exercises.
Representative Background Reading
Bail, C. A. (2024). Can Generative AI improve social science? Proceedings of the National Academy of Sciences, 121(21), e2314021121. https://doi.org/10.1073/pnas.2314021121
Papers with interesting or creative use cases of GenAI will be distributed closer to the course.