What you are going to build
You will finish this course with a help-centre assistant that answers from a shop's documents, cites them, respects permissions and refuses when nothing fits.
Retrieval-augmented generation, RAG, is the most common way to make a model answer from a company's own documents: find the passages that match the question, put them in the prompt, and have the model answer from them. LlamaIndex is a Python framework for every step of that: loading documents, splitting them, indexing, retrieving and answering.
No API key
Embeddings come from all-MiniLM-L6-v2, a small open embedding model that runs on your computer, so every retrieval result in the course is real. Answers come from a stand-in model you write in lesson 10, and lesson 9 shows the exact prompt a real model would get.
What you need
- Python 3.10 or later, and about 1 GB of disk space for PyTorch and two small models.
- Python for AI; LLM Fundamentals explains tokens and prompts used here.
pip install "llama-index-core==0.14.24" "llama-index-embeddings-huggingface==0.8.0" "llama-index-retrievers-bm25==0.8.0"llama-index-core is the framework. The other two are integrations, installed separately as LlamaIndex does for every model and store: local embeddings through Hugging Face, and keyword search with BM25.
Every expert started right here.