Augmented Generation
How to add knowledge to LLMs and make them more useful for specific tasks.
Slides
Outline
- (10m) Manual RAG
- Activity
15_coding-assistant: Use an LLM as a coding assistant- Write a function that uses
{weathR}(R) orNWS(Python) to get the weather for a location. - Then, give the LLM the
{weathR}(R) orNWS(Python) README and see how much better the response is.
- Write a function that uses
- Activity
- (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
ragnarorllama-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