Materials for a one-day workshop on LLM data collection/annotation and inferences
This repository contains the code and slides for our workshop on data collection/annotation and inference with Large Language Models. The materials on this page are CC-BY-4.0 licensed.
More information can be found on the website here.

R or python programming knowledge is desired but not required.langchain, in R we will use ellmer to interact with LLMs.You will need an API key for the respective provider you plan to use.
Save your API keys in a safe place. The notebooks will prompt you to enter the keys at runtime.
| Time | Title | Resource |
|---|---|---|
| 09:30 | LLM fundamentals for Social Sciences | |
| 11:00 | Coffee break | Coffee is provided! |
| 11:20 | Data collection/annotation with LLMs | python, R |
| 12:30 | Break | Lunch is provided! |
| 13:15 | Inference with LLM annotations | python, R |
| 14:30 | Conclusion & Q&A |
Methods and software for inference with measurement error correction: sodascience/social_science_inferences_with_llms.
Read and cite our tutorial paper (preprint):
Download from arXivIf you plan to run the Python notebooks locally, we recommend using uv to set up a clean Python environment. You can also use uv to launch Jupyter Lab or Notebook.
git clone https://github.com/sodascience/workshop_llm_data_collection.gitcd workshop_llm_data_collectionuv venvuv syncuv run jupyter lab (or uv run jupyter notebook)If you use a different environment manager, make sure the dependencies in pyproject.toml are installed before running the notebooks.
This project is developed and maintained by the ODISSEI Social Data Science (SoDa) team.

Do you have questions, suggestions, or remarks? File an issue or feel free to contact Qixiang Fang.