Appearance
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 The GenAI Mindset: Autoregressive next-token mechanics, the "inherently spiky intelligence" paradox, and BPE tokenization blind spots.
- 1.2 Engine Parameters (The "Knobs"): Temperature (
), Top- nucleus sampling, Stop Sequences, Max Length, and Frequency/Presence penalties. - 1.3 Systematic Prompt Structure & ICL: The 6 canonical prompt components, Zero-Shot, Few-Shot & One-Shot activation steering, LangChain
PromptTemplate, and Pydantic schemas. - 1.4 Instrumentation & Tracing Hierarchy: LangFuse setup, The Run as the atomic unit, reading single-turn traces, and token economics (TTFT/ITL).
- 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.
- π§ͺ Phase 1 Lab Guide: Lab requirements for The Hardened Classifier and Parameter Stability Report.
- π§ Phase 1 Active Recall Flashcards: 30 interactive flashcards across 5 decks.
- πΊοΈ 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.
- 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 Strategic Exploration: Tree of Thoughts (ToT) (Thought Decomposition, Generator
, Evaluator , BFS/DFS with backtracking) and Self-Consistency (majority voting / LLM-as-a-judge). - 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).
- 2.4 Interactive Reasoning: The ReAct (Reason + Act) framework, closed-loop tool execution, compulsory stop sequences (
stop=["Observation:"]), and observation truncation. - 2.5 Trajectory Analysis: Reading multi-step reasoning traces in LangFuse, diagnosing reasoning deviations, incorrect tool selection, and Doom Loop recovery heuristics.
- 2.6 Compulsory Security: Alignment Auditing: Semantic Goal Hijacking defense, the AlignmentCheck gate (LlamaFirewall concept), and audit proof generation.
- π§ͺ 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.
- π§ Phase 2 Active Recall Flashcards: 26 interactive flashcards across 6 decks.
- πΊοΈ 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.
- 3.1 The Universal Runnable Protocol: The universal interface (
invoke,ainvoke,batchwith concurrency,stream), andRunnableLambda. - 3.2 LCEL & Composition Primitives: The pipe (
|) operator,RunnableSequencelinear pipelines,RunnableParallelconcurrent fan-out/fan-in, andRunnablePassthrough. - 3.3 Provider Interoperability: Standardized Content Blocks (
.content_blocks), uniformAIMessagehandling, and multi-provider model factories. - 3.4 Structured Outputs & Schema Adherence:
.with_structured_output(), native JSON schema mode, and immutable Pydantic v2 contracts. - 3.5 Operational Modifiers (Retries & Fallbacks):
.with_retry()with exponential backoff & randomized jitter, and.with_fallbacks()multi-cloud disaster recovery. - 3.6 Pipeline Instrumentation & Tracing: LangFuse nested spans across sequences and parallel branches, latency profiling, and fallback trace capture.
- 3.7 Compulsory Security (Moderation & Validation):
ContentModerationMiddlewareinput/output gates, Pydantic PII firewalls (emails, SSNs, API tokens), and unauthorized tool gating. - π§ͺ Phase 3 Lab Guide: Lab requirements for Extractor, Multi-Provider Pipeline, Batch Processor, Self-Healing Chain, and Secure Schema Validator.
- π§ Phase 3 Active Recall Flashcards: 21 interactive flashcards across 7 decks.
- πΊοΈ 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.
- 4.1 Context Paradigm & Memory Model: The 70% error root cause, and the Three-Layer Memory Model (Working, Episodic, and Semantic).
- 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. - 4.3 Indexing Patterns & Context Window Optimization: The chunking dilemma,
ParentDocumentRetriever,MultiVectorRetriever, "Lost in the Middle" attention trough, and hierarchical XML tagging. - 4.4 Question Transformations: Rewrite-Retrieve-Read, Multi-Query with Reciprocal Rank Fusion (RRF), Step-Back queries, and HyDE (Hypothetical Document Embeddings).
- 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.
- 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.
- π§ͺ Phase 4 Lab Guide: Lab requirements for Memory-Enabled Travel Chatbot, Advanced RAG Dashboard (>90% Faithfulness), Hardened RAG Pipeline, and Quality Benchmarking Report.
- π§ Phase 4 Active Recall Flashcards: 18 interactive flashcards across 6 decks.
- πΊοΈ 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.
- 5.1 AI Harness & Environment Onboarding: The AI Harness concept (deterministic OS hypervisor for LLMs) and
LocalContextMiddleware(toolchain discovery, directory topology, Git status). - 5.2 Model Context Protocol (MCP) Architecture & Consumption: The
problem solved via JSON-RPC 2.0, Tools, Resources, Prompts, FastMCP, and MultiServerMCPClient. - 5.3 Build-Verify-Fix Loops & Aggressive Self-Verification: Eliminating vibe-based coding, automated Pytest execution gates in isolated subprocesses, and lossless traceback feedback.
- 5.4 Deterministic Middleware Hooks: Breaking Doom Loops via
LoopDetectionMiddleware(action hashing), and blocking premature exits viaPreCompletionChecklistMiddleware. - 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.
- 5.6 Compulsory Operational Safety: Rate Limiters & Circuit Breakers:
AIRateLimiterenforcing RPM, TPM, and daily USD budget caps, tool error classification, andToolCircuitBreakerstates. - π§ͺ Phase 5 Lab Guide: Lab requirements for Onboarded Developer Agent, Loop-Detection Report, Verified Completion Trace, and Harness Benchmark Report.
- π§ Phase 5 Active Recall Flashcards: 13 interactive flashcards across 6 decks.
- πΊοΈ 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.
- 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").
- 6.2 Shared State Architecture, Reducers & Durable Checkpointers: Strongly-typed
TypedDictstate object ("the backpack"),add_messagesreducer, andSqliteSavermulti-turn persistence across process restarts. - 6.3 Human-in-the-Loop (HITL) Patterns & The Functional API: The
interrupt()andCommand(resume=...)primitives, and the LangGraph Functional API (@entrypointand@task). - 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. - 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 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.
- π§ͺ Phase 6 Lab Guide: Lab requirements for Stateful Essayist, Privileged Action Gatekeeper, Multi-Agent Research Pipeline, Durable Execution Proof, and Audit Trail Proof.
- π§ Phase 6 Active Recall Flashcards: 13 interactive flashcards across 6 decks.
- πΊοΈ 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:
| Phase | Core Domain | Architectural Focus | Plan Reference |
|---|---|---|---|
| Capstone | NEXUS Deep Researcher | Multi-Agent Orchestration, Synthesis, Report Generation | Capstone Plan |
| Phase 8 | Production Evaluation | Evals Flywheel, RAGAS, DeepEval, Synthetic Test Generation | Eval Plan |
| Phase 9 | Advanced Ecosystems | Small Language Models (SLMs), Distillation, Local Inference (vLLM/Ollama) | Ecosystem Plan |
| Phase 10 | DeepAgents Rapid Track | Production Agent Frameworks, Real-World Deployments | DeepAgents Plan |