Programming with LLM APIs
A Beginner’s Guide in R and Python
posit::conf(2025)
2025-09-16
Find a seat where you can see the screen!
Update your local copy of the workshop:
posit-conf-2025.github.io/llm/setup.html
Join the Discord: https://pos.it/conf
wifi(
network=“Posit Conf 2025”,
password=“conf2025”
)
Our team: Joe Cheng, Garrick Aden-Buie, Karan Gathani, Julia Silge, Sam Clark, James Blair
Please Review: posit.co/code-of-conduct
💙 Treat everyone with respect
🧡 Everyone should feel welcome and safe
Reporting:
🗣️ any posit::conf staff member (t-shirt) or Info desk
📧 codeofconduct@posit.co
👋 Hi, my name is …
🤖 I’d call myself an AI… [skeptic, pragmatist, enthusiast]
⚡ Share a moment when AI surprised you
wifi(“Posit Conf 2025”, password=“conf2025”)
🚻 Gender-neutral bathroom: LL2 next to Chicago A
🧘 Meditation/prayer room: LL2 Chicago A
🤱 Lactation room: LL2 Chicago B
🎉 Welcome reception: Tonight 5-7 pm, LL2 Grand Hall West
🐠 Aquarium Night: Tomorrow 7-10 pm, Georgia Aquarium
Red lanyards available to those who don’t wish to be photographed
#PositConf2025 for all things conf
🙋 🙋♀️ 🙋♂️
Please ask questions!
Everything you need, in one place.

| Time | Activity | |
|---|---|---|
| 09:00 - 10:30 | 💬 | Talking with LLMs via Code |
| 10:30 - 11:00 | ☕ | Coffee break |
| 11:00 - 12:30 | 💻 | Programming with LLMs |
| 12:30 - 13:30 | 🍽️ | Lunch break |
| 13:30 - 15:00 | 🔍 | Augmented Generation |
| 15:00 - 15:30 | ☕ | Coffee break |
| 15:30 - 17:00 | 🚀 | Beyond Tools |
| Time | Activity | |
|---|---|---|
| 09:00 - 10:30 | 💬 | Talking with LLMs via Code |
| 10:30 - 11:00 | ☕ | Coffee break |
| 11:00 - 12:30 | 💻 | Programming with LLMs |
| 12:30 - 13:30 | 🍽️ | Lunch break |
| 13:30 - 15:00 | 🔍 | Augmented Generation |
| 15:00 - 15:30 | ☕ | Coffee break |
| 15:30 - 17:00 | 🚀 | Beyond Tools |
🟩
All good
I’m done
🟥
Not great
Need time or help
Clone our workshop repo posit-conf-2025/llm
Open the project in Positron
Install all the packages:
renv::restore()uv sync
RStudio and VS Code are great, too!
_exercises/ |
Files for Your Turn exercises |
_solutions/ |
Solutions to those exercises |
_demos/ |
Files for stuff we demo |
website/ |
The website and slides |
./* |
Lots of project related files you can ignore |
👨💻 👩💻 _exercises/01_hello-llm/01_hello-llm.R
🫣 _solutions/01_hello-llm/01_hello-llm.R
Also in Python:
👨💻 👩💻 _exercises/01_hello-llm/01_hello-llm.py
📓 _exercises/01_hello-llm/01_hello-llm.pynb
🫣 _solutions/01_hello-llm/01_hello-llm.py
..to our first activity!
…you need an API key!
aka. how to give OpenAI your money
Use these keys for all of our activities today
Play and explore! But please be considerate :)
We’ll turn them off at the end of the workshop
01_hello-llm🔓 Decrypt the .env.secret → .env:
R: Run secret.R
Python: Run make secret-decrypt in terminal
or run uv run secret.py decrypt .env.secret > .env
🤫 The special phrase is:
positconf2025-llm-workshop
🤖 Run the code in _exercises/01_hello-llm
posit-conf-2025.github.io/llm