Skip to content
Kendrick's Website Kendrick's GitHub Kendrick's Youtube Kendrick's Travel blog

[Book Review] Learning LangChain: Implementing RAG, Agents, and Cognitive Architecture with LangChain and LangGraph

4 min read
Cover
"This review was written after receiving the book for Hanbit Media's <I am a Reviewer> activity."

Introduction

The book I'm reviewing today is 『Learning LangChain: Implementing RAG, Agents, and Cognitive Architecture with LangChain and LangGraph』.

This book was co-authored by Mayo Oshin, an early development contributor to LangChain, and Nuno Campos, a startup software engineer. It was published in February 2025, with the Korean first edition released in May. As of June 2025, it contains very up-to-date information.

This book can be recommended to software engineers who want to develop AI and LLM-based applications using LangChain, or those interested in LangChain and service development.

Features

It provides examples in both Python and JavaScript. Python uses Pydantic, while JavaScript uses the zod library for data schema validation. There are language-specific differences, such as Python's ability to use decorators. Since it provides examples in both languages, readers can learn by referring to the language they're more familiar with.

Previously, I always used Python due to slow documentation and library updates on the JavaScript side, but I understand these issues no longer exist. Personally, I'm more familiar with JavaScript but prefer Python when using LangChain.

Book Structure

CHAPTER 00 Basic AI Knowledge for LangChain CHAPTER 01 Basic LLM Usage with LangChain CHAPTER 02 RAG Step 1: Data Indexing CHAPTER 03 RAG Step 2: Data-Based Conversation CHAPTER 04 Memory Functionality with LangGraph CHAPTER 05 Implementing Cognitive Architecture with LangGraph CHAPTER 06 Agent Architecture I CHAPTER 07 Agent Architecture II CHAPTER 08 Patterns for Improving LLM Performance CHAPTER 09 AI Application Deployment CHAPTER 10 Testing: Evaluation, Monitoring, and Improvement CHAPTER 11 LLM Application Development

Review

Since covering all chapters would make the content too long, I'll organize the parts I found most interesting.

Starting from Chapter 2, it covers RAG in earnest. When I wrote a RAG related article in January 2024, I used LangChain, and I could see that many more features are now built-in.

Beyond basic character count-based chunk splitting, it also supports features for splitting chunks by specific programming languages using the RecursiveCharacterTextSplitter class. It's possible to split text chunks not only for markdown but also for languages like Python.

For vector storage examples, it introduces methods for using PostgreSQL's PGVector. Previously, I mainly used Pinecone, Chroma, and Faiss as vector stores, but now there are much more diverse options.

I was able to understand concepts like RAPTOR and ColBERT strategies, which I vaguely knew before, more deeply through this book.

At the end of Chapter 2, it also explains 'effective measures to maximize RAG system accuracy' that can be utilized in actual services.

Chapter 3 covers query transformation techniques known by various names like magic prompt and rephrase. It explains Rewrite-Retrieve-Read (RRR) for rewriting user input to fit purposes, multi-query retrieval that generates multiple initial queries to combine various results, Reciprocal-rank-fusion (RRF) using ranking, and virtual document embedding.

Chapter 4 is about LangGraph. LangGraph is a framework that complements LangChain's limitations of using only chain structures, helping process tasks in graph structures. It's mainly useful for implementing complex workflows like complex agent collaboration, multi-step reasoning, and dynamic decision trees.

AI service development always involves concerns between autonomy and reliability. This book introduces tradeoff solutions that can appropriately resolve these concerns.

It also covers various strategies including structured output, intermediate output, user intervention patterns, and multitasking.

Chapter 9 covers AI application deployment. The Supabase examples are particularly impressive. Supabase has been gaining attention since transitioning to G/A (General Availability) last April, to the extent that startup communities like YC actively recommend its use.

Chapter 10 covers LLM testing, evaluation, monitoring, and improvement. I think this might be the most important chapter. Usually, people only develop and overlook this part, but for AI services, models or prompts need continuous improvement, so building related systems in advance can save a lot of time.

The appendix explains MCP. The content about combining LangChain with MCP was particularly interesting.

Conclusion

As a side note, I used LangChain when it was gaining attention 2 years ago, but I thought it would soon be replaced when tools like ChatGPT Assistants and Vectorstore appeared. However, LangChain and its related ecosystem have actually become more robust.

This book not only covers LangChain and LangGraph usage but also well organizes strategies that are good to know when developing AI services, which should help engineers in the long term.