LangChain LangGraph Crash Course (LLCC) is a hands-on course designed to teach you LangChain and LangGraph from the ground up. In this course, you will learn how to build Retrieval-Augmented Generation (RAG) workflows, intelligent agents doing web searches, text classifiers, and much more.
Note
Unlike official tutorials, LLCC provides pure Python scripts instead of Jupyter or Colab notebooks, delivering clean, ready-to-run code. Each script is extensively commented for complete clarity and ease of understanding. Additionally, LLCC sometimes includes extra steps not found in official tutorials, such as LCEL.
If you want to run the examples, you will need to install the following:
You'll also need to have an OpenAI key.
Inside the repository, install the dependencies as follows:
pixi install -a
All examples utilize the OpenAI API, specifically employing the gpt-4o-mini
model as the language model and/or the text-embedding-3-large
model for embeddings. You can access these services under the free tier, which typically incurs no cost.
Tip
It's recommended to follow the course in the given order.
Task | Description | File |
---|---|---|
Chat models & prompts | Simple LLM application with prompt templates and chat models | simple_llm_application.py |
Semantic search | Search over a PDF with document loaders, embedding models and vector stores | semantic_search_engine.py |
Classification | Classify text into tags using chat models with structured outputs | text_classifier.py |
Extraction | Extract structured data from text using chat models and few-shot examples | data_extractor.py |
Task | Description | File |
---|---|---|
Agent | Simple agent with a memory and able to do web searches | agent.py |
Agent & human in the loop | Agent empowered to request a human intervention | agent_human_assitance.py |
Agent & time travel | Altering an agent output by changing its memory | agent_time_travel.py |
Task | Description | File |
---|---|---|
RAG | Simple RAG with an introduction to self-query (an advanced RAG technique) | rag.py |
RAG & conversations | Delegating (multi-step) RAG calls to a LLM | rag_delegation.py |
The resources described here are sorted in order of importance. For instance, to better understand and grasp each LangChain concept, you should have knowledge of LLM theory and LLM engineering.