CUSO WS on Large Language Models
2025-09-03
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.
class CityLocation(BaseModel):
city: str
country: str
agent = Agent('google-gla:gemini-1.5-flash', output_type=CityLocation)
result = agent.run_sync('Where were the olympics held in 2012?')
print(result.output)
#> city='London' country='United Kingdom'
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
Source: Moritz Laurer on HF Blog
Laurer et al. (2024), Table 1
LLM inference and prompting
Ollama
API calls, Structured Output
Social Science applications