LLM and RAG engineering
Build the conceptual and executable foundations of language models, training, retrieval, evaluation, access control and grounded systems.
20 units · Web, Plus, Pro · 20 programming subjects + 2 security tracks
Branches show this unit’s authored theory, coding and assessment work.
Unit 1 / 20
Turn text into token IDs
Map text to a fixed vocabulary and preserve unknown tokens explicitly.
0 prerequisite skills · Reading, guided completion and independent success remain separate evidence.
The course, in order
Open a unit in the map to inspect its activities. Reading, guided completion, independent work and review remain distinct evidence.
- Turn text into token IDs
Map text to a fixed vocabulary and preserve unknown tokens explicitly.
Open this unit - Train a tiny next-token model
Learn adjacent-token counts from a corpus without crossing document boundaries.
Open this unit - Normalize logits safely
Use stable softmax and temperature without confusing confidence with correctness.
Open this unit - Measure next-token prediction loss
Compute mean negative log-likelihood only over assessed target positions.
Open this unit - Update model parameters from error
Perform one gradient step and check whether a small training objective improves.
Open this unit - Combine context with attention weights
Build an attention-weighted value vector and enforce causal visibility.
Open this unit - Separate training from evaluation
Keep related documents in one split and reject contaminated evaluations.
Open this unit - Prepare supervised fine-tuning examples
Select valid instruction-response pairs and build an explicit completion-loss mask.
Open this unit - Chunk documents with source provenance
Create bounded overlapping chunks while keeping source identity and offsets.
Open this unit - Compare embeddings correctly
Use cosine similarity without confusing vector length with relevance.
Open this unit - Rank retrieval candidates with stable ties
Choose top-k unique retrieval results and measure whether relevant sources were found.
Open this unit - Filter evidence before it reaches the model
Prevent cross-tenant retrieval and preserve source revision boundaries.
Open this unit - Fit evidence into a bounded context
Reserve output space and select complete chunks within a token budget.
Open this unit - Check answer provenance and abstention
Validate citation membership and abstain when supplied evidence is insufficient.
Open this unit - Assemble a small AI and retrieval pipeline
Connect learned next-token counts to inference, and authorized retrieval to a grounded model request.
Open this unit - Control optimization across microbatches
Combine gradients by example count and schedule learning rates with explicit warmup and decay boundaries.
Open this unit - Build causal transformer mechanics
Construct causal visibility and normalize attention only over tokens available at a query position.
Open this unit - Evaluate models across meaningful slices
Measure token prediction quality and expose subgroup failures that a single aggregate can hide.
Open this unit - Evaluate retrieval before generation
Measure coverage and first-hit rank on frozen relevance judgments before blaming the generator.
Open this unit - Release and monitor an AI system
Compute a release decision from supplied quality, latency and safety metrics, then measure total-variation distance between supplied distributions. Use these bounded checks as preparation for deployment monitoring, not proof that monitoring ran.
Open this unit
