Learning LangChain

by Mayo Oshin and Nuno Campos

Artificial Intelligence

Book Details

Book Title

Learning LangChain

Author

Mayo Oshin and Nuno Campos

Publisher

O'Reilly Media, Inc.

Publication Date

2025

ISBN

9781098167288

Number of Pages

600

Language

English

Format

PDF

File Size

7.7MB

Subject

Artificial Intelligence

Table of Contents

  • Preface
  • Chapter 1. LLM Fundamentals with LangChain
  • Getting Set Up with LangChain
  • Using LLMs in LangChain
  • Making LLM Prompts Reusable
  • Getting Specific Formats out of LLMs
  • Assembling the Many Pieces of an LLM Application
  • Summary
  • Chapter 2. RAG Part I: Indexing Your Data
  • The Goal: Picking Relevant Context for LLMs
  • Embeddings: Converting Text to Numbers
  • Converting Your Documents into Text
  • Splitting Your Text into Chunks
  • Generating Text Embeddings
  • Storing Embeddings in a Vector Store
  • Tracking Changes to Your Documents
  • Indexing Optimization
  • Summary
  • Chapter 3. RAG Part II: Chatting with Your Data
  • Introducing Retrieval-Augmented Generation
  • Query Transformation
  • Query Routing
  • Query Construction
  • Summary
  • Chapter 4. Using LangGraph to Add Memory to Your Chatbot
  • Building a Chatbot Memory System
  • Introducing LangGraph
  • Creating a StateGraph
  • Adding Memory to StateGraph
  • Modifying Chat History
  • Summary
  • Chapter 5. Cognitive Architectures with LangGraph
  • Architecture #1: LLM Call
  • Architecture #2: Chain
  • Architecture #3: Router
  • Summary
  • Chapter 6. Agent Architecture
  • The Plan-Do Loop
  • Building a LangGraph Agent
  • Always Calling a Tool First
  • Dealing with Many Tools
  • Summary
  • Chapter 7. Agents II
  • Reflection
  • Subgraphs in LangGraph
  • Multi-Agent Architectures
  • Summary
  • Chapter 8. Patterns to Make the Most of LLMs
  • Structured Output
  • Summary
  • Chapter 9. Deployment: Launching Your AI Application into Production
  • Prerequisites
  • Understanding the LangGraph Platform API
  • Deploying Your AI Application on LangGraph Platform
  • Security
  • Summary
  • Chapter 10. Testing: Evaluation, Monitoring, and Continuous Improvement
  • Testing Techniques Across the LLM App Development Cycle
  • The Design Stage: Self-Corrective RAG
  • The Preproduction Stage
  • Production
  • Summary
  • Chapter 11. Building with LLMs
  • Interactive Chatbots
  • Collaborative Editing with LLMs
  • Ambient Computing
  • Summary
  • Index
  • About the Authors