generative-ai

Tutorials on generative AI with Python, from prompting LLMs to building your own AI-powered apps.

AI Design Patterns: Routers, Fallbacks, Caches, and Agents

At 2am, with a provider down and an agent looping, nobody invents a good fix from scratch. AI design patterns are the reusable answers to the failures every production AI system eventually hits: dead providers, ballooning bills, models that quietly rot while dashboards stay green. This catalog puts them side by side, each with the problem it solves, the structure, a runnable sketch, and when not to use it. “If the implementation is hard to explain, it’s a bad idea.” ... Read More

From Idea to AI MVP: The Right Way to Build

Most tutorials hand you a model and a prompt and call it a product. A real planning meeting asks harder questions: can we ship a first cut by next month, will it actually help anyone, and what will it cost per user? An AI MVP is the smallest version of your idea that answers all three, and this playbook builds one you could finish in a weekend. “If you are not embarrassed by the first version of your product, you ... Read More

AI Agent Project: From Raw Loop to LangGraph, With Evals

Agent frameworks rotate every few months; the design underneath them does not. This AI agent project is the capstone: one research-and-summarize assistant with four tools, built three ways. A raw loop written by hand, the same tools served from your own MCP server, and a LangGraph 1.x port with checkpoints and a human approval step. All three get graded on the same 20 tasks, with the results table in the README. “Make it work, make it right, make it fast. ... Read More