Crash-course LLMs for Social Science
2025-09-12
Source: Tunstall, Von Werra, and Wolf (2022)
Source: Tunstall, Von Werra, and Wolf (2022)
Take 5-10 minutes to explore the visualization and discuss with your neighbor how the decoder architecture works.
…many more things it was not trained to do!
You are a program manager in [industry]. Draft an executive summary email to [persona] based on [details about relevant program docs]. Limit to bullet points.
pydantic
Let’s you impose structure on model outputs.
Your task is to analyze the sentiment in the TEXT below from an investor perspective and label it with only one the three labels:
positive, negative, or neutral.
Examples:
Text: Operating profit increased, from EUR 7m to 9m compared to the previous reporting period.
Label: positive
Text: The company generated net sales of 11.3 million euro this year.
Label: neutral
Text: Profit before taxes decreased to EUR 14m, compared to EUR 19m in the previous period.
Label: negative
Use-cases: archival research, chatbots, …
Source: Moritz Laurer on HF Blog
Laurer et al. (2024), Table 1
LLM inference and prompting
API calls, Structured Output
Social Science applications