Anatomy of a conversation
Programmatically conversing with LLMs
Slides
Outline
- (10m) Think empirically, be pragmatic
- Getting into the right mindset for working with LLMs
- How to approach this workshop
- Extra time to work with participants on setup if needed
- (20m) Anatomy of a conversation
- The same conversation from R and Python with ellmer and chatlas
- Message roles: system, user, assistant
- Your Turn
_exercises/02_conversation: same question with and without a system prompt - How does the LLM remember the conversation?
_demos/03_clearbot
- (20m) How do LLMs work?
- How to Talk to Robots slides
- Tokens as the fundamental unit
- Example:
_demos/04_token-possibilities
- (20m) Shinychat basics
live_console()andlive_browser()(orchat.console()andchat.app())- Your Turn
_exercises/05_live: write a roast of Hadley Wickham withlive_console() - Making your own shinychat app:
chat_app()for a quick app,page_chat()+chat_server()in R orChat(client=)in Python for an app others can use - Your Turn
_exercises/06_word-games: 20-questions-style game — the model picks a word, you guess