Modules can be used as stand-alones in simple applications and they can be combined for more complex use cases.The most common and most important chain that LangChain helps create contains three things:LLM: The language model is the core reasoning engine here. In order to work with LangChain, you need to understand the different types of language models and how to work with them.Prompt Templates: This provides instructions to the language model. This controls what the language model outputs, so understanding how to construct prompts and different prompting strategies is crucial.Output Parsers: These translate the raw response from the LLM to a more workable format, making it easy to use the output downstream.In this getting started guide we will cover those three components by themselves, and then go over how to combine all of them.
Understanding these concepts will set you up well for being able to use and customize LangChain applications.
Most LangChain applications allow you to configure the LLM and/or the prompt used, so knowing how to take advantage of this will be a big enabler.LLMs‚ÄãThere are two types of language models, which in LangChain are called:LLMs: this is a language model which takes a string as input and returns a stringChatModels: this is a language model which takes a list of messages as input and returns a messageThe input/output for LLMs is simple and easy to understand - a string.
But what about ChatModels? The input there is a list of ChatMessages, and the output is a single ChatMessage.
Installation
Installation ->: Modules can be used as stand-alones in simple applications and they can be combined for more complex use cases.The most common and most important chain that LangChain helps create contains three things:LLM: The language model is the core reasoning engine here. In order to work with LangChain, you need to understand the different types of language models and how to work with them.Prompt Templates: This provides instructions to the language model. This controls what the language model outputs, so understanding how to construct prompts and different prompting strategies is crucial.Output Parsers: These translate the raw response from the LLM to a more workable format, making it easy to use the output downstream.In this getting started guide we will cover those three components by themselves, and then go over how to combine all of them.
Understanding these concepts will set you up well for being able to use and customize LangChain applications.
Most LangChain applications allow you to configure the LLM and/or the prompt used, so knowing how to take advantage of this will be a big enabler.LLMs‚ÄãThere are two types of language models, which in LangChain are called:LLMs: this is a language model which takes a string as input and returns a stringChatModels: this is a language model which takes a list of messages as input and returns a messageThe input/output for LLMs is simple and easy to understand - a string.
But what about ChatModels? The input there is a list of ChatMessages, and the output is a single ChatMessage.