LLMs in R
Learn LLM fundamentals with Nic Crane
A fun, practical approach to learning how to work with LLMs in R. This is a course anyone looking to get a quick overview of the most important aspects of working with the ellmer package.
You'll work with a dataset of dog adoption listings - free-text descriptions written by shelter volunteers about dogs looking for homes. The descriptions are messy and inconsistent, but full of useful information.
Over four chapters, you'll build up to a working chatbot that helps potential adopters find their perfect dog.
Working with LLMs in R gives you access to data superpowers you didn't have before - extract tidy data from messy text, and create chatbots to talk with your data. The possibilities are exciting, but it can be hard to know where to start. This course solves that problem.
Welcome! 👋
{ellmer}, providers, and models
Getting set up
Chatting with LLMs
Chat objects
The system prompt
Chapter 1 Quiz
Chat functions
Meet the dogs
Extracting a name
Extracting other attributes
Extracting multiple attributes
Learning about multiple dogs
Chapter 2 Quiz
Checking our results
Introduction to prompt engineering
Adding role and context
Getting more specific
Adding examples
Interpolation
Extracting multiple descriptions
Chapter 3 Quiz
Introduction to tools
Tools to work with data
Tools with parameters
Upgrading the bot
Wrapping Up
Course Feedback
Chapter 4 Quiz
- You should be comfortable working with data frames, writing functions, and using pipes in R
- A GitHub account (for free API access via GitHub Models)
- Knowledge of dplyr helps but isn't essential