What Is Retrieval-Augmented Generation (RAG)? A Practical Guide with Python Examples

RAG

Learn how RAG works, why LLMs hallucinate, and build your first Retrieval-Augmented Generation pipeline in Python. Find all tutorials here Introduction Large Language Models (LLMs) have transformed how we build AI applications. Today, we can ask models to: Tools like ChatGPT, Claude, Gemini, and Llama make these tasks feel almost magical. But there’s one major … Read more

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