Skip to content

Generative AI Learning Track & Deep-Dive Guides ​

Welcome to the deep-dive engineering guides for the Master AI Architecture Program.

All modules in this track map 1:1 to the "1. What to Learn" specifications in the Curriculum Plan, structured for practical, high-yield learning of Generative AI concepts, mathematical mechanisms, prompt architectures, observability, and security guardrails.


Active Learning Modules ​

Phase 1: The Engine & Basic Prompting ​

Mastering the non-deterministic engine, token sampling controls, prompt contracts, and foundational security.

  1. 1.1 The GenAI Mindset: Autoregressive next-token mechanics, the "inherently spiky intelligence" paradox, and BPE tokenization blind spots.
  2. 1.2 Engine Parameters (The "Knobs"): Temperature (T), Top-P nucleus sampling, Stop Sequences, Max Length, and Frequency/Presence penalties.
  3. 1.3 Systematic Prompt Structure & ICL: The 6 canonical prompt components, Zero-Shot, Few-Shot & One-Shot activation steering, LangChain PromptTemplate, and Pydantic schemas.
  4. 1.4 Instrumentation & Tracing Hierarchy: LangFuse setup, The Run as the atomic unit, reading single-turn traces, and token economics (TTFT/ITL).
  5. 1.5 Compulsory Security & Threat Awareness: OWASP LLM01 Prompt Injection, XML delimiters, anti-extraction directives, canary tokens, and NIST AML Taxonomy with NFKC Unicode normalization.
  6. πŸ§ͺ Phase 1 Lab Guide: Lab requirements for The Hardened Classifier and Parameter Stability Report.
  7. 🧠 Phase 1 Active Recall Flashcards: 30 interactive flashcards across 5 decks.
  8. πŸ—ΊοΈ Phase 1 Architecture Mindmap: Cognitive visual architecture of Phase 1.

Phase 2: The Engineering of Reasoning ​

Mastering multi-step problem decomposition, state search trees, grounded tool-calling loops, trajectory debugging, and semantic alignment defenses.

  1. 2.1 Logical Decomposition: Chain-of-Thought (CoT), KV-cache as external working memory, fixed compute per token, and token compression via Chain of Draft (CoD).
  2. 2.2 Strategic Exploration: Tree of Thoughts (ToT) (Thought Decomposition, Generator G, Evaluator V, BFS/DFS with backtracking) and Self-Consistency (majority voting / LLM-as-a-judge).
  3. 2.3 Abstraction Techniques: Step-Back Prompting (high-level first principles), Meta-Prompting (The Meta-Refiner for ambiguous queries), and Analogical Prompting (self-generating exemplars).
  4. 2.4 Interactive Reasoning: The ReAct (Reason + Act) framework, closed-loop tool execution, compulsory stop sequences (stop=["Observation:"]), and observation truncation.
  5. 2.5 Trajectory Analysis: Reading multi-step reasoning traces in LangFuse, diagnosing reasoning deviations, incorrect tool selection, and Doom Loop recovery heuristics.
  6. 2.6 Compulsory Security: Alignment Auditing: Semantic Goal Hijacking defense, the AlignmentCheck gate (LlamaFirewall concept), and audit proof generation.
  7. πŸ§ͺ Phase 2 Lab Guide: Lab requirements for The Multi-Path Planner, The Efficiency Report, The Self-Correcting Research Assistant, The Meta-Refiner, and Alignment Audit Proof.
  8. 🧠 Phase 2 Active Recall Flashcards: 26 interactive flashcards across 6 decks.
  9. πŸ—ΊοΈ Phase 2 Architecture Mindmap: Cognitive visual architecture of Phase 2.

Phase 3: Modular Chaining & LCEL ​

Mastering functional composition, the Runnable Protocol, provider interoperability, structured schemas, operational modifiers, tracing, and middleware security.

  1. 3.1 The Universal Runnable Protocol: The universal interface (invoke, ainvoke, batch with concurrency, stream), and RunnableLambda.
  2. 3.2 LCEL & Composition Primitives: The pipe (|) operator, RunnableSequence linear pipelines, RunnableParallel concurrent fan-out/fan-in, and RunnablePassthrough.
  3. 3.3 Provider Interoperability: Standardized Content Blocks (.content_blocks), uniform AIMessage handling, and multi-provider model factories.
  4. 3.4 Structured Outputs & Schema Adherence: .with_structured_output(), native JSON schema mode, and immutable Pydantic v2 contracts.
  5. 3.5 Operational Modifiers (Retries & Fallbacks): .with_retry() with exponential backoff & randomized jitter, and .with_fallbacks() multi-cloud disaster recovery.
  6. 3.6 Pipeline Instrumentation & Tracing: LangFuse nested spans across sequences and parallel branches, latency profiling, and fallback trace capture.
  7. 3.7 Compulsory Security (Moderation & Validation): ContentModerationMiddleware input/output gates, Pydantic PII firewalls (emails, SSNs, API tokens), and unauthorized tool gating.
  8. πŸ§ͺ Phase 3 Lab Guide: Lab requirements for Extractor, Multi-Provider Pipeline, Batch Processor, Self-Healing Chain, and Secure Schema Validator.
  9. 🧠 Phase 3 Active Recall Flashcards: 21 interactive flashcards across 7 decks.
  10. πŸ—ΊοΈ Phase 3 Architecture Mindmap: Cognitive visual architecture of Phase 3.

Phase 4: Context Engineering & Agentic RAG ​

Mastering context optimization, the Three-Layer Memory Model, RAG evolution, advanced indexing, query transformations, RAG Triad evaluations, and zero-trust RAG security.

  1. 4.1 Context Paradigm & Memory Model: The 70% error root cause, and the Three-Layer Memory Model (Working, Episodic, and Semantic).
  2. 4.2 Evolution of RAG & Agentic Architectures: Naive RAG β†’ Advanced RAG (BM25 + Dense Hybrid, Cross-Encoder Re-Ranking) β†’ Agentic RAG β†’ GraphRAG β†’ Small-to-Big Retrieval.
  3. 4.3 Indexing Patterns & Context Window Optimization: The chunking dilemma, ParentDocumentRetriever, MultiVectorRetriever, "Lost in the Middle" attention trough, and hierarchical XML tagging.
  4. 4.4 Question Transformations: Rewrite-Retrieve-Read, Multi-Query with Reciprocal Rank Fusion (RRF), Step-Back queries, and HyDE (Hypothetical Document Embeddings).
  5. 4.5 The RAG Triad & Offline Automated Evaluations: Answer Faithfulness, Context Precision, Answer Relevance via Ragas/DeepEval, automated CI/CD Pytest gates, and timeout resilience.
  6. 4.6 Compulsory Security (Document Provenance & Vec2Text): Cryptographic Document Provenance (HMAC/RSA signatures) against Corpus Poisoning (BadRAG), and Gaussian noise perturbation against Vec2Text embedding inversion.
  7. πŸ§ͺ Phase 4 Lab Guide: Lab requirements for Memory-Enabled Travel Chatbot, Advanced RAG Dashboard (>90% Faithfulness), Hardened RAG Pipeline, and Quality Benchmarking Report.
  8. 🧠 Phase 4 Active Recall Flashcards: 18 interactive flashcards across 6 decks.
  9. πŸ—ΊοΈ Phase 4 Architecture Mindmap: Cognitive visual architecture of Phase 4.

Phase 5: Harness Engineering & Model Context Protocol (MCP) ​

Mastering the AI harness hypervisor, dynamic environment onboarding, the Model Context Protocol (MCP), aggressive self-verification, loop detection, and operational safety boundaries.

  1. 5.1 AI Harness & Environment Onboarding: The AI Harness concept (deterministic OS hypervisor for LLMs) and LocalContextMiddleware (toolchain discovery, directory topology, Git status).
  2. 5.2 Model Context Protocol (MCP) Architecture & Consumption: The MΓ—N problem solved via JSON-RPC 2.0, Tools, Resources, Prompts, FastMCP, and MultiServerMCPClient.
  3. 5.3 Build-Verify-Fix Loops & Aggressive Self-Verification: Eliminating vibe-based coding, automated Pytest execution gates in isolated subprocesses, and lossless traceback feedback.
  4. 5.4 Deterministic Middleware Hooks: Breaking Doom Loops via LoopDetectionMiddleware (action hashing), and blocking premature exits via PreCompletionChecklistMiddleware.
  5. 5.5 Trace-Driven Failure Analysis & The Evaluation Data Flywheel: The 4 failure taxonomies, multi-step trace profiling, and converting production LangFuse failure traces into automated Pytest regressions.
  6. 5.6 Compulsory Operational Safety: Rate Limiters & Circuit Breakers: AIRateLimiter enforcing RPM, TPM, and daily USD budget caps, tool error classification, and ToolCircuitBreaker states.
  7. πŸ§ͺ Phase 5 Lab Guide: Lab requirements for Onboarded Developer Agent, Loop-Detection Report, Verified Completion Trace, and Harness Benchmark Report.
  8. 🧠 Phase 5 Active Recall Flashcards: 13 interactive flashcards across 6 decks.
  9. πŸ—ΊοΈ Phase 5 Architecture Mindmap: Cognitive visual architecture of Phase 5.

Phase 6: Stateful Graphs, Persistence & Human-in-the-Loop ​

Mastering Directed Cyclic Graphs (DCGs) with LangGraph 1.0, shared state objects, channel reducers, durable checkpointers, HITL interrupts, time-travel debugging, and privileged action gates.

  1. 6.1 Stateful Orchestration & Graph Topologies: Transitioning from linear DAGs to Directed Cyclic Graphs (DCGs), LangGraph 1.0 primitives, Router Pattern, and Supervisor Pattern ("agent of agents").
  2. 6.2 Shared State Architecture, Reducers & Durable Checkpointers: Strongly-typed TypedDict state object ("the backpack"), add_messages reducer, and SqliteSaver multi-turn persistence across process restarts.
  3. 6.3 Human-in-the-Loop (HITL) Patterns & The Functional API: The interrupt() and Command(resume=...) primitives, and the LangGraph Functional API (@entrypoint and @task).
  4. 6.4 Thread Tracing, State Inspection & Time-Travel Debugging: The Thread (thread_id) as the unit of observation, checkpoint lineage inspection, rewinding state, and forking execution replays.
  5. 6.5 The Evaluation Lifecycle & Online Production Monitoring: Offline CI/CD unit test gates vs. online live production sampling (5-10%), asynchronous LLM-as-a-judge scoring, and LangFuse metric monitors.
  6. 6.6 Compulsory Security: Privileged Action Gates & Sandboxing: 3-Tier Privileged Action Gates (RBAC/ABAC, Contextual Validation, Human Authorization), immutable audit trail of reasoning, and path traversal sandboxing.
  7. πŸ§ͺ Phase 6 Lab Guide: Lab requirements for Stateful Essayist, Privileged Action Gatekeeper, Multi-Agent Research Pipeline, Durable Execution Proof, and Audit Trail Proof.
  8. 🧠 Phase 6 Active Recall Flashcards: 13 interactive flashcards across 6 decks.
  9. πŸ—ΊοΈ Phase 6 Architecture Mindmap: Cognitive visual architecture of Phase 6.

Upcoming Curriculum Phases ​

The remaining phases will be populated as you progress through the roadmap:

PhaseCore DomainArchitectural FocusPlan Reference
CapstoneNEXUS Deep ResearcherMulti-Agent Orchestration, Synthesis, Report GenerationCapstone Plan
Phase 8Production EvaluationEvals Flywheel, RAGAS, DeepEval, Synthetic Test GenerationEval Plan
Phase 9Advanced EcosystemsSmall Language Models (SLMs), Distillation, Local Inference (vLLM/Ollama)Ecosystem Plan
Phase 10DeepAgents Rapid TrackProduction Agent Frameworks, Real-World DeploymentsDeepAgents Plan

Master AI Architecture Training Program