This three-hour, hands-on workshop shows researchers how to build large language models (LLMs) into their research workflows with a few lines of Python. Instead of pasting text into a chat window, you send it to an LLM from code. That lets you apply the same instructions to one document or to hundreds. You work with real New Zealand material: you code passages of the Privacy Act 2020, extract features from World War I posters held by Archives New Zealand, and extract structured information from Givealittle fundraising campaigns. Along the way you practise prompting techniques to prepare, label and analyse unstructured text and images. You also learn to spot hallucinations and bias, and to check the LLM's output against your own judgement and other sources.
You run the workshop notebooks on your own laptop, in VS Code. Before the workshop, follow the setup guide. In short:
- Install VS Code and uv.
- Download the workshop as a ZIP file and unzip it.
- Open the unzipped folder in VS Code and run
uv syncin the terminal.
On the day, connect to the university VPN, open each notebook from the notebooks folder, and run the cells from top to bottom.
| Notebook | File | Preview on GitHub |
|---|---|---|
| 01 — Environment setup | notebooks/01-environment-setup.ipynb |
View |
| 02 — LLMs as research instruments | notebooks/02-llms-as-instruments.ipynb |
View |
| 03 — Exploratory analysis | notebooks/03-prompt-engineering.ipynb |
View |
| 04 — Visual feature extraction | notebooks/04-visual-extraction.ipynb |
View |
| 05 — Looping an LLM over many documents | notebooks/05-looping-over-documents.ipynb |
View |
Developed by Dr Toby Johnson, Centre for eResearch, University of Auckland