AI Engineering from Scratch Phase 11 Introduction
AI Engineering from Scratch
0% Completed

Phase 11: Llm Engineering

Phase 11: LLM Engineering

> Put LLMs to work in production applications.

Start this phase on GitHub

Prerequisites: Phase 10 Lessons 01 through 05, or equivalent knowledge of
tokenization, data pipelines, pretraining, and scaling.

First lesson: Prompt Engineering

Run this command from the repository root:

python3 phases/11-llm-engineering/01-prompt-engineering/code/prompt_engineering.py

Keep the command, exit code, generated prompt metadata, test results, and one
prompt change with the output difference it caused. The demo uses simulated
model responses and needs no API key.

Next action: Explain which prompt variable changed behavior and why, then
continue to Few-Shot, Chain-of-Thought and Tree-of-Thought.

Browse the full Phase 11 lesson list or the
cross-phase roadmap.

Lessons in this phase

  • Prompt Engineering: Techniques & Patterns
  • Few-Shot, Chain-of-Thought, Tree-of-Thought
  • Structured Outputs: JSON, Schema Validation, Constrained Decoding
  • Embeddings & Vector Representations
  • Context Engineering: Windows, Budgets, Memory, and Retrieval
  • RAG (Retrieval-Augmented Generation)
  • Advanced RAG (Chunking, Reranking, Hybrid Search)
  • Fine-Tuning with LoRA & QLoRA
  • Function Calling & Tool Use
  • Evaluation & Testing LLM Applications
  • Caching, Rate Limiting & Cost Optimization
  • Guardrails, Safety & Content Filtering
  • Building a Production LLM Application
  • Model Context Protocol (MCP)
  • Prompt Caching and Context Caching
  • Agent State Machines — Graphs, Nodes, Checkpoints
  • Agent Framework Tradeoffs — Graph, Role, and Actor Orchestration