TechByteByByte

LLM APPLICATIONS

LangChain

Learn how LangChain connects models, prompts, tools, retrieval and agents into reliable AI applications โ€” without losing sight of the underlying patterns beneath the framework.

Models โ†’ Tools โ†’ Retrieval โ†’ Agents โ†’ Production

LangChain Learning Path

Follow the modules in order to move from the mental model behind LangChain to real applications involving chat models, tools, retrieval, agents, safety and production best practices.

01

Why LangChain Exists (Before You Learn What It Is)

Start with raw API calls, hit the real problems every LLM app runs into, and see exactly why LangChain was built to solve them โ€” with matching OpenAI and Gemini code.

Start Module โ†’
02

The LangChain Mental Map: Where Everything Fits

Before writing more code, build a clear mental map of LangChain's pieces, how they relate to LangGraph and LangSmith, and how the package is actually organized under the hood.

Start Module โ†’
03

Setting Up a Real LangChain Project

Build a proper project folder, install the right packages for OpenAI and Gemini, and handle API keys the safe way โ€” before writing another line of LangChain logic.

Start Module โ†’
04

Chat Models: The Foundation of Every LangChain App

Go deep on the one piece every LangChain app touches first โ€” initialization, parameters, the response object, streaming, async, and a first look at structured output and tools.

Start Module โ†’
05

Provider Abstraction: One Interface, Many Providers

See exactly what LangChain's shared interface genuinely buys you across OpenAI and Gemini โ€” and where that abstraction honestly breaks down, so you never assume two providers are truly interchangeable.

Start Module โ†’
06

Messages: Why Not Just Strings

Go deep on HumanMessage, SystemMessage, AIMessage, and ToolMessage โ€” what each one actually represents, how a conversation is really built, and how multimodal input fits in.

Start Module โ†’
07

Prompt Templates: Turning Prompts Into Reusable Components

Stop rebuilding message lists by hand. Learn how prompt templates turn prompts into reusable, parameterized components โ€” from a single variable to full classification and extraction patterns.

Start Module โ†’
08

Runnables and LCEL: Why the Pipe Operator Exists

Understand the shared interface behind every LangChain component, why it makes the | pipe operator possible, and how to compose real pipelines with parallel execution, passthroughs, and custom logic.

Start Module โ†’
09

Chains and Composition: Building Real Pipelines with LCEL

Put Runnables to work building real, useful pipelines โ€” translation, summarization, classification, extraction, and multi-stage generation โ€” while clearing up what 'chain' actually means.

Start Module โ†’
10

Streaming: Why Waiting 15 Seconds Feels Wrong

Go beyond the basic streaming preview from earlier modules โ€” understand what a chunk actually is, how to reconstruct a full message from chunks, and how to peek inside a running chain.

Start Module โ†’
11

Batching and Async for Real Throughput

Measure the real difference between sequential calls, .batch(), and true async concurrency โ€” and learn exactly when each one is the right tool, not just how to call them.

Start Module โ†’
12

Tools: Giving Models the Ability to Act

Go deep on turning ordinary Python functions into well-described, production-quality tools a model can genuinely understand and reliably request โ€” the foundation every agent in this course builds on.

Start Module โ†’
13

Tool Calling: The Complete Request-to-Answer Cycle

Finally complete the full cycle you've only seen in pieces โ€” a model requesting a tool, your code executing it, and the model using that result to finish its answer, entirely by hand.

Start Module โ†’
14

Building the Tool Loop by Hand

Fix the exact gap the last module left open โ€” build a genuine, repeating loop that keeps calling tools until a real answer is reached, however many rounds that takes. This is what an agent actually is.

Start Module โ†’
15

From Manual Loop to create_agent

Meet LangChain's official, current way to build an agent โ€” and see it solve the exact same problem you just built by hand, line for line, so nothing about it feels like magic.

Start Module โ†’
16

Ten Progressive Agent Patterns

Put create_agent through its paces with ten small, realistic agents โ€” from a simple calculator to a full research assistant โ€” each one teaching you one new, recognizable shape.

Start Module โ†’
17

What create_agent Is Actually Doing

Go one level deeper than Module 14's simplified loop โ€” watch the real loop unfold step by step, see how tool failures are actually handled, and understand exactly what happens when an agent hits its limit.

Start Module โ†’
18

Structured Output, Properly: Two Real Strategies

The dedicated deep dive on structured output โ€” Pydantic schemas, the two real mechanisms LangChain uses underneath, nested structures, validation failures, and when to trust it.

Start Module โ†’
19

Agent State and Memory: Clearing Up the Terminology

Untangle messages, conversation history, short-term state, and persistent memory โ€” genuinely different concepts that get blurred together โ€” and see exactly which one to use for which real need.

Start Module โ†’
20

Middleware: Customizing the Agent Loop

Step into any point of an agent's loop โ€” before or after the model runs, before or after a tool runs โ€” without rewriting the loop itself. Includes dynamic model and tool selection.

Start Module โ†’
21

How LangChain Implements Retrieval

You already know why RAG works from your earlier course. This module maps that theory onto LangChain's actual components โ€” the concrete pipeline behind the concept.

Start Module โ†’
22

Document Loaders: Bringing Real Files Into LangChain

Load text, PDFs, web pages, CSVs, and entire directories into genuine Document objects โ€” the raw material every retrieval pipeline in this course starts from.

Start Module โ†’
23

Text Splitting: Chunking Documents That Actually Work

See what real chunk sizes and overlap settings actually produce on real text, and understand why recursive, structure-aware splitting is the practical default.

Start Module โ†’
24

Embeddings and Vector Stores in LangChain

The LangChain-specific implementation of embeddings and vector storage โ€” how chunks become searchable vectors, and how a vector store actually holds and searches them.

Start Module โ†’
25

Retrievers: Beyond as_retriever()

Configure retrieval properly โ€” top-k, metadata filtering, search type โ€” and understand the critical difference between a retriever as a fixed pipeline step and a retriever as an agent tool.

Start Module โ†’
26

Building RAG in LangChain, Version by Version

Bring every piece from the retrieval sequence together โ€” manual retrieval, the retriever abstraction, structured responses, citations, and conversation-aware RAG โ€” building one real system, one version at a time.

Start Module โ†’
27

When Things Fail: Retries and Fallbacks

Real applications face real failures โ€” timeouts, rate limits, provider outages. Build genuine resilience with .with_retry() and .with_fallbacks(), and know exactly what each one actually protects against.

Start Module โ†’
28

Guardrails: Practical Protection via Middleware

Real safety measures for a deployed agent โ€” input validation, output validation, tool permissions, and human approval โ€” built directly on the middleware system from Module 20.

Start Module โ†’
29

Seeing What Your Agent Actually Did

Why print(response) genuinely isn't enough once an agent has several steps, and how LangSmith gives you the full, inspectable execution trace โ€” introduced just enough to support real development.

Start Module โ†’
30

Testing Prompts, Chains, and Agents

Real, runnable tests for the components you've built throughout this course โ€” prompt formatting, structured output, mocked models, tools, chains, and agent behavior.

Start Module โ†’
31

LangChain vs. Calling the Provider SDK Directly

A balanced, honest comparison โ€” abstraction, portability, and integrations against complexity, debugging, and dependency surface. LangChain isn't always the right choice, and this module explains exactly when it isn't.

Start Module โ†’
32

Where LangChain Ends and LangGraph Begins

Everything you've built in this course was, quietly, running on LangGraph underneath. This module makes that relationship concrete, and prepares you for exactly where to pick up next.

Start Module โ†’
33

Taking LangChain to Production

Gather the deployment-focused threads from throughout this course โ€” timeouts, retries, secrets, logging, tracing, cost, and testing โ€” into one real, practical readiness checklist.

Start Module โ†’
34

Five Complete LangChain Applications

The capstone module โ€” five real, complete applications, built by combining everything from this course, ending with a full, production-oriented project laid out file by file.

Start Module โ†’

WHY LANGCHAIN?

Frameworks reduce the repetitive work, not the engineering judgment

LangChain helps you compose models, tools, prompts, retrieval and agents with a consistent API. The real value is not magic โ€” it is making real-world AI systems easier to build, reason about and operationalize.