generative-ai

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

AI Agent Evaluation: Trajectories, Tool Errors, Success

In the LangChain State of AI Agents survey of 1,340 practitioners, quality beat cost and safety as the number one obstacle to shipping agents. AI agent evaluation is how you find out whether the agent you built in posts 225 and 234 actually finishes tasks or just looks busy calling tools. And agent evals are not chat evals: you grade a whole trajectory of tool calls, not one message. Two agents can land on the same reply while one took ... Read More

RAG Project: Build, Evaluate, and Ship a Retrieval App

Anyone can wire a Large Language Model (LLM) to a folder of documents and get answers back. Proving those answers are good is a different job, and it is the one interviewers actually probe. This RAG project is the capstone for the GenAI chapter: build a document-question app, score it with real numbers, trace every request, and gate every merge behind CI. “If you cannot measure it, you cannot improve it, and you certainly cannot ship it.” Last Updated: July ... Read More

GenAI: QLoRA Fine-Tuning with Unsloth on a Free Colab GPU

QLoRA is the trick that lets you fine-tune a 7B-class open model on a free Colab Graphics Processing Unit (GPU) without renting a single hour of cloud compute. It stands for Quantized Low-Rank Adaptation, and it stacks two ideas: load the big base model in 4-bit precision so it barely uses memory, then train only a thin set of adapter matrices on top. The other tutorial in this series (fine-tuning LLMs guide) covers the theory of LoRA and QLoRA. This ... Read More