Build and test a small LLM-powered feature in Python 3.12: provider-neutral client, context, streaming, structured output, embeddings, RAG with citations, tool calling, evals, cost control and security. Runs offline on a fake model. No API key.
Twenty-two pages that build one project, EvidenceDesk, a small help-centre assistant for an invented company. It retrieves evidence from a local corpus, answers with citations, refuses when evidence is missing and fails safe. Everything is fake-client-first: the default model is a deterministic fake, so every example, test and exercise runs offline, with no API key, no GPU and no paid service. The fake model is not a language model, and the pages say where real models behave less predictably.
You start from the HTTP request and a provider-neutral client with adapters, configuration and error handling, then context assembly, trust boundaries and token budgets. Next come streaming and structured outputs, embeddings and local vector search, a first RAG system with chunking and citation checks, and one-step tool calling with permissions. The last parts add evaluation datasets and regression tests, cost, latency and caching, prompt-injection defences and safe failure, and packaging with documentation. A graded practice lab and the EvidenceDesk capstone finish the tutorial, with a grader and an acceptance script you run yourself.
You need Python 3.12 and a terminal. Optional provider adapters are shown, but nothing depends on them. This tutorial is educational: it is written for learning, model names, prices and SDK details change, and facts were checked on 12 October 2026. Docker files, where shown, are not run. The Bangla text was written by AI and reviewed only by AI. Every page is available in English and Bangla.
11 chapters · 522 min total
Watch it taught, then check what stuck.