LLM Engineering
For ownersPutting models to work: prompts, knowledge bases, evals and guardrails. The phase most worth an owner's time.
Put LLMs to work in production applications.
Start with lesson 1
Lesson 1 of 17, ~90 minutesPrompt Engineering: Techniques & PatternsThe lessons
- 01Prompt Engineering: Techniques & PatternsPrompt engineering is writing the instructions you give an AI model with care: who it should act as, what it needs to know, what it must not do, and what shape the answer should take.Build · ~90 minutes
- 02Few-Shot, Chain-of-Thought, Tree-of-ThoughtFew-shot prompting means showing the model a handful of worked examples before the real question. Chain-of-thought asks it to reason step by step, and tree-of-thought has it try several lines of reasoning and keep the best.Build · ~45 minutes
- 03Structured Outputs: JSON, Schema Validation, Constrained DecodingStructured outputs make a model return data in a fixed format, usually JSON that matches a schema, instead of free text. Your software can then read the answer directly without guessing.Build · ~90 minutes
- 04Embeddings & Vector RepresentationsAn embedding turns a piece of text into a list of numbers that captures its meaning. Texts with similar meaning end up with similar numbers, so a computer can measure how close two ideas are.Build · ~75 minutes
- 05Context Engineering: Windows, Budgets, Memory, and RetrievalContext engineering is deciding everything the model sees on each call: instructions, past messages, retrieved documents, tool descriptions and examples. It covers what to include, what to leave out and in what order, within a limited space.Build · ~90 minutes
- 06RAG (Retrieval-Augmented Generation)RAG, or retrieval-augmented generation, looks up relevant passages from your own documents and hands them to the model with the question. The model then answers from that material instead of only from what it learned in training.Build · ~90 minutes
- 07Advanced RAG (Chunking, Reranking, Hybrid Search)Advanced RAG improves the retrieval step with smarter chunking, hybrid search that mixes keyword and meaning matches, and a reranker that reorders results so the most useful passages reach the model.Build · ~90 minutes
- 08Fine-Tuning with LoRA & QLoRAFine-tuning trains an existing model further on your own examples. LoRA and QLoRA do this cheaply by training small add-on weights instead of the whole model, so it fits on modest hardware.Build · ~75 minutes
- 09Function Calling & Tool UseFunction calling lets a model ask your software to run a specific action, such as looking up an order or booking a slot. The model picks the tool and fills in the inputs, and your code does the real work.Build · ~75 minutes
- 10Evaluation & Testing LLM ApplicationsEvaluation means testing an AI feature against a fixed set of real examples with known good answers, and scoring it every time the prompt, model or settings change, instead of eyeballing a few replies.Build · ~45 minutes
- 11Caching, Rate Limiting & Cost OptimizationThis lesson covers keeping AI costs and traffic under control: reusing answers for repeat questions, limiting how fast requests go out, routing simple jobs to cheaper models, and tracking spend per call.Build · ~45 minutes
- 12Guardrails, Safety & Content FilteringGuardrails are the checks around an AI app that catch harmful, off-topic or manipulated inputs and outputs. They include filters, rules, prompt injection detection and limits on what the model can reveal or do.Build · ~45 minutes
- 13Building a Production LLM ApplicationThis capstone joins the earlier pieces, prompts, retrieval, tools, caching and guardrails, into one working service that streams replies, handles errors, logs what happens and keeps running under real traffic.Build (Capstone) · ~120 minutes
- 14Model Context Protocol (MCP)The Model Context Protocol, or MCP, is an open standard for connecting AI apps to outside tools and data. A tool built once as an MCP server can be used by any AI host that speaks the protocol.Build · ~75 minutes
- 15Prompt Caching and Context CachingPrompt caching lets the AI provider keep the long, repeated start of your prompt, such as system rules or a reference document, stored on its side, so later calls that reuse it are cheaper and start faster.Build · ~60 minutes
- 16Agent State Machines — Graphs, Nodes, CheckpointsThis lesson shows how to build an AI agent as an explicit graph of steps with saved state, using tools like LangGraph. Because each step is defined, you can pause, resume, branch or replay the agent's run.Build · ~75 minutes
- 17Agent Framework Tradeoffs — Graph, Role, and Actor OrchestrationThis lesson compares the main ways agent frameworks organize work: as graphs of steps, as teams of role-playing agents, or as independent actors passing messages. Each fits a different kind of problem.Learn · ~45 minutes
Lessons from AI Engineering from Scratch by Rohit Ghumare and contributors, MIT license. Notes for owners by Lozo. License
Next step
Rather have it built for you?
Reading is optional. Tell me what's stuck and I'll build it into the business you already run.