The LangChain ecosystem
The main LLM toolbox library we’ll discuss is LangChain. LangChain (https://python.langchain.com/) is a set of tools used to build LLLM applications. These tools include the core LangChain functions, which enable you to build applications using LLMs including vector databases storing embedded documents for Retrieval Augmented Generation (RAG); LangSmith, which facilitates logging; and LangGraph, which offers tools for building agents that run commands on behalf of users and enables “memory” across agent responses. This overall ecosystem is shown in Figure 8.1:

Figure 8.1: The LangChain ecosystem1
The first step in our experiments with LangChain is to set up an account on LangSmith so we can track the progress of our experiments.
We’ll first need to create an account so that we can use LangChain and its logging component LangSmith via an API key. Head over to https://www.langchain.com/langsmith and create an account...