A comprehensive, hands-on guide to mastering LangChain fundamentals through practical Jupyter notebooks.
This repository is the second module in a progressive learning series on Generative AI and LangChain, designed to take you from basic concepts to building production-ready RAG (Retrieval-Augmented Generation) systems.
This course provides a structured, step-by-step introduction to LangChain using modern patterns and tools:
- Progressive Learning: 15 notebooks covering everything from prompt templates to vector stores
- Modern Stack: Built with LCEL (LangChain Expression Language), OpenAI, FAISS, Chroma
- Practical Examples: Each concept includes working code and real-world applications
- Production-Ready: Learn patterns used in professional LLM applications
Perfect for developers, data scientists, and AI enthusiasts who want to build robust LLM-powered applications.
| Notebook | Topic | Description |
|---|---|---|
00 |
API Keys & Environment Setup | Secure management of credentials and configuration |
01 |
Fundamentals Concepts | Core LLM ideas: context, tokens, prompts, hallucinations |
02 |
LLM App Architecture | Understanding how LLM-based applications are structured |
03 |
Load Env & Basic Model | Load environment variables and call OpenAI / Groq models |
04 |
Prompt Templates | Build and format prompts with PromptTemplate and ChatPromptTemplate |
05 |
Chains | What is a chain? Build your first LCEL pipeline |
06 |
Chain Types | Explore RunnablePassthrough, RunnableLambda, and RunnableParallel |
07 |
Built-in Functions | Using .bind(), .bind_tools(), and .assign() for modular logic |
08 |
Composing Chains | Nested and dependent chains (fan-out / fan-in) |
09 |
RAG Introduction | Conceptual introduction to Retrieval-Augmented Generation |
10 |
Data Loaders | Loading data with LangChain’s community loaders |
11 |
Text Splitters | Chunking large documents with RecursiveCharacterTextSplitter |
12 |
Text Embeddings | Converting text into vector embeddings |
13 |
Vector Stores | Storing and querying embeddings with Chroma or FAISS |
14 |
VectorStore Retriever | Using vector stores as retrievers for semantic search |
- Python: 3.10, 3.11, or 3.12
- uv: Fast Python package installer (install guide)
- OpenAI API Key: Required for running examples (get one here)
- Clone the repository:
git clone https://github.com/JaimeLucena/02-langchain-beginners.git
cd 02-langchain-beginners- Install dependencies:
uv sync-
Set up environment variables:
Create a
.envfile in the root directory:
OPENAI_API_KEY=your_openai_api_key_here
GROQ_API_KEY=your_groq_api_key_here # Optional- Launch Jupyter:
uv run jupyter lab- Start with notebook
00and work through them sequentially.
- LangChain Core:
>=0.3.0(modern LCEL patterns) - LLM Providers: OpenAI, Groq (optional OSS models)
- Vector Databases: FAISS, ChromaDB
- Data Processing: LangChain text splitters and community loaders
Learn the basics of prompts, templates, and environment management.
Master LCEL chains, parallel execution, and advanced composition patterns.
Build complete retrieval-augmented generation pipelines with vector stores.
By the end of this course, you'll be able to:
- ✅ Create dynamic prompt templates with ChatPromptTemplate
- ✅ Build and compose LCEL chains for complex workflows
- ✅ Implement RAG systems with semantic search
- ✅ Use vector stores (FAISS/Chroma) for efficient document retrieval
- ✅ Structure production-ready LLM applications
- ✅ Apply modern LangChain patterns and best practices
This is the second course in the series. You should be comfortable with:
- Python fundamentals (covered in 01-python-fundamentals)
- Basic understanding of APIs and JSON
- Familiarity with Jupyter notebooks
No prior LLM or LangChain experience required!
Found a bug or have a suggestion? Contributions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/improvement) - Commit your changes (
git commit -am 'Add new example') - Push to the branch (
git push origin feature/improvement) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Jaime Lucena
- GitHub: @JaimeLucena
If you find this course helpful, please consider giving it a star! ⭐
Ready to master LangChain? Start with notebook 00 and begin your journey! 🚀