Data Collection/Annotations and Inferences with LLMs in Social Sciences

Materials for a one-day workshop on LLM data collection/annotation and inferences

Workshop Data Collection/Annotation & Inferences with LLMs in Social Sciences

DOI

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.

cc by

More information can be found on the website here.

SoDa logo

Technical details

Preparation (API keys)

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.

Slides

Full Workshop Schedule

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.

Additional Resources

Tutorial Paper

Read and cite our tutorial paper (preprint):

Guide to LLM Computing Infrastructure in the Netherlands

[Optional] Run Locally with uv and Python

If 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.

  1. Clone the repository:
    • git clone https://github.com/sodascience/workshop_llm_data_collection.git
    • cd workshop_llm_data_collection
  2. Create and sync the environment:
    • uv venv
    • uv sync
  3. Start Jupyter:
    • uv 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.

Contact

This project is developed and maintained by the ODISSEI Social Data Science (SoDa) team.

SoDa logo

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