
Lab 4 Building a RAG pipeline
In this lab, I'm going to move away from security for a little while and look at how we can augment our LLM using a technique called Retrieval Augmented Generation (RAG).
The idea is that we can use a pre-trained LLM to answer questions about a specific dataset. We can then augment the pre-trained model with additional information from a knowledge base. To do this we usually convert the data into a vector space and storing this information in a vector database, like ChromaDB. In this we'll cover:
- Store text embeddings in ChromaDB (an open source vector database)
- Retrieve relevant knowledge dynamically
- Use a local model to generate answers