Week 12 Info: Large Language Models
Hello Class,
Week 12 has begun. In week 12, we will learn about Large Language Models and how to interact with them systematically through R. Much of this learning will take place in the context of NLP, building on the work we did in Week 11 and illustrating an alternative way to handle language processing problems.
As LLMs are very new there doesn’t exist much of a formal, time-tested curriculum or a sense of which tools and methods will be relevant years from now. So we will do a quick introduction to the basics of what LLMs are and how they work, discuss the ecosystem of LLMs available today, and then focus on professional use cases, namely how to interact with LLM APIs to use LLMs to analyze and process text data.
This will be accomplished through the use of three R packages, ellmer, which creates a chat data type in R and allows for access to many different LLM APIs and also local instances, mall, which has built in functions to perform NLP tasks using LLMs, and vitals, which is a package for LLM evaluations.
This week we will have a lab assignment which involves usin LLMs to perform sentiment analysis and text classification. You will likely need to either ask me for an anthropic API key, setup your own local LLMs (such as ollama), or use your own API key from an LLM provider of your choice. Find Lab 9 here.
For your reading assignments and more details about this week, head over to Module 12.