Augmented Generation

How to add knowledge to LLMs and make them more useful for specific tasks.

Slides

View slides in full screen

Outline

  • (10m) Manual RAG
    • Activity 15_coding-assistant: Use an LLM as a coding assistant
      • Write a function that uses {weathR} (R) or NWS (Python) to get the weather for a location.
      • Then, give the LLM the {weathR} (R) or NWS (Python) README and see how much better the response is.
  • (30m) RAG
    • High-level overview of how RAG works
    • Activity 16_rag: Build a dynamic RAG system
      • Make a chatbot that can draw from the knowledge of:
      • Preprocess and compute embeddings for each chunk using ragnar or llama-index
        • https://posit-dev.github.io/chatlas/misc/RAG.html#dynamic-retrieval
        • https://ragnar.tidyverse.org/articles/ragnar.html#setting-up-rag
      • Add a tool that searches the embeddings and returns the top few chunks
        • chatlas: this means writing a function
        • ellmer: Use ragnar