Core components of LangChain
LangChain offers a variety of modules that can be used to create language model applications. These modules can be used individually in simple applications or combined to create more complex ones. Flexibility is the key here!
The most common components of any LangChain chain are the following:
- LLM model: LangChain’s core reasoning engine is your language model. LangChain makes it easy to use many different types of LLMs.
- Prompt templates: These provide instructions to the LLM, controlling its output. Understanding how to construct prompts and different prompting strategies is crucial, so it’s good that we covered this in the previous chapter.
- Output parsers: These convert the raw response from the LLM into a more usable format, simplifying downstream processing.
Let’s look at each of these core components in more detail.
Working with LLMs in LangChain
There are two different types of LLM models in LangChain...