Parsing Outputs with LangChain
Learn how to parse the output of an LLM as structured information using output parsers in the LangChain framework.
We'll cover the following
LLMs typically output a string of text. However, when creating an LLM-powered application, we might need a more structured, formatted output that delivers concise information instead of requiring us to read the complete response.
Output parsers
Parsers are a tool that can help us get a structured output. If we don’t use parsers for our responses, then the expected output will be plain text as a string. LangChain provides us with different types of parsers. All parsers take either a string or a Message
as input.
The output depends on the type of parser being used. Let’s explore them:
Get hands-on with 1400+ tech skills courses.