Tutorials
Step-by-step guides for building with AI. (22 stories)
From ratings to retrieval: a beginner-friendly book on recommender systems, with code that actually runs
Recommender Systems: From Ratings to Retrieval is a 142-page beginner’s guide to how recommenders actually work — 13 chapters, runnable Python throughout, every number produced by running the code. The companion code is free on GitHub today, and the first two chapters are a free PDF.
Testing agents: task-based evals for tool-using models
Impression-based testing breaks down the moment your agent starts calling tools. Here's the practical machinery behind trustworthy agent evals: sandboxed tasks, three kinds of graders, sharp success criteria, and a failure taxonomy that tells you what actually went wrong.
Automate your marketing with AI workflows: an n8n starter
n8n lets you build AI-driven marketing automations you actually own — from lead enrichment and scoring to content repurposing and follow-up sequences. Here is a practical starter guide with a working workflow template.
Build a voice agent in a weekend: STT, LLM, TTS
Speech in, speech out. A weekend plan for wiring a streaming voice agent — picking STT, LLM, and TTS services, cutting latency below a second, and handling interruptions like a human would.
Build your first MCP-powered agent: tools, servers, and safety rails
Wire a model to real tools through the Model Context Protocol. You'll build a working MCP server, connect it to an agent host, and add permission scopes and guardrails before anything can touch your files.
Give your chatbot a memory: session state that actually works
Context windows fill up and sessions reset. This tutorial walks through the three memory architectures that actually hold up in long conversations — summarization, retrieval-based recall, and entity stores — and how to combine them.
Consistent characters in AI images: a reference-image workflow
Keep the same face across every scene. This tutorial walks through reference images, character weight, seeds, and editing chains — from Midjourney's reference system to open-source identity adapters and character LoRAs.
Context engineering: the 2026 skill every AI builder needs
Model choice gets the headlines, but what goes inside the context window decides what your AI app actually does. Here's a systematic approach to designing context — from token budgets to compaction to RAG hygiene — that works across any model.
Embeddings for product search: build a semantic recommender
Keyword search matches strings; embeddings match meaning. This tutorial walks through building a semantic product search and a 'customers also liked' recommender from a raw catalog, step by step.
Document extraction at scale: invoices to structured data
A practical blueprint for turning messy invoice PDFs into clean, validated JSON — combining OCR, vision models, schema-enforced extraction, and a validation loop.
Build your first RAG pipeline in an afternoon
Retrieval-augmented generation is the highest-ROI pattern in applied AI. Here's a complete, working RAG pipeline — ingest, chunk, embed, retrieve, generate — you can build today with open tools.
Hybrid Search: BM25 plus Vectors in One Pipeline
Vector search understands meaning but fumbles exact terms like error codes and product IDs. BM25 nails exact terms but misses paraphrases. Here's how to fuse both into a single hybrid retrieval pipeline — with the math, the tuning knobs, and working code.
Write Your First LLM Eval: A Practical Guide
Start from real failures, build a small golden dataset, calibrate an LLM-as-judge against humans, and wire the whole thing into CI as regression testing for your prompts.
Add guardrails to your LLM app: filters, PII redaction, jailbreak detection
A layered defense you can ship this week — input screening, output checks, and monitoring that stop PII leaks, prompt injection, and jailbreaks before they reach users.
Fine-tune a model with LoRA on a single GPU
Adapt an open-weights model to your domain in an evening: pick a base model, prepare data, train LoRA adapters on one GPU, and evaluate the result — with working code.
Chain-of-thought and self-consistency: reasoning prompts that work
Why asking a model to show its work transforms multi-step reasoning, when step-by-step prompting backfires, and how sampling multiple answers and voting delivers the biggest accuracy win.
Prompt engineering that survives contact with production
Tips-and-tricks prompt advice falls apart in real apps. Here is how to build system prompts, curate few-shot examples, and test for failure modes so your LLM behavior survives scale.
Cut your API bill 75%: a prompt-caching tutorial
Prompt caching is the highest-ROI optimization most API users skip. This tutorial shows how it works on Anthropic, OpenAI, and Google Gemini — with pricing math, code samples, and the pitfalls that silently zero out your savings.
Structured outputs: getting JSON you can trust from LLMs
Malformed JSON from LLMs doesn't have to be a fact of life. Here's the full reliability stack — strict schemas, provider enforcement, constrained decoding, and validation-and-repair loops — that ends the bug for good.
Serve an open model with vLLM: a deployment tutorial
From downloading weights to a monitored production endpoint — how to deploy an open-weights model with vLLM, tune throughput, apply quantization, and watch it with Prometheus.
Build a support agent that knows when to escalate
The difference between a support agent customers trust and one they curse is escalation design: calibrated confidence thresholds, rich handoff context, and human-in-the-loop gates. This tutorial walks through building all three.
Seeing is prompting: a vision-model tutorial
Screenshots, diagrams, and product photos can all be prompts — but vision models see the world differently than you do. Here is what they do well, where they fail, and how to prompt them better.