rag

Guides to retrieval-augmented generation, combining search with language models for grounded answers.

Agentic RAG in Python: Hybrid Search, Reranking, and GraphRAG

Plain RAG works right up until real users show up: typed keywords miss, and questions that span two files come back half answered. Agentic RAG treats retrieval as a loop the system can steer, rewriting the query, blending keyword and vector search, reranking, and retrieving again. This post upgrades the LlamaIndex pipeline with real numbers for every step, so you tune with proof instead of vibes. One quick definition first, because “agentic” leans on an idea we have not properly ... Read More

AI Project in Python: Building a Complete AI Application

246 posts ago you typed your first print(). This AI capstone project is where all of it pays off: one production-grade Document Assistant that reads your files, answers questions with cited sources, and ships behind a real API. Python fundamentals, RAG, guardrails, evals, Docker, all wired into a single running system you can put on your resume. We are building an AI-Powered Document Assistant. Picture a smart librarian who has read every document you own. You hand it your files, ... Read More

How to Evaluate LLM Output: RAGAS, DeepEval, Hallucination Detection

Your model just summarized a support ticket. Is the summary any good? You cannot run accuracy_score on free-form text: there is no single right answer, and two good summaries can use completely different words. LLM evaluation in Python exists to put a number on quality anyway, and this post builds the tools for it, from a hand-rolled grader up to RAGAS and DeepEval. The trick the whole industry settled on is almost funny: use another language model as the grader. ... Read More