LangChain / LlamaIndex
Build LLM applications with LangChain and LlamaIndex: prompts, runnables, parsers, tools, retrieval, indexes, query engines, agents and testing, with examples run offline using fake models.
Syllabus
The Framework Landscape
- Why Use an LLM Framework
- LangChain, LlamaIndex and Their Packages
- LangChain vs LlamaIndex: Which to Use When
- A Mental Model: Everything Is a Pipeline of Typed Steps
LangChain Core: Prompts, Models and Chains
- Prompt Templates and Messages
- Chat Models and the Pipe (LCEL) Chain
- Runnables: Lambda, Parallel, Passthrough and Batch
- Output Parsers and Structured Output
- Streaming and Async
LangChain: Tools, Routing and Reliability
- Defining Tools
- Routing and Branching
- Retries, Fallbacks and Timeouts
- Callbacks, Tracing and Debugging
- Chat History and Memory
Retrieval with LangChain
- Documents, Loaders and Text Splitters
- Embeddings, Vector Stores and Retrievers
- Building a RAG Chain
- Making Retrieval Better: Filters, MMR, Reranking
LlamaIndex: Data, Indexes and Query Engines
- LlamaIndex Data Model: Documents and Nodes
- Building a Vector Index and Retriever
- Query Engines and Response Synthesis
- Persisting and Reloading an Index
Agents and Workflows
Testing, Evaluating and Shipping
- Unit Testing with Fake Models
- Evaluating Quality: Datasets, Metrics, Tracing
- Versions, Cost, Latency and Security
- When to Drop the Framework