Leverhulme Centre for Demographic Science
Short Courses
Large Language Models for Health and Social Science Research
A five-day applied course on using, evaluating, and governing large language models in health and social science research.
In-person | Fully catered | 5 days | LLM foundations, APIs, local models, and responsible research design
About: This course treats LLMs as research tools for classification, summarisation, information extraction, coding, data exploration, and reproducible workflows. The emphasis is practical: model outputs must be validated, documented, and interpreted carefully before they become evidence.
Dates: 29 June-3 July 2026
Times: 10:00-17:00 each day, with a Day 1 welcome from 09:30-10:00
Location: Nuffield College, University of Oxford
Convenors: Daniel Valdenegro and Charles Rahal
Setup: Please complete the Git, Anaconda Python, VS Code, course package, OpenAI API, and Ollama setup notes before the relevant labs. Bring your laptop even if one step fails; setup support will be part of the course.
Pre-arrival reading: The minimal reading list covers language-model foundations, computational social science applications, foundation-model risks, responsible use, and the limits of substituting LLMs for human participants. The full lecture-by-lecture list is available in the course repository.
Attendance recognition: Accredible badges will be awarded.
Queries: teaching@demography.ox.ac.uk
What You Will Leave With
- A working vocabulary for NLP, tokenisation, embeddings, attention, Transformers, hosted models, and local model runtimes.
- Experience building simple Python text workflows before moving to LLM classification, summarisation, and extraction tasks.
- Practical skills in accessing, fine-tuning or parameter-tuning, and applying LLMs to research datasets with reproducibility logs.
- Hands-on comparison of small locally hosted models through Ollama, including accuracy, valid-label rate, speed, parameters, and prompt style.
- A research design framework for validation, documentation, privacy, governance, synthetic data, multimodal artefacts, and human review.
Pre-arrival Checklist
Core software
Install Git, Anaconda Python, VS Code, and the Microsoft Python and Jupyter extensions. The course environment uses Python 3.12 and the repository requirements file.
Remote model access
Lab Three requires an OpenAI API key and an available model name stored as OPENAI_API_KEY and OPENAI_MODEL. Use only synthetic or approved de-identified examples.
Local model access
Lab Four requires Ollama. The notebook prepares smollm2:135m, gemma3:270m, and qwen2.5:0.5b, with each model under roughly half a GB.
Beginner support
The beginner guide explains notebooks, kernels, common Python objects, errors, and how to approach lab questions. The glossary covers the main programming, NLP, API, and governance terms.
Course Plan by Day (10:00-17:00, with Day 1 welcome from 09:30)
| Day | Location | What Happens | Materials |
|---|---|---|---|
| Day 1 Mon 29 Jun 2026 |
Nuffield College, Oxford |
09:30-10:00: Welcome. 10:00-13:00: Foundations: NLP, tokenisation, computational text analysis, embeddings, attention, Transformers, and why LLMs matter for health and social science. 13:00-14:00: Lunch at Nuffield. 14:00-16:00: Lab One: Python foundations for LLM and NLP research, including strings, numbers, research records, lists, dictionaries, loops, functions, files, tables, and a mini text workflow. 16:00-17:00: Research talk by Aarushi Sharma, "Finding hidden high dimensional structures in language-models : a mechanistic interpretability based approach to understand LLMs reasoning". |
Course outline Lecture 1 slides Lab One notebook Lab One solution Day 1 readings Pre-arrival setup |
| Day 2 Tue 30 Jun 2026 |
Nuffield College, Oxford |
10:00-13:00: Applications: LLMs in health and social science research, with emphasis on summarisation, information extraction, classification, evaluation, hallucination, and failure modes. 13:00-14:00: Lunch at Nuffield. 14:00-16:00: Lab Two: tokenisation, small local classifiers, text pipelines, validation against human labels, simple summaries, entity extraction, and failure-mode review. 16:00-17:00: Research talk by Maksim Zubok, "TBC". |
Course outline Lecture 2 slides Lab Two notebook Lab Two solution Day 2 readings |
| Day 3 Wed 1 Jul 2026 |
Nuffield College, Oxford |
10:00-13:00: Working with current models: the model landscape, model choice, hosted APIs, locally hosted models, data governance, and how to document model use. 13:00-14:00: Lunch at Nuffield. 14:00-16:00: Lab Three: real OpenAI API calls using synthetic examples, credential checks, prompt construction, request payloads, response parsing, logging, parameter comparison, redaction, and classifier evaluation. 16:00-17:00: Research talk by Jakub Bijak, "Uncertainty in Large Language Models: Sources, Types and Approaches". |
Course outline Lecture 3 slides Lab Three notebook Lab Three solution Day 3 readings API setup |
| Day 4 Thu 2 Jul 2026 |
Nuffield College, Oxford |
10:00-13:00: Local models, limitations, ethics, and responsible use: Ollama, LM Studio, small models for modest laptops, model weights, quantisation, context limits, validation, and governance for health and social research. 13:00-14:00: Lunch at Nuffield. 14:00-16:00: Lab Four: pull and smoke-test local models, compare outputs on a shared synthetic evaluation set, score accuracy and valid-label rate, tune parameters, inspect disagreements, and write a model recommendation. 16:00-17:00: Research talk by Pablo Biedma, "Dual-Process Theory and Moral Judgment in Large Language Models". |
Course outline Lecture 4 slides Lab Four notebook Lab Four solution Day 4 readings Ollama setup |
| Day 5 Fri 3 Jul 2026 |
Nuffield College, Oxford |
10:00-13:00: Future directions and research design: multimodal models, LLMs as measurement instruments, causal inference cautions, synthetic data, agentic systems, tool use, scientific workflows, and open questions. 13:00-14:00: Lunch at Nuffield. 14:00-16:00: Lab Five: multimodal artefact manifests, coding rubrics, human and LLM label comparison, synthetic respondent checks, safe tool registries, workflow logs, and a final applied research design. 16:00-17:00: Research talk by Charles Rahal, "Terrible LLMs". |
Course outline Lecture 5 slides Lab Five notebook Lab Five solution Day 5 readings |
Core Required Readings
- Jurafsky and Martin, Speech and Language Processing
- Ziems et al., "Can Large Language Models Transform Computational Social Science?"
- Bommasani et al., "On the Opportunities and Risks of Foundation Models"
- Bender et al., "On the Dangers of Stochastic Parrots"
- Lin, "Six Fallacies in Substituting Large Language Models for Human Participants"
Course Materials
The live materials are maintained in the lcds-teaching/llms_062026 GitHub repository. The repository includes the course outline, lab notebooks, setup guides, a beginner guide, a glossary, data notes, figures, and solution notes.
Please use synthetic, public, or approved de-identified data only. Do not paste confidential health, social care, interview, institutional, patient, client, or service-user data into hosted APIs, local models, notebooks, screenshots, or shared documents.