Tutorials
Build something that works: retrieval, agents, fine-tuning, evals, serving, with complete code.
-
A golden test set for a chatbot, scored without an LLM judge
How to build a golden set for a support bot and score it with exact match, token F1, ROUGE-L, and per-item assertions. Two bots, 48 items, code and data included.
-
An agent tool-use loop from scratch: states and stop rules
A tool-use loop built as an explicit state machine with six stop conditions and a token budget, measured over 2,000 simulated episodes. Code included.
-
Structured output that never breaks: JSON Schema, validation, retries
A validate-and-retry loop for model JSON, with a small schema validator, a tolerant extractor, and measured retry rates from a 2,000-run simulation.
-
A minimal retrieval pipeline in Python: chunking, TF-IDF, evaluation
A complete retrieval pipeline in the standard library, run on 216 arXiv abstracts, with Recall@k and MRR measured for whole-document versus chunked indexing.