← All sessions, cheat sheets & labs
Week 2 · Field guide · RAG framework

LlamaIndex

The RAG-first framework: 300+ data connectors, indexing, and query engines that get you from a pile of documents to a working retrieval pipeline fast.

RAGopen sourcePython + TypeScript300+ connectors

What it is

A framework built for document-heavy retrieval.

LlamaIndex is purpose-built for RAG: 300+ data connectors pull from PDFs, Notion, Slack, databases and more; indexing and chunking are handled for you; and query engines, retrievers, and agentic retrieval sit on top so you can ask questions over your corpus without wiring every stage by hand. Where a general orchestration framework treats retrieval as one node among many, LlamaIndex treats the whole document-to-answer path as the main event.

The one job

Documents to a working retrieval pipeline, fast.

Point it at a pile of documents and get back something you can query. It collapses connect, chunk, index, and retrieve into a few lines so you spend your time on quality, not plumbing.

Reach for it when

Skip it when

A minimal look

Build an index, then query it.

import { VectorStoreIndex, Document } from "llamaindex";

// wrap your documents; chunking + embedding happen for you
const docs = files.map((f) => new Document({ text: f.text }));
const index = await VectorStoreIndex.fromDocuments(docs);

// a query engine retrieves the right chunks and answers
const engine = index.asQueryEngine();
const res = await engine.query({ query: "What is our refund window?" });

The principle it teaches

Course principle

Understand the pipeline before you adopt the framework. Lab 2 has you build chunk to retrieve to rerank by hand, so LlamaIndex becomes a convenience that saves you typing, not a black box you cannot debug.

Where it fits your labs

This is a Week 2 tool. Lab 2 has you build the hybrid RAG pipeline by hand first; LlamaIndex is what you graduate to once you know exactly what each stage is doing and why.

Use in
Lab 2 (hybrid RAG), once you have built the stages by hand.
week 2
Pairs with
A vector database for storage and Cohere Rerank for precision on the retrieved set.