rag

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

GenAI: Building AI Agents with LangGraph, CrewAI, and Beyond

A chatbot answers one question and stops. Python AI agents keep going: they read a goal, pick a tool, run it, check the result, and repeat until the job is done. That loop, driven by an LLM (Large Language Model), is the entire idea. This post builds it bare in plain code, then shows the same loop inside LangGraph, CrewAI, and the OpenAI and Claude SDKs. You already met the first piece of this in the LLM API and function ... Read More

Python: Unit Testing with pytest, Fixtures, Parametrize

Python pytest from scratch: see how test discovery works, write fixtures for reusable setup, parametrize one test across many inputs, use markers to organize a suite, and measure code coverage with pytest-cov. Every example below was run on real pytest, so the output you see is the output you get. “Code without tests is broken by design.” Jacob Kaplan-Moss You change one line of code, the app still seems to run, and three days later a user reports that something ... Read More