Lab: Setting Up a RAG (Retrieval-Augmented Generation) System for Technical Documentation
Objective
In this lab, you will build a Retrieval-Augmented Generation (RAG) pipeline to query technical documentation, such as this example. Sources may include:
The goal is to design a system that:
- Stores and indexes documents in a vector database.
- Enables users to ask questions and retrieve relevant passages.
- Generates precise answers using a generative AI model based on the retrieved passages.
General Guidelines
- Documentation Sources
You may choose one or more of the following sources:
- Lab Goal
Build a pipeline that integrates:
- Extraction: Collecting and preprocessing documentation files (e.g., converting
.rst
or .md
files into plain text).
- Indexing: Creating a vector database to search for relevant passages.
- Retrieval and Generation: Using retrieved passages to generate precise answers with a generative AI model.
- Explore Freely
You are encouraged to experiment with different tools, libraries, and techniques, such as re-ranking or using various vector databases.
Resources to Help You
- Vector Databases: FAISS, PGVector, Weaviate.
- Embeddings: SentenceTransformers, Mistral-embed.
- Prompt Engineering: Techniques for optimizing interactions with generative AI.