What this book covers
Chapter 1, Using LangChain with Google Cloud, introduces LangChain and explains how LangChain orchestrates LLMs and coordinates the execution of complex tasks. It also examines LangChain primitives and explains how they can be composed together using the LangChain Expression Language (LCEL).
Chapter 2, Foundational Models on Google Cloud, guides you on how to select and implement the right Google Cloud foundational model in LangChain for many common use cases.
Chapter 3, Grounding Responses on Google Cloud, focuses on the problem of hallucinations in LLMs and how to address them with RAG. It describes the components of a RAG system and introduces Vertex AI Agent Builder, a managed Google Cloud service for building RAG-based applications.
Chapter 4, Vector Search on Google Cloud, explores the architecture of a vector search pipeline and discusses different searching techniques. It showcases how the combined power of Google Cloud and LangChain can be harnessed to develop search components for RAG applications.
Chapter 5, Advanced Techniques for Parsing and Ingesting Documents, explains the range of document parsing capabilities available within Google Cloud and LangChain. It demonstrates the use of LangChain document loaders, Document AI, and Vertex AI’s Agent Builder for ingesting documents of a variety of formats.
Chapter 6, Multimodality, discusses multimodal LLMs, how to compose a multimodal input with LangChain, and advanced methods of building multimodal RAGs to enhance their capabilities.
Chapter 7, Working with Long Context, teaches you how to use LangChain to summarize documents, including how to handle long documents and different modalities such as audio and video, as well as how to efficiently implement question-and-answering on long documents.
Chapter 8, Building Chatbots, guides readers on how to build chatbots with LangChain, covering conversation engineering principles, memory implementation, intent routing, and integration with RAG.
Chapter 9, Tools and Function Calling, explores how to improve the reasoning capabilities of LLMs through the use of tools. It introduces the concept of tool calling and examines different ways to construct tools programmatically with LangChain. It also discusses ReAct – one of the foundational patterns in the multi-step reasoning process.
Chapter 10, Agents in Generative AI, explains the concept and components of an agent and gives examples of how to build one with two different methods: LangChain on Google Cloud with the Gemini SDK and Vertex AI Agent Builder.
Chapter 11, Agentic Workflows, delves into the fundamentals of agentic architectures and shows two examples of real-world architectures: agentic RAG and natural language to SQL using LangChain, LangGraph, and Google Cloud.
Chapter 12, Evaluating GenAI Applications, emphasizes the importance of evaluating generative AI applications to ensure they meet product requirements and quality expectations. It discusses the difference between traditional evaluation and where generative AI evaluation is similar or different. It also introduces LangSmith, a tool from LangChain that helps developers trace and evaluate generative AI applications, and explains how to use Vertex AI evaluation, a managed service for evaluating generative AI applications on Google Cloud.
Chapter 13, GenAI System Design, walks you through designing and building generative AI systems, addressing challenges such as non-deterministic outcomes and rapid technology evolution while emphasizing responsible AI principles.
Appendix 1, Overview of Generative AI, discusses the principles behind generative AI and LLMs. It explains very briefly how these models are trained, their unique characteristics, and the importance of AI alignment and discusses key criteria for a successful proof of concept (POC) in generative AI.
Appendix 2, Google Cloud Foundations, provides a foundational guide to Google Cloud for those new to the platform, covering organization setup, user management, billing, networking, and AI/ML development environments, enabling you to effectively leverage Google Cloud for LangChain applications.