Skip to content

GenAI course

Architecting Generative & Agentic AI Systems at Scale

45 core pages · 10 advanced chapters · six modules

Follow model representations, retrieval, bounded agents, multi-agent coordination, serving and enterprise operation through a complete sequential course.

Start with the course guide

  1. 01How the course works: audience, prerequisites, evolving application, exercises and completion evidenceChoose a starting point and explain the decisions connecting the six modules.

Module 1: Foundations and model primitives

Trace representations, model behavior and output contracts before choosing a platform.

  1. 02Tokenization: BPE, WordPiece and SentencePiece; trace a text-to-token exampleTrace BPE merges, distinguish WordPiece and SentencePiece, and reconcile a complete request budget.
  2. 03Embeddings: semantic distance, dimensions and what proximity cannot proveExplain a similarity score without treating it as proof that a passage answers the question.
  3. 04Attention: self/cross-attention, context and KV state; derive storage and compute separatelyTrace attention and account separately for score computation and persistent KV state.
  4. 05Model families: decoder-only, masked encoders and encoder-decoder decisionsDistinguish autoregressive decoders, masked encoders and encoder-decoder models, then choose an operating boundary.
  5. 06Multimodal foundations: diffusion, image inputs and audio/speech lifecyclesTrace visual and speech evidence and distinguish perception from image generation.
  6. 07Prompting: few-shot, chain-of-thought and least-to-most; distinguish proposal from verificationCompare few-shot, chain-of-thought and least-to-most prompting against an explicit task contract.
  7. 08Sampling: temperature, top-p, top-k and repetition penalties through a worked distributionCalculate temperature, top-k and top-p changes and distinguish repetition control from task validation.
  8. 09Structured output: JSON Schema, grammar constraints and semantic validationSeparate schema enforcement, grammar constraints and semantic acceptance.
  9. 10Worked representation-to-output exercise with intermediate values and explained failuresWork a complete representation-to-structured-decision example and locate the first failing boundary.

Module 2: Retrieval architecture

Follow permitted evidence from ingestion to a supported answer and defend the ten-million-document case.

  1. 11Trace the complete RAG pipeline; explain what naive and advanced changeExplain the complete RAG evidence path before optimizing any of its stages.
  2. 12Chunking: semantic, recursive and overlapping windows through one documentCompare semantic, recursive and overlapping chunk boundaries using the facts a question requires.
  3. 13Exact KNN, HNSW and IVF; derive a candidate and storage budgetCompare exact search, HNSW and IVF using a declared candidate budget.
  4. 14Hybrid BM25/dense retrieval, reciprocal rank fusion and cross-encoder rerankingDerive rank fusion and explain what a cross-encoder changes after candidate generation.
  5. 15Query expansion and HyDE; test which query changes preserve intent and authorityCompare multi-query expansion and HyDE while preserving retrieval scope.
  6. 16Context compression and evidence selection under a context budgetDistinguish context selection, extractive compression and generated summaries under a visible budget.
  7. 17Ingestion, permissions, revisions and deletion as one evidence lifecycleDesign ingestion, revision and deletion with explicit document identity and authorization.
  8. 18Design the hypothetical enterprise knowledge base for 10 million documentsDefend a complete retrieval service with workload-derived storage, freshness and access assumptions.
Advanced study in this module
  1. 46Embedding Adaptation: Relevance, Negatives and Index MigrationConstruct valid contrastive relationships and evaluate a compatible encoder/index migration using explicit retrieval and payload calculations.
  2. 47Graph Evidence: Relationships, Summaries and ProvenanceEvaluate graph relationships, entity resolution and community summaries as derived evidence with bounded traversal and source conditions.
  3. 48Disconnected AI: Artifacts, Snapshots and Update AuthorityDefine a complete disconnected capability with reviewed artifacts, explicit snapshot freshness, local capacity and an accepted recovery path.

Module 3: Agent architecture and execution

Give one agent bounded tools, recoverable state and correctable memory; work the SQL analyst case.

  1. 19When an agent is warranted; trace perceive → reason → act → evaluateTrace a bounded perceive-reason-act-evaluate loop and explain why a workflow may suffice.
  2. 20ReAct, Plan-and-Solve and Reflexion with shared tasks and explicit limitsCompare ReAct, Plan-and-Solve and Reflexion without treating self-generated text as independent verification.
  3. 21Tool schemas, OpenAPI extraction, runtime validation and action authorityDerive a tool contract from an OpenAPI operation and enforce parameters and action scope at runtime.
  4. 22Durable state, checkpoints and uncertain tool results across sessionsExplain checkpoints, versioned state and uncertain-action recovery across a long session.
  5. 23Scratchpads, episodic and semantic memory; provenance, correction and forgettingSeparate scratchpad, episodic records and semantic memory, with provenance and forgetting rules.
  6. 24Retry, self-correction and stopping budgets with independent checksDerive retry and stopping limits, and distinguish a new observation from a repeated attempt.
  7. 25Bounded SQL analyst: query corrections, anomaly interpretation and visualizationDesign a SQL analyst with tool selection, bounded correction and checked visualization.

Module 4: Multi-agent orchestration

Choose an owner for each handoff and carry a software change through versioned review.

  1. 26Manager-worker, sequential, peer and consensus patterns; compare with one agentCompare hierarchy, sequential pipelines and peer coordination against a one-agent baseline.
  2. 27Shared state and message passing; Kafka/Redis Streams, ownership and cycle limitsCompare shared state and message passing using Kafka and Redis Streams as concrete transports.
  3. 28Human approval bound to a specific proposed action and versionBind human approval to immutable proposal identity, scope and expiry.
  4. 29Software-development agents: PM → architect → coder → QA, rejection and recoveryDesign a software-development agent workflow with immutable artifacts and rejection paths.

Module 5: Serving, inference and adaptation

Derive request, cache and capacity budgets; separate changing a model from serving it.

  1. 30Prefill, decode, TTFT and ITL through a request lifetime and workload budgetExplain prefill, decode, TTFT and ITL using workload-specific resource assumptions.
  2. 31Continuous batching, PagedAttention, vLLM and TensorRT-LLM architectureConnect continuous batching and PagedAttention to vLLM and TensorRT-LLM serving decisions.
  3. 32FP16/INT8/INT4, AWQ and GPTQ: format, execution and task-quality decisionsCompare FP16, INT8 and INT4 with AWQ/GPTQ mechanisms and explicit quality checks.
  4. 33Speculative decoding: draft, verify and account for rejected workDistinguish speculative decoding from distillation and calculate when verification overhead can erase a gain.
  5. 34LoRA/QLoRA serving and prefix/KV reuse; separate adapter identity from cache identitySeparate learning an adapter, serving LoRA/QLoRA-derived artifacts and reusing prefix/KV state.
  6. 35Exact and semantic response caching: eligibility, freshness and invalidationDistinguish exact response caching, semantic caching and prefix caching with authority and freshness rules.
  7. 36Replicas, model partitions, routing, admission and workload-derived scalingExplain replica and partition choices before deriving an autoscaling policy.
  8. 37High-throughput gateway: tiered caches, balancing, failure and GPU autoscalingDesign a high-throughput gateway with tiered caches, load balancing and workload-derived GPU scaling.
Advanced study in this module
  1. 49Prompt, RAG, or Fine-Tune? Choosing the Failure to ChangeCompare prompting, retrieval and parameter adaptation; derive a low-rank update and inspect data suitability.
  2. 50Post-Training: RLHF, DPO, and Reasoning ModelsInterpret a preference objective without confusing label fit, truth, authority or release readiness.
  3. 51Training Data: Lineage, Splits and Synthetic SupervisionDesign traceable demonstrations and independent evaluation partitions without confusing generated volume with verified supervision.
  4. 52Distributed Training: FSDP, Memory Lifetimes and CommunicationAccount for replicated and sharded training state, transient peaks and collective timing without treating payload floors as capacity guarantees.

Module 6: Safety, evaluation and enterprise operation

Use evaluation, enforced boundaries, traces and economics to defend the complete platform.

  1. 38Evaluation sets: relevance, groundedness, answer quality and task completionSeparate context relevance, groundedness, answer relevance and end-to-end success.
  2. 39Judge calibration, benchmark scope, regression and drift decisionsExplain judge calibration, benchmark scope and regression decisions under uncertainty.
  3. 40Injection, jailbreaks, moderation, PII and enforced data/action boundariesSeparate injection defenses, moderation, PII handling and deterministic validation.
  4. 41Code isolation: compare gVisor, WebAssembly and Firecracker boundariesCompare gVisor, WebAssembly and Firecracker isolation while keeping credentials and network policy outside model control.
  5. 42Trace recursive workflows with OpenTelemetry; LangSmith as a concrete comparisonTrace recursive workflows with OpenTelemetry and compare a LangSmith-style view without depending on one trace vendor.
  6. 43Token burn, tool latency, failed attempts and accepted-workflow economicsAccount for token burn, tool latency, retries and cost per accepted workflow.
  7. 44Governance, provenance and release/audit evidenceConnect governance obligations to versioned artifacts and observable control evidence.
  8. 45Complete enterprise agentic platform: architecture, failures and release reviewDefend an integrated enterprise agentic platform, including failure paths and evidence required to release.
Advanced study in this module
  1. 53Model Harm: Bias, Toxicity and Contextual EvaluationDerive task-specific error rates and inspect consequences, uncertain labels and group denominators before changing a filter policy.
  2. 54Benchmarks and Controlled Releases: Scope, Outcomes and UncertaintyDistinguish benchmark, private-task, shadow and randomized evidence while computing a scoped difference and its uncertainty.
  3. 55Security Evaluation: Threat Models, Trials and Observable BoundariesDesign scoped adversarial and benign cases with authoritative outcome evidence and distinguish cases, trials and inconclusive results.

Finish with a defensible platform

Trace a permitted question from model input through retrieved evidence, bounded actions and serving capacity. Use the final capstone to explain failure recovery, acceptance evidence and what would change your design.

Choose a guided path

Start with GenAI Foundations or its placement check. Each path includes the course prerequisites for its selected chapters. Paths share chapters, so completed reading counts wherever it belongs.

0 of 55 chapters complete; 0 of 4 assessments reviewed

Progress is saved in this browser when storage is available. It does not sync across devices.

Application engineer24 chapters

Choose a model boundary, define supported outputs and evaluate an application release.

~9 h 4 min including chapter practice. Estimates sum the chapter estimates; actual study time varies.

0 of 24 chapters complete

Start this path · Attempt the design assessment

  1. Lesson 01 Tokens, BPE, and Context Budgets: Why the Upload Passed and the Request Failed
  2. Lesson 02 Attention and the KV Cache: Why Long Chats Run Out of GPU Memory
  3. Lesson 03 Prompts as Contracts: Writing Instructions You Can Test
  4. Lesson 04 Structured Outputs: Making a Model’s Answer Safe to Parse
  5. Lesson 05 Embeddings and Similarity: Why “Close” Is Not the Same as “Right”
  6. Lesson 06 Retrieval-Augmented Generation: Getting the Right Paragraph to the Model
  7. Lesson 07 Chunking Documents: How Splits and Overlap Hide or Reveal the Answer
  8. Lesson 08 Vector Indexes (HNSW and Friends): Exact vs Approximate Search
  9. Lesson 09 Designing a Retrieval Service from Source to Answer
  10. Lesson 10 Calling Model APIs: Timeouts, Retries, and Budgets
  11. Lesson 11 Serving Open Models: KV Cache Growth, Batching, and Admission Limits
  12. Lesson 12 Evaluation Sets: Building the Test Before You Tune
  13. Lesson 13 LLM Judges: Calibration, Bias, and Release Gates
  14. Lesson 14 Tool Calling and MCP: Letting a Model Act Without Giving It the Keys
  15. Lesson 15 Durable Agents: State Machines, Budgets, and Uncertain Actions
  16. Lesson 16 Prompt, RAG, or Fine-Tune? Choosing the Failure to Change
  17. Lesson 17 Distillation and Small Models: Preserve the Task, Measure the Trade
  18. Lesson 18 Capstone: Design Review of Northwind’s Policy Assistant
  19. Lesson 19 Case: AI-Assisted Support Triage
  20. Lesson 20 Case: Document Pipelines and Visual Evidence
  21. Lesson 23 Post-Training: RLHF, DPO, and Reasoning Models
  22. Lesson 34 Model Boundaries: Weights, Services and Multimodal Evidence
  23. Lesson 48 Model Harm: Bias, Toxicity and Contextual Evaluation
  24. Lesson 49 Benchmarks and Controlled Releases: Scope, Outcomes and Uncertainty
Agentic systems engineer28 chapters

Design bounded actions, recovery, approval, memory and coordination.

~10 h 33 min including chapter practice. Estimates sum the chapter estimates; actual study time varies.

0 of 28 chapters complete

Start this path · Attempt the design assessment

  1. Lesson 01 Tokens, BPE, and Context Budgets: Why the Upload Passed and the Request Failed
  2. Lesson 02 Attention and the KV Cache: Why Long Chats Run Out of GPU Memory
  3. Lesson 03 Prompts as Contracts: Writing Instructions You Can Test
  4. Lesson 04 Structured Outputs: Making a Model’s Answer Safe to Parse
  5. Lesson 05 Embeddings and Similarity: Why “Close” Is Not the Same as “Right”
  6. Lesson 06 Retrieval-Augmented Generation: Getting the Right Paragraph to the Model
  7. Lesson 07 Chunking Documents: How Splits and Overlap Hide or Reveal the Answer
  8. Lesson 08 Vector Indexes (HNSW and Friends): Exact vs Approximate Search
  9. Lesson 09 Designing a Retrieval Service from Source to Answer
  10. Lesson 10 Calling Model APIs: Timeouts, Retries, and Budgets
  11. Lesson 11 Serving Open Models: KV Cache Growth, Batching, and Admission Limits
  12. Lesson 12 Evaluation Sets: Building the Test Before You Tune
  13. Lesson 13 LLM Judges: Calibration, Bias, and Release Gates
  14. Lesson 14 Tool Calling and MCP: Letting a Model Act Without Giving It the Keys
  15. Lesson 15 Durable Agents: State Machines, Budgets, and Uncertain Actions
  16. Lesson 16 Prompt, RAG, or Fine-Tune? Choosing the Failure to Change
  17. Lesson 17 Distillation and Small Models: Preserve the Task, Measure the Trade
  18. Lesson 18 Capstone: Design Review of Northwind’s Policy Assistant
  19. Lesson 21 Case: A Document-Maintenance Assistant
  20. Lesson 25 State Machines and Checkpoints: Recovering an Agent Without Repeating Its Effects
  21. Lesson 26 Planning and Workflows: Choosing a Route Without Delegating Authority
  22. Lesson 27 Human Approval: Binding a Decision to the Action That Will Run
  23. Lesson 28 Agent Memory: Keeping Useful Context Without Preserving Mistakes
  24. Lesson 29 Tool Selection: Better Descriptions Without Accidental Permission
  25. Lesson 30 Agent Budgets: Bounding Retries, Time and Context Across a Task
  26. Lesson 31 Multi-Agent Coordination: Separate Responsibilities, Explicit Ownership
  27. Lesson 32 Asynchronous Agents: Events, Cancellation and Uncertain Completion
  28. Lesson 33 Sandboxed Agent Code: Constrain Execution and Validate the Result
Model adaptation and inference28 chapters

Follow demonstrations through training, representation changes and a serving decision.

~10 h 29 min including chapter practice. Estimates sum the chapter estimates; actual study time varies.

0 of 28 chapters complete

Start this path · Attempt the design assessment

  1. Lesson 01 Tokens, BPE, and Context Budgets: Why the Upload Passed and the Request Failed
  2. Lesson 02 Attention and the KV Cache: Why Long Chats Run Out of GPU Memory
  3. Lesson 03 Prompts as Contracts: Writing Instructions You Can Test
  4. Lesson 04 Structured Outputs: Making a Model’s Answer Safe to Parse
  5. Lesson 05 Embeddings and Similarity: Why “Close” Is Not the Same as “Right”
  6. Lesson 06 Retrieval-Augmented Generation: Getting the Right Paragraph to the Model
  7. Lesson 07 Chunking Documents: How Splits and Overlap Hide or Reveal the Answer
  8. Lesson 08 Vector Indexes (HNSW and Friends): Exact vs Approximate Search
  9. Lesson 09 Designing a Retrieval Service from Source to Answer
  10. Lesson 10 Calling Model APIs: Timeouts, Retries, and Budgets
  11. Lesson 11 Serving Open Models: KV Cache Growth, Batching, and Admission Limits
  12. Lesson 12 Evaluation Sets: Building the Test Before You Tune
  13. Lesson 13 LLM Judges: Calibration, Bias, and Release Gates
  14. Lesson 14 Tool Calling and MCP: Letting a Model Act Without Giving It the Keys
  15. Lesson 15 Durable Agents: State Machines, Budgets, and Uncertain Actions
  16. Lesson 16 Prompt, RAG, or Fine-Tune? Choosing the Failure to Change
  17. Lesson 17 Distillation and Small Models: Preserve the Task, Measure the Trade
  18. Lesson 23 Post-Training: RLHF, DPO, and Reasoning Models
  19. Lesson 29 Tool Selection: Better Descriptions Without Accidental Permission
  20. Lesson 34 Model Boundaries: Weights, Services and Multimodal Evidence
  21. Lesson 35 Training Data: Lineage, Splits and Synthetic Supervision
  22. Lesson 36 Supervised Adaptation: LoRA, Tool Learning and Adapter Composition
  23. Lesson 37 Embedding Adaptation: Relevance, Negatives and Index Migration
  24. Lesson 38 Distributed Training: FSDP, Memory Lifetimes and Communication
  25. Lesson 39 Quantization: Formats, Execution and Task Quality
  26. Lesson 40 Distributed Serving: Replicas, Partitions and Request Lifetimes
  27. Lesson 48 Model Harm: Bias, Toxicity and Contextual Evaluation
  28. Lesson 49 Benchmarks and Controlled Releases: Scope, Outcomes and Uncertainty
AI platform architect40 chapters

Connect capacity, knowledge, security, operations and accountable release evidence.

~14 h 58 min including chapter practice. Estimates sum the chapter estimates; actual study time varies.

0 of 40 chapters complete

Start this path · Attempt the design assessment

  1. Lesson 01 Tokens, BPE, and Context Budgets: Why the Upload Passed and the Request Failed
  2. Lesson 02 Attention and the KV Cache: Why Long Chats Run Out of GPU Memory
  3. Lesson 03 Prompts as Contracts: Writing Instructions You Can Test
  4. Lesson 04 Structured Outputs: Making a Model’s Answer Safe to Parse
  5. Lesson 05 Embeddings and Similarity: Why “Close” Is Not the Same as “Right”
  6. Lesson 06 Retrieval-Augmented Generation: Getting the Right Paragraph to the Model
  7. Lesson 07 Chunking Documents: How Splits and Overlap Hide or Reveal the Answer
  8. Lesson 08 Vector Indexes (HNSW and Friends): Exact vs Approximate Search
  9. Lesson 09 Designing a Retrieval Service from Source to Answer
  10. Lesson 10 Calling Model APIs: Timeouts, Retries, and Budgets
  11. Lesson 11 Serving Open Models: KV Cache Growth, Batching, and Admission Limits
  12. Lesson 12 Evaluation Sets: Building the Test Before You Tune
  13. Lesson 13 LLM Judges: Calibration, Bias, and Release Gates
  14. Lesson 14 Tool Calling and MCP: Letting a Model Act Without Giving It the Keys
  15. Lesson 15 Durable Agents: State Machines, Budgets, and Uncertain Actions
  16. Lesson 16 Prompt, RAG, or Fine-Tune? Choosing the Failure to Change
  17. Lesson 20 Case: Document Pipelines and Visual Evidence
  18. Lesson 22 Hybrid Retrieval: Fusing BM25 and Vectors, Then Reranking
  19. Lesson 23 Post-Training: RLHF, DPO, and Reasoning Models
  20. Lesson 24 Long-Context Systems: When Bigger Windows Help and When They Don’t
  21. Lesson 25 State Machines and Checkpoints: Recovering an Agent Without Repeating Its Effects
  22. Lesson 27 Human Approval: Binding a Decision to the Action That Will Run
  23. Lesson 29 Tool Selection: Better Descriptions Without Accidental Permission
  24. Lesson 33 Sandboxed Agent Code: Constrain Execution and Validate the Result
  25. Lesson 34 Model Boundaries: Weights, Services and Multimodal Evidence
  26. Lesson 39 Quantization: Formats, Execution and Task Quality
  27. Lesson 40 Distributed Serving: Replicas, Partitions and Request Lifetimes
  28. Lesson 41 Routing and Admission: Eligible Models, Work Budgets and Queues
  29. Lesson 42 AI Gateways: Provider Contracts, Fallbacks and Regional Continuity
  30. Lesson 43 Semantic Caching: Equivalence, Authority and Freshness
  31. Lesson 44 Knowledge Ingestion: Revisions, Hierarchy and Deletion
  32. Lesson 45 Authorized Retrieval: Tenant Scope, Filters and Query Transformation
  33. Lesson 46 Graph Evidence: Relationships, Summaries and Provenance
  34. Lesson 47 Disconnected AI: Artifacts, Snapshots and Update Authority
  35. Lesson 48 Model Harm: Bias, Toxicity and Contextual Evaluation
  36. Lesson 49 Benchmarks and Controlled Releases: Scope, Outcomes and Uncertainty
  37. Lesson 50 Observability, Drift and Accepted-Task Economics
  38. Lesson 51 Runtime Policy: Injection, Sensitive Data and Enforced Authority
  39. Lesson 52 Security Evaluation: Threat Models, Trials and Observable Boundaries
  40. Lesson 53 Governance, Provenance and Model Audit

Connect the ideas in a design assessment

Write a decision before opening the explanation. These are hypothetical design exercises with self-reported progress, not graded examinations or certification.

Design a supported multimodal assistant

Hypothetical scenario. Northwind wants supplier recommendations from policy documents and voice notes. The assistant drafts a recommendation but cannot place an order. A missing spoken identifier must remain an unresolved evidence issue.

  1. Define accepted, clarified and refused outcomes, including source support and the action boundary.
  2. Choose text, visual and audio transformations while preserving the original evidence identity.
  3. Fit the complete request allowance and explain what changes when another evidence field is added.

Choose an 8,000-token allowance: 800 instruction + 200 question + 4,200 evidence + 1,000 history + 1,800 output = 8,000. Adding 200 tokens of source metadata gives 8,200, exceeding the allowance by 200.

Compare your design with the explanation

Keep original source regions and audio intervals so a reviewer can investigate extraction or transcription errors. A model-delivery choice does not establish that the resulting recommendation is supported.

Reduce or restructure 200 tokens of optional context, or choose a different permitted allowance. Do not silently drop required authority, evidence conditions or the output bound. Recheck whether the reduced evidence still supports the recommendation.

Compare the complete application on independent cases, including missing identifiers and unsupported recommendations. The executor must retain the no-order boundary even if a model proposes an order.

Revisit: Model Boundaries: Weights, Services and Multimodal Evidence; Case: Document Pipelines and Visual Evidence; Structured Outputs: Making a Model’s Answer Safe to Parse; Evaluation Sets: Building the Test Before You Tune; Case: AI-Assisted Support Triage.

Recover an approved action without duplicating it

Hypothetical scenario. Northwind approves a specific document revision. The document changes before execution, and a later write attempt times out without a recorded result. An asynchronous completion then arrives after cancellation.

  1. Bind approval to the proposal and current resource revision.
  2. Distinguish a proposed, submitted, confirmed and unresolved effect.
  3. Decide how a late event affects task state and account for nested retries.

Choose three branches with two application attempts and two transport attempts each: 3 × 2 × 2 = 12 possible attempts. Reserve four reconciliation operations: 12 + 4 = 16. From a 40-operation task allowance, 40 − 16 = 24 remain; this accounting does not authorize any of them.

Compare your design with the explanation

The changed revision invalidates an approval that covered only the earlier proposal. Obtain the required fresh decision rather than treating a saved approval as permanent authority.

Reconcile the original operation using its identity and the target service contract before issuing another effect. A checkpoint of intent and a timeout do not establish that the write was absent.

Record the late completion as evidence without automatically reviving a canceled workflow. Apply the current state-transition and compensation policy. Keep one task-level retry budget instead of letting layers multiply work invisibly.

Revisit: State Machines and Checkpoints: Recovering an Agent Without Repeating Its Effects; Human Approval: Binding a Decision to the Action That Will Run; Agent Budgets: Bounding Retries, Time and Context Across a Task; Asynchronous Agents: Events, Cancellation and Uncertain Completion; Case: A Document-Maintenance Assistant.

Choose an adaptation release from paired failures

Hypothetical scenario. Northwind trains an adapter on reviewed demonstrations. Overall accepted outcomes rise, but rare escalation cases regress. The same release also changes the embedding encoder while retaining the previous passage index.

  1. Decide whether the failure belongs to data, objective, representation compatibility or runtime authority.
  2. Compare the rare-category denominator with the overall result.
  3. Account for a selected low-rank update without treating its size as proof of quality.

Choose 1,000 cases: baseline accepted 800/1,000 = 80%; candidate 850/1,000 = 85%. In 20 rare cases, baseline accepts 18/20 = 90% and candidate 12/20 = 60%. A selected 1,024 × 1,024 matrix has 1,048,576 entries; rank-four factors have 2 × 4 × 1,024 = 8,192, or 0.78125% of that matrix.

Compare your design with the explanation

Inspect paired rare-case outcomes: the accepted count falls by six even though the overall count rises. Keep those task consequences visible, repair supervision or the intervention where evidence supports it, and preserve an independent final comparison.

Evaluate a compatible query/document representation and build a versioned index when needed. Equal vector dimensions do not justify mixing arbitrary encoder versions.

The parameter calculation describes one adapted matrix, not complete training memory or application competence. Validate the effective base/adapter/runtime combination and retain authorization outside learned tool proposals.

Revisit: Training Data: Lineage, Splits and Synthetic Supervision; Supervised Adaptation: LoRA, Tool Learning and Adapter Composition; Embedding Adaptation: Relevance, Negatives and Index Migration; Distributed Training: FSDP, Memory Lifetimes and Communication; Distillation and Small Models: Preserve the Task, Measure the Trade; Benchmarks and Controlled Releases: Scope, Outcomes and Uncertainty.

Make a bounded continuity and governance decision

Hypothetical scenario. Northwind loses its primary model-serving group. A secondary is healthy but already busy. The fallback exceeds the remaining deadline, and a semantic cache candidate depends on a withdrawn policy. Approval evidence names an older application release.

  1. Compute spare capacity and the remaining deadline before dispatching work.
  2. Decide whether cached or disconnected evidence satisfies authority and freshness.
  3. Name the effective release and evidence that must be refreshed before restoring the capability.

Choose secondary capacity 130 requests/s with 90 already in use: 130 − 90 = 40 spare. Absorbing 100 requests/s leaves 100 − 40 = 60 requests/s without capacity. A 5,000 ms deadline minus 1,000 queue, 800 evidence and 2,200 primary work leaves 1,000 ms; a 1,300 ms fallback does not fit.

Compare your design with the explanation

Admit only work the complete ready serving group can accept within the task contract; reject, defer or use an explicit degraded outcome for the remaining demand. A healthy region does not create spare capacity.

Reject the known-stale cache candidate and preserve source and caller checks. A snapshot-based service can answer only within its declared accepted evidence and freshness scope.

Bind the decision to model, prompt, evidence, tools and policy identities. Refresh the affected evaluations and authority evidence, inspect attempt and accepted-task economics, and record unresolved conditions rather than issuing a blanket compliance assurance.

Revisit: AI Gateways: Provider Contracts, Fallbacks and Regional Continuity; Distributed Serving: Replicas, Partitions and Request Lifetimes; Routing and Admission: Eligible Models, Work Budgets and Queues; Semantic Caching: Equivalence, Authority and Freshness; Disconnected AI: Artifacts, Snapshots and Update Authority; Governance, Provenance and Model Audit.

Keep the terminology connected

Use the GenAI glossary for foundational terms. These advanced terms link to the chapter that develops the distinction.

Advanced AI engineering terms
TermMeaning in this courseRead
Model delivery boundaryThe controls and responsibilities exposed by weights, a hosted service or the complete application.Lesson 34
Representation compatibilityThe relationship required for query and document vectors to be meaningful under one scoring pipeline.Lesson 37
Training objectiveThe selected signal optimization rewards; it differs from application acceptance.Lesson 36
Low-rank updateA parameter change expressed through smaller factors with a chosen rank.Lesson 36
CheckpointSaved execution state that supports recovery but does not confirm a remote effect.Lesson 25
Approval identityThe proposal and resource conditions that an approval actually covers.Lesson 27
Agent memoryRetained information with provenance, scope and correction rules rather than permanent truth.Lesson 28
Capability scopeThe operations and resources the current principal is permitted to use.Lesson 29
Serving groupThe collaborating workers needed to execute one complete model-serving path.Lesson 40
Work reservationA bounded allowance held before a task consumes the corresponding resource.Lesson 41
Semantic cacheResponse reuse proposed by similarity and accepted only after task, authority and freshness checks.Lesson 43
Source revisionA particular accepted source state distinct from its derived parsing, chunks and embeddings.Lesson 44
Graph evidenceRelationships and summaries whose source, time and access dependencies must remain inspectable.Lesson 46
Snapshot ageElapsed time since the accepted evidence cutoff, evaluated against the task freshness policy.Lesson 47
False positiveAn action applied to a case the adopted rubric labels negative; the consequence depends on the task.Lesson 48
Shadow evaluationA bounded candidate path whose outputs are inspected without assigning their customer-facing effects.Lesson 49
Accepted-task economicsAccounted cost divided by outcomes that satisfy a defined task contract.Lesson 50
Prompt injectionUntrusted input influencing model behavior across an intended instruction or data boundary.Lesson 51
Threat modelAn explicit account of assets, actors, influence paths and permitted consequences.Lesson 52
Feature attributionA model-score explanation under a chosen method and background, not an automatic causal claim.Lesson 53
Explore the subject reference map

A broader AI engineering curriculum

The released course is the starting point. These 7 subject areas connect it to deeper study. Every module links to reviewed chapters, including shared explanations where topics overlap.

Choose a subject to see its modules. Existing chapters keep their place in the core sequence, and can also support several learning goals.

Model foundations and intelligent applications

Explain model behavior and define an application contract before choosing an architecture.

Multimodal application evidence

Read now

Knowledge, retrieval and memory

Choose evidence and memory mechanisms from freshness, relevance and authorization needs.

Agentic systems and orchestration

Design bounded actions, explicit state and coordination under uncertain outcomes.

Learning and model adaptation

Select a learning intervention and evaluate its effects on the intended task.

Inference and AI infrastructure

Reason about memory, concurrency, parallelism and admission in a serving system.

Admission, priority and model routing

Read now

Evaluation and production operation

Measure task success, inspect failures and make defensible release decisions.

Benchmarks and controlled releases

Read now

Tracing, drift and economics

Read now

Security, governance and accountability

Separate probabilistic model behavior from enforceable security and governance controls.

Policy, provenance and auditability

Read now

Complete the core checkpoints before attempting an advanced subject. Evaluation, authority and cost remain part of each design decision; their dedicated modules provide deeper treatment.

Concept prerequisite reference

Requests, context, and output contracts

  • Explain the difference between a prompt, a context window, and a response.
  • Choose an output contract and describe how invalid output is handled.

Model mechanics and inference

  • Trace how token representations become attention outputs.
  • Distinguish model weights, attention work, and cached state when reasoning about memory.

Evaluation and experimental reasoning

  • Define a task-specific success criterion and a baseline.
  • Explain what a benchmark result does and does not establish.

Permissions, threats, and data boundaries

  • Trace which identity authorizes each retrieval and tool action.
  • Identify a threat, a control, and the residual risk that remains.

Retrieval and knowledge systems

  • Trace ingestion, retrieval, ranking, and answer generation separately.
  • Diagnose whether missing evidence or answer generation caused a failure.

Tools, state, and bounded autonomy

  • Decide whether a fixed workflow or an agent loop fits a task.
  • Define a stopping condition, approval boundary, and recovery strategy.

Reliable operation and cost

  • Build a request budget that includes latency, retries, and cost.
  • Explain how an overloaded or unavailable dependency changes system behavior.

Adaptation, training, and research

  • Compare retrieval, prompting, and parameter adaptation for a stated constraint.
  • Identify the baseline, data assumptions, and limits of a training experiment.