Lecture 20
Cornell University
INFO 4940/5940 - Fall 2025
November 6, 2025
ae-19Instructions
ae-19 (repo name will be suffixed with your GitHub name).renv::restore() (R) or uv sync (Python), open the Quarto document in the repo, and follow along and complete the exercises.15_coding-assistantInstructions
Use Claude 3.7 Sonnet to write a function that gets the weather. The first time, use Claude on its own.
Do some basic research for Claude about how to use a specific package to get the weather.
How does Claude do with the same task now?
06:00
Answer: word vector embeddings → turn words into vectors
🤴 - 🧔♂️ + 💁♀️ = ❓
🤴 - 🧔♂️ = 👑
👑 + 💁♀️ = ❓
🤴 - 🧔♂️ = 👑
👑 + 💁♀️ = 👸
Every prompt you send gets passed through a RAG system and is augmented
The LLM can decide when to call the RAG system


16_ragInstructions
Follow the steps in the 16_rag exercise, which are roughly:
First, you’ll create a vector database from a set of documents:
Test out the vector database with a simple query.
Attach a retrieval tool to a chat client and try it in a Shiny app.
15:00
ragnar or in Python with LlamaIndex