How to Fix LangChain OutputParserException in Production LLM Pipelines

When your LLM returns malformed JSON, the problem isn’t always the model. Here’s how to build structured, validated, and production-ready outputs with Pydantic and Instructor. Your LLM application works perfectly in development. You deploy it. A few hours later, production logs start filling up with errors: Or perhaps: The frustrating part? The model’s answer looks … Read more

RAG using Llama 2, Langchain and ChromaDB

Introduction Objective Use Llama 2.0, Langchain and ChromaDB to create a Retrieval Augmented Generation (RAG) system. This will allow us to ask questions about our documents (that were not included in the training data), without fine-tunning the Large Language Model (LLM). When using RAG, if you are given a question, you first do a retrieval … Read more