# Learn & Build AI > A free, animated, narrated course with 355 lessons across 16 tracks: LLMs, AI agents, MCP, agent memory, agentic patterns, RAG, evals, fine-tuning, AI system design, LLMOps, AI security, the AI Solution Architect track, Azure, AIOps & MLOps, DevOps & DevSecOps, data structures & algorithms, system design, project management, and SDLC vs ADLC. Every lesson follows seven scenes: scenario, what it is, how it works (animated diagram), example, key features, when to use it, and a recap with a quiz. Lessons live at #/l//. Extra pages: #/roadmap (AI Engineer & AI Solution Architect roadmap, Phases 0–15, each topic linked to its lesson), #/projects (11 portfolio projects), #/checklist, #/glossary, #/resources. ## AI Agents & LLMs Eight modules, from a single model call to a production-grade agent on Azure. ### Module 01: LLM Foundations - [How an LLM Works](#/l/agents/how-an-llm-works): An LLM turns text into tokens and repeatedly predicts the most likely next token. - [The Context Window](#/l/agents/the-context-window): The context window is the model’s working memory: everything it can see in one call. - [Embeddings & RAG](#/l/agents/embeddings-and-rag): Embeddings turn meaning into vectors; RAG retrieves relevant text and adds it to the prompt. ### Module 02: AI Agents - [The Agent Loop](#/l/agents/the-agent-loop): An agent is an LLM that calls tools in a loop until the goal is met. - [Tool Calling](#/l/agents/tool-calling): The model outputs a structured request to call a function; your code runs it. - [Multi-Agent Systems](#/l/agents/multi-agent-systems): Several specialized agents collaborate, each with its own prompt, tools and context. ### Module 03: Model Context Protocol - [MCP Architecture](#/l/agents/mcp-architecture): MCP connects hosts, clients and servers so any AI app can use any tool server. - [MCP Session Lifecycle](#/l/agents/mcp-session-lifecycle): An MCP session goes through initialize, capability discovery, operation and shutdown. - [Tools, Resources & Prompts](#/l/agents/tools-resources-and-prompts): MCP servers expose three core primitives, each controlled by a different party. ### Module 04: Agent Memory - [Types of Agent Memory](#/l/agents/types-of-agent-memory): Short-term memory lives in the context; long-term memory is semantic, episodic or procedural. - [The Memory Pipeline](#/l/agents/the-memory-pipeline): Memories are extracted, stored, retrieved and injected — and occasionally consolidated. ### Module 05: Agentic Patterns - [ReAct & Planning](#/l/agents/react-and-planning): ReAct interleaves reasoning and actions; planning breaks big goals into steps first. - [Reflection, Routing & Fan-out](#/l/agents/reflection-routing-and-fan-out): Agents critique their own work, route requests to the right path and fan out in parallel. - [Guardrails & Human-in-the-Loop](#/l/agents/guardrails-and-human-in-the-loop): Guardrails check inputs and outputs; humans approve risky actions. ### Module 06: Azure AI Services - [Azure OpenAI in Microsoft Foundry](#/l/agents/azure-openai-in-microsoft-foundry): Deploy frontier models in your Azure subscription with enterprise security and quotas. - [Azure AI Search for RAG](#/l/agents/azure-ai-search-for-rag): A managed search index with vector, keyword, hybrid and semantic ranking for RAG. - [Foundry Agent Service](#/l/agents/foundry-agent-service): A managed runtime for agents: threads, tools, files and tracing without running your own loop. ### Module 07: Azure Platform - [Azure Compute for AI Apps](#/l/agents/azure-compute-for-ai-apps): Choose between Container Apps, App Service, Functions and AKS to run agent backends. - [Azure Data for AI Apps](#/l/agents/azure-data-for-ai-apps): Cosmos DB, PostgreSQL, Blob Storage and Redis each play a role in an AI backend. - [Azure Messaging & Events](#/l/agents/azure-messaging-and-events): Service Bus, Event Grid and Event Hubs decouple agent work from user requests. - [Identity, Gateways & Network Security](#/l/agents/identity-gateways-and-network-security): Managed identities, API Management as an AI gateway, and private networking secure agents. - [Observability for AI Agents](#/l/agents/observability-for-ai-agents): Trace every model and tool call with OpenTelemetry into Application Insights. ### Module 08: Putting It Together - [A Production Agent on Azure](#/l/agents/a-production-agent-on-azure): Everything combined: gateway, agent, RAG, tools, memory, guardrails, queues and tracing. ## Azure Cloud Every core Azure resource type, one resource per lesson. ### Azure 01: Compute & Containers - [Virtual Machines](#/l/azure/virtual-machines): Rent full servers in Azure — maximum control, maximum responsibility. - [Azure App Service](#/l/azure/azure-app-service): A fully managed platform for web apps and APIs — just deploy code. - [Azure Kubernetes Service (AKS)](#/l/azure/azure-kubernetes-service-aks): Managed Kubernetes for running many containers with full orchestration control. - [Azure Functions](#/l/azure/azure-functions): Serverless functions that run on events and bill per execution. - [Azure Container Apps](#/l/azure/azure-container-apps): Serverless containers with autoscaling, revisions and Dapr — Kubernetes without the cluster. ### Azure 02: Storage - [Azure Blob Storage](#/l/azure/azure-blob-storage): Massively scalable object storage for files, images, backups and documents. - [Azure Files](#/l/azure/azure-files): Managed SMB/NFS file shares that many machines can mount at once. - [Managed Disks](#/l/azure/managed-disks): Block storage volumes for VMs, from standard HDD to ultra-fast SSD. - [Azure Data Lake Storage](#/l/azure/azure-data-lake-storage): Blob Storage with a hierarchical namespace, optimized for analytics. ### Azure 03: Databases - [Azure SQL Database](#/l/azure/azure-sql-database): Fully managed SQL Server engine with built-in HA, backups and scaling. - [Azure Cosmos DB](#/l/azure/azure-cosmos-db): Globally distributed NoSQL database with single-digit-millisecond latency. - [Azure Database for PostgreSQL & MySQL](#/l/azure/azure-database-for-postgresql-and-mysql): Managed open-source relational databases — Postgres even does vectors. - [Azure Cache for Redis & Managed Redis](#/l/azure/azure-cache-for-redis-and-managed-redis): In-memory cache for microsecond reads, sessions, rate limits and semantic caching. ### Azure 04: Networking - [Virtual Network (VNet)](#/l/azure/virtual-network-vnet): Your private network in Azure, split into subnets and protected by NSGs. - [Azure Load Balancer](#/l/azure/azure-load-balancer): A layer-4 (TCP/UDP) load balancer that spreads traffic across healthy VMs. - [Azure Application Gateway](#/l/azure/azure-application-gateway): A regional layer-7 load balancer with path routing, TLS termination and WAF. - [Azure Front Door](#/l/azure/azure-front-door): Global entry point: anycast edge, CDN caching, WAF and multi-region failover. - [Firewall, VPN Gateway & ExpressRoute](#/l/azure/firewall-vpn-gateway-and-expressroute): Central egress control plus encrypted or private links to on-premises. ### Azure 05: AI, Data & Analytics - [Microsoft Foundry](#/l/azure/microsoft-foundry): Azure’s platform to build, evaluate and run AI apps and agents with many models. - [Azure AI Search](#/l/azure/azure-ai-search): Managed search engine: full-text, vector, hybrid, filters and semantic ranking. - [Azure Data Factory](#/l/azure/azure-data-factory): Managed data integration: copy, transform and orchestrate pipelines across sources. - [Azure Databricks & Microsoft Fabric](#/l/azure/azure-databricks-and-microsoft-fabric): Lakehouse platforms for big-data engineering, analytics and ML. - [Azure Event Hubs](#/l/azure/azure-event-hubs): A big-data streaming platform that ingests millions of events per second. ### Azure 06: Identity, Security & Management - [Microsoft Entra ID](#/l/azure/microsoft-entra-id): Azure’s identity platform: users, apps, SSO, MFA, conditional access and RBAC. - [Azure Key Vault](#/l/azure/azure-key-vault): Secure storage for secrets, keys and certificates with access control and auditing. - [Defender for Cloud & Sentinel](#/l/azure/defender-for-cloud-and-sentinel): Cloud security posture and threat protection, plus a cloud SIEM/SOAR. - [Monitor, Policy & Backup](#/l/azure/monitor-policy-and-backup): Observe everything, enforce standards automatically, and protect data. ## AIOps & MLOps AI for IT operations and operations for ML models, for beginners. ### AIOps 01: Collect & Prepare - [What is AIOps?](#/l/aiops/what-is-aiops): AIOps applies machine learning to operations data to detect, diagnose and fix issues faster. - [Data Ingestion & Aggregation](#/l/aiops/data-ingestion-and-aggregation): Pull telemetry from every source into one place, at scale. - [Normalization & Enrichment](#/l/aiops/normalization-and-enrichment): Make different data formats comparable and add context like service, owner and topology. ### AIOps 02: Detect & Diagnose - [Noise Reduction & Event Correlation](#/l/aiops/noise-reduction-and-event-correlation): Deduplicate, suppress and group related alerts into a single incident. - [Dynamic Baselining & Anomaly Detection](#/l/aiops/dynamic-baselining-and-anomaly-detection): Learn what “normal” looks like for each metric and flag deviations. - [Automated Root Cause Analysis](#/l/aiops/automated-root-cause-analysis): Walk the dependency graph and change history to rank the likely cause. ### AIOps 03: Predict, Heal & Learn - [Predictive Insights & Capacity Forecasting](#/l/aiops/predictive-insights-and-capacity-forecasting): Forecast load and resource exhaustion before they cause outages. - [Automated Remediation (Self-Healing)](#/l/aiops/automated-remediation-self-healing): Trigger runbooks automatically to fix known problems safely. - [Continuous Feedback Loop](#/l/aiops/continuous-feedback-loop): Learn from every incident to improve detection, correlation and runbooks. ### MLOps 01: Build & Track Models - [What is MLOps?](#/l/aiops/what-is-mlops): MLOps brings DevOps discipline to the full machine-learning lifecycle. - [Data & Feature Versioning](#/l/aiops/data-and-feature-versioning): Version datasets and features so every model is reproducible. - [Experiment Tracking & Reproducibility](#/l/aiops/experiment-tracking-and-reproducibility): Log parameters, metrics, code and artifacts for every training run. - [Model Registry & Governance](#/l/aiops/model-registry-and-governance): A central catalog of model versions, stages, approvals and lineage. ### MLOps 02: Ship & Run Models - [CI/CD/CT for Machine Learning](#/l/aiops/ci-cd-ct-for-machine-learning): Automate testing, deployment and continuous training of models. - [Model Serving & Inference](#/l/aiops/model-serving-and-inference): Expose models via real-time endpoints, batch jobs or streaming. - [Drift Detection & Monitoring](#/l/aiops/drift-detection-and-monitoring): Detect when input data or model accuracy shifts away from training conditions. - [MLOps inside AIOps](#/l/aiops/mlops-inside-aiops): AIOps models are ML models too — they need MLOps to stay trustworthy. ## DevOps & DevSecOps Ship safely and often: Git, CI/CD, IaC, containers, security, observability and platforms. ### DevOps 01: Version Control & Collaboration - [Branching Strategies: GitFlow vs Trunk-Based](#/l/devops/branching-strategies-gitflow-vs-trunk-based): Long-lived release branches versus small, frequent merges to main. - [Pull Requests & Code Review](#/l/devops/pull-requests-and-code-review): Propose changes, run checks automatically and get peer review before merging. - [Repository Security & Branch Protection](#/l/devops/repository-security-and-branch-protection): Protect main, require reviews and signed commits, and scan for leaked secrets. ### DevOps 02: CI/CD Pipelines - [Continuous Integration Pipelines](#/l/devops/continuous-integration-pipelines): Every change is built and tested automatically, giving feedback in minutes. - [Artifacts, Registries & Environments](#/l/devops/artifacts-registries-and-environments): Build once, store immutable artifacts, and promote them through environments. - [Deployment Strategies](#/l/devops/deployment-strategies): Recreate, rolling, blue-green, canary and shadow — trading speed for safety. - [Blue-Green vs Canary Deployments](#/l/devops/blue-green-vs-canary-deployments): A deep comparison: instant switch with two environments versus gradual metric-driven rollout. ### DevOps 03: Infrastructure as Code - [Terraform: Infrastructure as Code](#/l/devops/terraform-infrastructure-as-code): Declare cloud resources in code; Terraform plans and applies the changes. - [State, Drift & Backends](#/l/devops/state-drift-and-backends): Terraform state maps code to real resources; remote backends and drift detection keep it safe. - [Ansible & Configuration Management](#/l/devops/ansible-and-configuration-management): Configure servers and software idempotently with playbooks. ### DevOps 04: Containers & Kubernetes - [Docker & Container Images](#/l/devops/docker-and-container-images): Package an app with its dependencies into a portable, immutable image. - [Kubernetes Fundamentals](#/l/devops/kubernetes-fundamentals): Pods, Deployments, Services and the control loop that keeps desired state. - [Kubernetes Networking & Helm](#/l/devops/kubernetes-networking-and-helm): Services, Ingress and DNS route traffic; Helm packages apps as charts. ### DevOps 05: Cloud Architecture & Networking - [Cloud Networking: VPCs, Subnets & Load Balancers](#/l/devops/cloud-networking-vpcs-subnets-and-load-balancers): Isolate workloads in private networks and spread traffic across instances. - [Cloud IAM, Least Privilege & Serverless](#/l/devops/cloud-iam-least-privilege-and-serverless): Grant minimal permissions via roles, and use serverless to shrink what you manage. ### DevOps 06: DevSecOps & Supply Chain - [Security Gates & Shift-Left Testing](#/l/devops/security-gates-and-shift-left-testing): Run SAST, dependency scanning, IaC and container scans early in the pipeline. - [Supply Chain Security: SBOM, Signing & Provenance](#/l/devops/supply-chain-security-sbom-signing-and-provenance): Know what is in your software, prove where it came from, and verify before you run it. - [Secrets Management: Vault, Rotation & Injection](#/l/devops/secrets-management-vault-rotation-and-injection): Store secrets centrally, inject them at runtime and rotate them automatically. ### DevOps 07: Observability & Incidents - [Observability: Metrics, Logs & Traces](#/l/devops/observability-metrics-logs-and-traces): Three pillars that answer what, why and where a system is misbehaving. - [SLOs, Error Budgets, Incidents & Chaos](#/l/devops/slos-error-budgets-incidents-and-chaos): Define reliability targets, spend error budgets wisely, respond to incidents and test failure. ### DevOps 08: Platform Engineering & GitOps - [Platform Engineering & Internal Developer Platforms](#/l/devops/platform-engineering-and-internal-developer-platforms): Build self-service paved roads so product teams ship without reinventing infrastructure. - [GitOps with Argo CD & Flux](#/l/devops/gitops-with-argo-cd-and-flux): Git is the source of truth; an in-cluster agent pulls and reconciles the desired state. - [AI-Assisted DevOps](#/l/devops/ai-assisted-devops): Use LLMs and agents for pipelines, IaC, incident triage and code review — with guardrails. ## Data Structures & Algorithms From Big-O to dynamic programming, shown step by step. ### DSA 01: Cost & Complexity Thinking - [Big-O, Ω and Θ: Measuring Growth](#/l/dsa/big-o-and-measuring-growth): Describe how running time grows with input size, ignoring constants. - [Recursion, Call Stacks & Recurrences](#/l/dsa/recursion-call-stacks-and-recurrences): Functions that call themselves, the stack that tracks them, and how to analyze their cost. - [Number Toolkit: Primes, GCD, Modular Math & Counting](#/l/dsa/number-toolkit-primes-gcd-modular-math-and-counting): Math tools behind hashing, cryptography and combinatorics. - [Bit Tricks: Operators, Masks & Powers of Two](#/l/dsa/bit-tricks-operators-masks-and-powers-of-two): Use AND, OR, XOR and shifts to pack flags and compute fast. ### DSA 02: Sequences: Arrays & Text - [Arrays, Matrices & Dynamic Arrays](#/l/dsa/arrays-matrices-and-dynamic-arrays): Contiguous memory gives O(1) indexing; dynamic arrays grow by doubling. - [Prefix Sums, Difference Arrays & Kadane](#/l/dsa/prefix-sums-difference-arrays-and-kadane): Precompute running totals for O(1) range sums; find the best subarray in O(n). - [Strings, Encodings & Palindromes](#/l/dsa/strings-encodings-and-palindromes): Characters, Unicode, immutability and classic string techniques. - [Pattern Matching: KMP, Rabin-Karp & Z](#/l/dsa/pattern-matching-kmp-rabin-karp-and-z): Find a pattern in text in linear time instead of naive O(n·m). ### DSA 03: Linked Chains, Stacks & Queues - [Linked Lists: Singly, Doubly & Circular](#/l/dsa/linked-lists-singly-doubly-and-circular): Nodes linked by pointers allow O(1) insert/delete when you already hold the node. - [Fast & Slow Pointers](#/l/dsa/fast-and-slow-pointers): Two pointers moving at different speeds detect cycles and find midpoints. - [Stacks: LIFO, Expressions & Monotonic Stacks](#/l/dsa/stacks-lifo-expressions-and-monotonic-stacks): Last in, first out — for undo, parsing and next-greater problems. - [Queues, Ring Buffers & Deques](#/l/dsa/queues-ring-buffers-and-deques): First in, first out for fair processing; deques work at both ends. ### DSA 04: Hashing & Fast Lookup - [Hash Tables: Hashing, Collisions & Load Factor](#/l/dsa/hash-tables-hashing-collisions-and-load-factor): Map keys to buckets with a hash function for average O(1) operations. - [Hash Maps & Sets in Practice](#/l/dsa/hash-maps-and-sets-in-practice): Counting, grouping, dedup and two-sum patterns with dictionaries and sets. ### DSA 05: Trees & Search Trees - [Binary Trees & Traversals](#/l/dsa/binary-trees-and-traversals): Visit nodes in preorder, inorder, postorder or level order. - [Binary Search Trees](#/l/dsa/binary-search-trees): Left < node < right gives O(log n) search when balanced. - [Self-Balancing Trees: AVL, Red-Black & B-Trees](#/l/dsa/self-balancing-trees-avl-red-black-and-b-trees): Rotations and splits keep height O(log n) — databases use B-trees. ### DSA 06: Heaps, Tries & Range Queries - [Heaps & Priority Queues](#/l/dsa/heaps-and-priority-queues): Always get the min or max in O(1) and update in O(log n). - [Tries: Autocomplete & Prefix Search](#/l/dsa/tries-autocomplete-and-prefix-search): A tree of characters that finds all words with a prefix in O(prefix length). - [Range Queries: Segment Trees & Fenwick Trees](#/l/dsa/range-queries-segment-trees-and-fenwick-trees): Answer range sums/min/max with updates, each in O(log n). ### DSA 07: Graphs & Networks - [Graphs: Representations, BFS & DFS](#/l/dsa/graphs-representations-bfs-and-dfs): Model relationships as nodes and edges; explore them breadth-first or depth-first. - [Topological Sort & DAGs](#/l/dsa/topological-sort-and-dags): Order tasks so every dependency comes first. - [Shortest Paths: Dijkstra, Bellman-Ford, Floyd](#/l/dsa/shortest-paths-dijkstra-bellman-ford-floyd): Find the cheapest routes in weighted graphs. - [Union-Find & Minimum Spanning Trees](#/l/dsa/union-find-and-minimum-spanning-trees): Track connected groups quickly, and connect everything at minimum cost. - [Advanced Graphs: SCCs, Bridges & Euler Paths](#/l/dsa/advanced-graphs-sccs-bridges-and-euler-paths): Find strongly connected clusters, critical links and paths that use every edge once. ### DSA 08: Searching & Ordering - [Comparison Sorts: From Bubble to Quick](#/l/dsa/comparison-sorts-from-bubble-to-quick): Bubble/insertion are O(n²); merge, heap and quick sort are O(n log n). - [Linear-Time Sorts: Counting, Radix & Bucket](#/l/dsa/linear-time-sorts-counting-radix-and-bucket): Beat O(n log n) by exploiting the key structure instead of comparing. - [Binary Search & Searching the Answer Space](#/l/dsa/binary-search-and-searching-the-answer-space): Halve the search space each step — on arrays, or on the answer itself. - [Two Pointers & Sliding Windows](#/l/dsa/two-pointers-and-sliding-windows): Move two indices cleverly to solve array and string problems in O(n). ### DSA 09: Problem-Solving Strategies - [Divide & Conquer](#/l/dsa/divide-and-conquer): Split the problem, solve the parts recursively, and combine. - [Backtracking](#/l/dsa/backtracking): Build solutions step by step and undo choices that cannot succeed. - [Greedy Algorithms](#/l/dsa/greedy-algorithms): Make the locally best choice at each step — correct only when the problem has greedy structure. ### DSA 10: Dynamic Programming - [DP Foundations: Memoization vs Tabulation](#/l/dsa/dp-foundations-memoization-vs-tabulation): Cache subproblem answers top-down, or fill a table bottom-up. - [Classic DP: Knapsack, LCS & LIS](#/l/dsa/classic-dp-knapsack-lcs-and-lis): Three DP problems that teach most of the patterns. - [DP Patterns: Grid, Interval, Tree & Bitmask](#/l/dsa/dp-patterns-grid-interval-tree-and-bitmask): Recognize the state shape: grids, intervals, subtrees or subsets. ## System Design How real systems handle millions of users — from first principles to six complete case studies. ### SD 01: Thinking at Scale - [Requirements & Back-of-the-Envelope Estimates](#/l/sysdesign/requirements-and-back-of-the-envelope-estimates): Clarify functional and non-functional needs, then estimate traffic, storage and bandwidth. - [Scaling Up vs Scaling Out](#/l/sysdesign/scaling-up-vs-scaling-out): Bigger machines (vertical) versus more machines (horizontal). - [Latency, Throughput & Percentiles](#/l/sysdesign/latency-throughput-and-percentiles): How fast one request is versus how many you serve — measured with p50/p95/p99. - [Availability, Redundancy & CAP](#/l/sysdesign/availability-redundancy-and-cap): Remove single points of failure, count the nines, and understand CAP trade-offs. ### SD 02: Getting Requests In - [DNS & CDNs](#/l/sysdesign/dns-and-cdns): DNS turns names into IPs; CDNs serve content from the edge close to users. - [Load Balancers](#/l/sysdesign/load-balancers): Distribute traffic across servers using algorithms and health checks. - [Reverse Proxies, API Gateways & Service Mesh](#/l/sysdesign/reverse-proxies-api-gateways-and-service-mesh): Layers that route, secure and observe traffic at the edge and between services. - [API Styles: REST, gRPC, GraphQL & Real-Time](#/l/sysdesign/api-styles-rest-grpc-graphql-and-real-time): Choose the right interface: resources, RPC, flexible queries or streaming. ### SD 03: Storing Data at Scale - [SQL vs NoSQL](#/l/sysdesign/sql-vs-nosql): Relational schemas and transactions versus flexible, horizontally scalable models. - [Indexes: B-Trees vs LSM Trees](#/l/sysdesign/indexes-b-trees-vs-lsm-trees): B-trees optimize reads in place; LSM trees optimize heavy writes with sequential appends. - [Replication & Quorums](#/l/sysdesign/replication-and-quorums): Copy data to multiple nodes for availability and read scale; quorums tune consistency. - [Sharding & Consistent Hashing](#/l/sysdesign/sharding-and-consistent-hashing): Split data across nodes; consistent hashing minimizes data movement when nodes change. ### SD 04: Caching Everywhere - [Caching Strategies](#/l/sysdesign/caching-strategies): Cache-aside, read-through, write-through, write-behind — and where caches live. - [Cache Invalidation & Pitfalls](#/l/sysdesign/cache-invalidation-and-pitfalls): Stale data, stampedes, penetration and hot keys — and how to avoid them. ### SD 05: Asynchronous & Event-Driven Systems - [Message Queues](#/l/sysdesign/message-queues): Buffer work between producers and consumers for reliability and smoothing. - [Pub/Sub & Event Streams](#/l/sysdesign/pub-sub-and-event-streams): Broadcast events to many subscribers; streams keep a replayable log. - [Batch vs Stream Processing](#/l/sysdesign/batch-vs-stream-processing): Process large bounded datasets periodically, or unbounded events continuously. ### SD 06: Reliability & Resilience - [Rate Limiting](#/l/sysdesign/rate-limiting): Cap how many requests a client can make to protect stability and cost. - [Timeouts, Retries & Circuit Breakers](#/l/sysdesign/timeouts-retries-and-circuit-breakers): Fail fast, retry carefully with backoff, and stop calling broken dependencies. - [Multi-Region & Disaster Recovery](#/l/sysdesign/multi-region-and-disaster-recovery): Plan RPO/RTO and choose active-passive or active-active across regions. ### SD 07: Distributed Systems Core - [Consistency Models](#/l/sysdesign/consistency-models): From linearizable to eventual — what reads are guaranteed to see. - [Consensus & Leader Election](#/l/sysdesign/consensus-and-leader-election): Raft and Paxos let nodes agree on a value or leader despite failures. - [Distributed Transactions](#/l/sysdesign/distributed-transactions): Two-phase commit for atomicity across nodes; sagas for long-running business flows. - [Clocks, Ordering & Unique IDs](#/l/sysdesign/clocks-ordering-and-unique-ids): Physical clocks drift; logical clocks order events; IDs must be unique without coordination. ### SD 08: Storage, Search & Security - [Object Storage & Media](#/l/sysdesign/object-storage-and-media): Store files in object storage; upload and serve them directly and efficiently. - [Search Systems](#/l/sysdesign/search-systems): Inverted indexes, relevance ranking and indexing pipelines power product search. - [Security Across the System](#/l/sysdesign/security-across-the-system): Defense in depth: authN/authZ, encryption, secrets, network and input safety. ### SD 09: Design Case Studies - [Design a URL Shortener (nvm.link)](#/l/sysdesign/design-a-url-shortener-nvm-link): Short codes, a huge read ratio, caching and analytics. - [Design a Real-Time Chat (NovaChat)](#/l/sysdesign/design-a-real-time-chat-novachat): WebSocket gateways, message storage, fan-out, presence and delivery receipts. - [Design a News Feed (NovaFeed)](#/l/sysdesign/design-a-news-feed-novafeed): Fan-out on write vs on read, ranking and the celebrity problem. - [Design Video Streaming (NovaTV)](#/l/sysdesign/design-video-streaming-novatv): Upload, transcode, adaptive bitrate and CDN delivery. - [Design Courier Matching (NovaDeliver)](#/l/sysdesign/design-courier-matching-novadeliver): Geo-indexing, real-time locations and matching couriers to orders. - [Design a Payment System (NovaPay)](#/l/sysdesign/design-a-payment-system-novapay): Idempotency, double-entry ledgers, PSP integration and reconciliation. ## Project Management Plan, run and deliver projects on time and on budget — explained for complete beginners. ### PM 01: Projects, Lifecycle & Governance - [What a Project Is (and What a PM Does)](#/l/pm/what-a-project-is-and-what-a-pm-does): A project is temporary work with a unique goal; the PM balances scope, time, cost and quality. - [The Five Phases](#/l/pm/the-five-phases): Initiating, planning, executing, monitoring & controlling, and closing. - [Project Charter & Governance](#/l/pm/project-charter-and-governance): The charter authorizes the project; governance defines who decides what. ### PM 02: Scope & Schedule - [Scope & the Work Breakdown Structure](#/l/pm/scope-and-the-work-breakdown-structure): Break the deliverable into smaller and smaller work packages. - [Estimating Durations](#/l/pm/estimating-durations): Analogous, parametric, three-point and agile estimation techniques. - [Network Diagrams & the Critical Path](#/l/pm/network-diagrams-and-the-critical-path): Sequence the tasks; the longest dependent path sets the earliest finish date. - [Scope Creep & Gold Plating](#/l/pm/scope-creep-and-gold-plating): Uncontrolled scope additions — from stakeholders or from the team itself. ### PM 03: Resources & Cost - [Roles & the RACI Matrix](#/l/pm/roles-and-the-raci-matrix): Clarify who is Responsible, Accountable, Consulted and Informed for each task. - [Resource Levelling & Smoothing](#/l/pm/resource-levelling-and-smoothing): Resolve overallocation by shifting tasks — levelling may move the end date; smoothing does not. - [Budgets & Earned Value](#/l/pm/budgets-and-earned-value): Track cost and schedule performance together with EV, PV, AC, CPI and SPI. ### PM 04: Risk & Quality - [Identifying & Scoring Risks](#/l/pm/identifying-and-scoring-risks): Find uncertain events early and rank them by probability × impact. - [Planning Risk Responses](#/l/pm/planning-risk-responses): Avoid, mitigate, transfer or accept threats; exploit or enhance opportunities. - [Quality Management](#/l/pm/quality-management): Plan quality, assure the process and control the outputs. ### PM 05: Stakeholders, Change & Closure - [Stakeholder Management](#/l/pm/stakeholder-management): Identify everyone affected, map their power and interest, and engage them deliberately. - [Communication Planning](#/l/pm/communication-planning): Decide who needs what information, when, how and from whom. - [Change Requests & Organisational Change](#/l/pm/change-requests-and-organisational-change): Control changes to the project, and help people adopt what it delivers. - [Closing the Project](#/l/pm/closing-the-project): Get acceptance, hand over to operations, release resources and capture lessons. ## SDLC & ADLC How building deterministic software (SDLC) differs from building AI agents (ADLC). ### SDLC & ADLC 01: SDLC: Building Deterministic Software - [What the SDLC Is](#/l/sdlc/what-the-sdlc-is): A structured lifecycle for building software whose behavior is fully specified by code. - [Planning, Feasibility & Requirements](#/l/sdlc/planning-feasibility-and-requirements): Decide whether to build, then capture functional and non-functional requirements. - [Design, Architecture & Coding](#/l/sdlc/design-architecture-and-coding): Turn requirements into architecture and clean, reviewed code. - [Testing & Quality Assurance](#/l/sdlc/testing-and-quality-assurance): Unit, integration, system and acceptance tests verify deterministic behavior. - [Deployment, Release & Maintenance](#/l/sdlc/deployment-release-and-maintenance): Ship safely, operate, and evolve the software over its life. ### SDLC & ADLC 02: ADLC: Designing AI Agents - [What the ADLC Is](#/l/sdlc/what-the-adlc-is): A lifecycle for probabilistic, goal-driven agents — evaluation and governance at every step. - [Problem Framing & Autonomy Scoping](#/l/sdlc/problem-framing-and-autonomy-scoping): Decide what the agent should do, for whom, and how much it may do alone. - [Cognitive Architecture & Orchestration](#/l/sdlc/cognitive-architecture-and-orchestration): Choose models, reasoning patterns, memory and single- or multi-agent structure. - [Context & Knowledge Engineering](#/l/sdlc/context-and-knowledge-engineering): Give the agent the right instructions, knowledge, memory and data at the right time. - [Tool & Action Integration](#/l/sdlc/tool-and-action-integration): Connect the agent to systems through well-designed, safe, idempotent tools. ### SDLC & ADLC 03: ADLC: Evaluate, Govern & Operate - [Agent Evaluation & Simulation](#/l/sdlc/agent-evaluation-and-simulation): Measure task success over many realistic scenarios, including simulated users. - [Guardrails & Governance](#/l/sdlc/guardrails-and-governance): Technical guardrails plus organizational policy, accountability and compliance. - [AgentOps & Continuous Learning](#/l/sdlc/agentops-and-continuous-learning): Operate agents in production: tracing, monitoring, feedback and improvement loops. ### SDLC & ADLC 04: SDLC vs ADLC - [Key Differences, Side by Side](#/l/sdlc/key-differences-side-by-side): Deterministic vs probabilistic, specs vs evals, releases vs continuous adaptation. - [Putting Them Together](#/l/sdlc/putting-them-together): Real products combine deterministic services and agents in one delivery system. ## Foundations & Backend for AI AI apps are 80% normal software engineering: Python, Git, Linux, math intuition, APIs, auth, databases and reliability. ### FND 01: Prerequisites - [Python for AI Engineers](#/l/foundations/python-for-ai-engineers): Functions, classes, type hints, async/await, virtual environments and Pydantic. - [Git & GitHub Workflow](#/l/foundations/git-and-github-workflow): Track changes, branch, review with pull requests — and never commit secrets. - [Linux & the Command Line](#/l/foundations/linux-and-the-command-line): Most AI systems run on Linux containers — navigate, inspect and debug them. - [Math Intuition for AI](#/l/foundations/math-intuition-for-ai): Vectors, dot products, probability, matrices and statistics — intuition, not heavy math. - [Machine Learning Basics](#/l/foundations/machine-learning-basics): Supervised vs unsupervised learning, neural networks, training vs inference, loss and overfitting. - [Data Formats: JSON, JSONL, YAML & Parquet](#/l/foundations/data-formats-json-jsonl-yaml-and-parquet): The formats you will read and write daily in AI work. ### FND 02: APIs & Auth - [HTTP & REST](#/l/foundations/http-and-rest): Resources, verbs and status codes — the language of web APIs. - [API Design & OpenAPI](#/l/foundations/api-design-and-openapi): Versioned, consistent, paginated, documented APIs — e.g. with FastAPI. - [Authentication: JWT, OAuth 2.0 & OIDC](#/l/foundations/authentication-jwt-oauth-2-0-and-oidc): Who you are, what you may do, and how agents act on behalf of users. - [Webhooks](#/l/foundations/webhooks): “Don’t call us, we’ll call you” — services POST events to your endpoint. ### FND 03: Data & Reliability - [PostgreSQL for AI Apps](#/l/foundations/postgresql-for-ai-apps): Tables, joins, JSONB, migrations and pooling — and pgvector makes it an AI database. - [Transactions & ACID](#/l/foundations/transactions-and-acid): Group operations so they all succeed or all fail. - [Idempotency & Idempotency Keys](#/l/foundations/idempotency-and-idempotency-keys): Doing the same operation twice has the same effect as doing it once. - [Background Jobs, Async & Concurrency](#/l/foundations/background-jobs-async-and-concurrency): Move slow work off the request path with workers, schedulers and concurrency. ### FND 04: Real-Time & Ops - [SSE & WebSockets](#/l/foundations/sse-and-websockets): Server-Sent Events stream tokens one-way; WebSockets give full two-way channels. - [Structured Logging, Metrics & Golden Signals](#/l/foundations/structured-logging-metrics-and-golden-signals): JSON logs with trace IDs, metrics on latency/traffic/errors/saturation, and actionable alerts. ## LLM Deep Dive & Prompt Engineering Tokens, transformers, attention, inference, sampling, structured outputs, reasoning, cost — and writing prompts that work. ### LLM 01: Inside the Model - [Tokenization](#/l/llm/tokenization): LLMs read tokens, not words — and tokens drive cost, limits and latency. - [Transformers & Mixture of Experts](#/l/llm/transformers-and-mixture-of-experts): The architecture behind every modern LLM, plus MoE for cheaper scale. - [Self-Attention](#/l/llm/self-attention): Each token looks at every other token to decide what matters for its meaning. - [Inference: Prefill & Decode](#/l/llm/inference-prefill-and-decode): Processing the prompt in parallel, then generating tokens one by one. - [KV Cache & PagedAttention](#/l/llm/kv-cache-and-pagedattention): Store past keys/values so each new token does not recompute the whole sequence. ### LLM 02: Controlling Output - [Sampling: Temperature, Top-p & Top-k](#/l/llm/sampling-temperature-top-p-and-top-k): Control randomness: deterministic for extraction, creative for brainstorming. - [System Prompts](#/l/llm/system-prompts): High-priority instructions that set role, rules, tone and format. - [Few-shot Prompting](#/l/llm/few-shot-prompting): Show examples of input → output before the real input. - [Structured Outputs](#/l/llm/structured-outputs): Force valid JSON matching a schema so code can parse it reliably. - [Streaming Tokens](#/l/llm/streaming-tokens): Show tokens as they are generated to cut perceived latency. ### LLM 03: Reasoning & Reliability - [Reasoning Models & Thinking Budgets](#/l/llm/reasoning-models-and-thinking-budgets): Models that think step by step before answering — powerful, but slower and pricier. - [Chain-of-Thought](#/l/llm/chain-of-thought): Asking the model to reason step by step improves multi-step answers. - [Hallucinations & Grounding](#/l/llm/hallucinations-and-grounding): Models confidently invent facts — ground them, and let them say “I don’t know”. - [Multimodal Models](#/l/llm/multimodal-models): Models that read images, PDFs, audio and video — and sometimes generate them. ### LLM 04: Economics & Knobs - [Token Pricing & Cost Math](#/l/llm/token-pricing-and-cost-math): You pay per million tokens, and output costs more than input. - [Prompt Caching](#/l/llm/prompt-caching): Reuse the processed prefix of a prompt for big savings and faster responses. - [Batch APIs, Logprobs & Other Knobs](#/l/llm/batch-apis-logprobs-and-other-knobs): max_tokens, stop sequences, logprobs, batch APIs, SLMs, speculative decoding and alignment. ### LLM 05: Prompt Engineering - [Prompt Engineering Principles](#/l/llm/prompt-engineering-principles): Treat the model like a brilliant colleague with zero context: be clear, specific and structured. - [Structured Prompt Templates](#/l/llm/structured-prompt-templates): Use XML-tagged sections for role, context, documents, instructions and output format. - [Prompting Techniques](#/l/llm/prompting-techniques): Zero/few-shot, CoT, role prompting, chaining, self-consistency, prefill, meta-prompting and ReAct. - [Prompt Anti-Patterns & Prompt Management](#/l/llm/prompt-anti-patterns-and-prompt-management): Avoid vague, contradictory, shouty prompts — and manage prompts like code. ## Embeddings, Vector DBs & RAG Engineering Build retrieval that actually finds the right passages: parsing, chunking, vectors, hybrid search, reranking, advanced RAG and metrics. ### RAG 01: Vectors & Indexes - [Embeddings in Depth](#/l/rag/embeddings-in-depth): Vectors that capture meaning: models, dimensions, and rules for using them. - [Cosine Similarity & Distance Metrics](#/l/rag/cosine-similarity-and-distance-metrics): Measure how close two vectors are: cosine, dot product or Euclidean distance. - [Vector Databases & ANN Search](#/l/rag/vector-databases-and-ann-search): Databases optimized to find the nearest vectors among millions in milliseconds. - [pgvector](#/l/rag/pgvector): Vector search inside PostgreSQL: one DB for app data, vectors, permissions and transactions. - [HNSW Index](#/l/rag/hnsw-index): A multi-layer graph for fast approximate nearest-neighbor search. ### RAG 02: Ingestion: Parse & Chunk - [Document Parsing](#/l/rag/document-parsing): Turn PDFs, Word files, HTML, slides and scans into clean text with structure. - [Chunking Strategies](#/l/rag/chunking-strategies): Split documents into retrievable pieces: fixed, recursive, structure-aware, semantic or late. - [Contextual Retrieval](#/l/rag/contextual-retrieval): Prepend an LLM-written note to each chunk explaining where it fits before embedding it. - [Parent-Child Chunks (Small-to-Big)](#/l/rag/parent-child-chunks-small-to-big): Match on small chunks for precision; send the larger parent section for context. ### RAG 03: Retrieval Techniques - [Metadata Filters](#/l/rag/metadata-filters): Restrict search by tenant, type, date or ACL — critical for security and freshness. - [BM25 Keyword Search](#/l/rag/bm25-keyword-search): Classic term-frequency ranking that nails exact codes, names and acronyms. - [Hybrid Search & Reciprocal Rank Fusion](#/l/rag/hybrid-search-and-reciprocal-rank-fusion): Combine vector and keyword results, merged with RRF. - [Reranking with Cross-Encoders](#/l/rag/reranking-with-cross-encoders): Retrieve wide and cheap, then re-score precisely and keep the best few. - [Query Rewriting & Decomposition](#/l/rag/query-rewriting-and-decomposition): Let an LLM fix, expand, contextualize or split the query before retrieval. - [HyDE](#/l/rag/hyde): Embed a hypothetical answer instead of the question to find better matches. ### RAG 04: Advanced RAG - [Citations & Grounded Answers](#/l/rag/citations-and-grounded-answers): Show which source supports each claim — and verify the citations exist. - [GraphRAG](#/l/rag/graphrag): Build a knowledge graph of entities and relationships, then retrieve along connections. - [Agentic RAG](#/l/rag/agentic-rag): An agent decides when, where and how to retrieve — iterating until it has enough. - [Multimodal RAG, Text-to-SQL & Freshness](#/l/rag/multimodal-rag-text-to-sql-and-freshness): Retrieve images and tables, answer from databases, and keep indexes fresh. ### RAG 05: Measuring Retrieval - [Retrieval Metrics: Recall@k, MRR & nDCG](#/l/rag/retrieval-metrics-recall-k-mrr-and-ndcg): Measure whether the right chunks are found, and how high they rank. - [The RAG Triad](#/l/rag/the-rag-triad): Context relevance, groundedness and answer relevance — evaluate generation, not just retrieval. ## Agent Engineering: Protocols, Context & Harness Production-grade agents: orchestration, state, recovery, frameworks, MCP servers & clients, A2A, context engineering and harness engineering. ### AE 01: Robust Agents - [Workflows vs Agents](#/l/agenteng/workflows-vs-agents): Predefined code paths versus LLM-directed steps — start with the simplest thing that works. - [Orchestrator-Worker Pattern](#/l/agenteng/orchestrator-worker-pattern): A lead agent decomposes a task, spawns parallel workers, then synthesizes the results. - [Multi-Agent Handoffs](#/l/agenteng/multi-agent-handoffs): One agent transfers control and context to a more specialized agent. - [State & Checkpoints](#/l/agenteng/state-and-checkpoints): Persist agent state after each step so runs can resume after crashes, pauses or approvals. - [Stop Conditions](#/l/agenteng/stop-conditions): Always define when an agent must stop: goal, steps, budget, time, loops or interrupts. - [Error Recovery](#/l/agenteng/error-recovery): Return errors to the model as tool results, retry wisely, fall back, or escalate. ### AE 02: Agent Ecosystem - [Agent Frameworks Compared](#/l/agenteng/agent-frameworks-compared): Claude Agent SDK, OpenAI Agents SDK, LangGraph, LlamaIndex, CrewAI, AutoGen, Semantic Kernel, ADK and more. - [Computer Use & Browser Agents](#/l/agenteng/computer-use-and-browser-agents): Agents that operate GUIs and browsers — powerful, slow and risky. - [Coding Agents](#/l/agenteng/coding-agents): Agents that read repos, edit files, run tests and open PRs — reference harnesses to study. ### AE 03: MCP & Agent Protocols - [Building MCP Servers](#/l/agenteng/building-mcp-servers): Expose tools, resources and prompts with an MCP SDK such as FastMCP. - [MCP Clients & Hosts](#/l/agenteng/mcp-clients-and-hosts): Hosts embed clients that connect 1:1 to servers, discover capabilities and invoke tools. - [MCP Advanced: Sampling, Elicitation, Roots & Auth](#/l/agenteng/mcp-advanced-sampling-elicitation-roots-and-auth): The less obvious primitives, transports and OAuth 2.1 for remote servers. - [MCP Tool Design Best Practices](#/l/agenteng/mcp-tool-design-best-practices): Design tools for agents: focused, well-described, paginated, with helpful errors. - [A2A Protocol](#/l/agenteng/a2a-protocol): An open protocol for agents to talk to other agents across vendors and frameworks. - [AG-UI, Agent Skills & AGENTS.md](#/l/agenteng/ag-ui-agent-skills-and-agents-md): Other standards: agent↔frontend events, packaged skills, repo instructions, OpenAPI tools. ### AE 04: Context & Harness Engineering - [What Context Is](#/l/agenteng/what-context-is): Everything the model sees in one call — it knows nothing else. - [Context Engineering Strategies](#/l/agenteng/context-engineering-strategies): Write, Select, Compress, Isolate — the four strategies for managing context. - [Just-in-Time Context](#/l/agenteng/just-in-time-context): Give the agent lightweight references and tools to load details only when needed. - [Context Compaction](#/l/agenteng/context-compaction): Summarize the conversation near the limit and continue with a fresh, compact context. - [Harness Engineering](#/l/agenteng/harness-engineering): The software around the model — loop, tools, permissions, sandbox, hooks, memory, verification — matters as much as the model. - [Durable Orchestration](#/l/agenteng/durable-orchestration): Run long workflows that survive crashes, restarts and deploys — resuming exactly where they stopped. ## Evals, Fine-Tuning & Model Optimization Evals are the new unit tests. Then: when and how to fine-tune, and how to make models smaller and faster. ### EVAL 01: Evaluation - [Why Evals](#/l/evals/why-evals): LLM outputs are non-deterministic and open-ended — evals tell you if a change made things better or worse. - [Types of Evals](#/l/evals/types-of-evals): Code-based, LLM-as-judge, human, pairwise, reference-based and online evals. - [Golden Datasets](#/l/evals/golden-datasets): Build an eval set from real queries, edge cases and must-refuse cases — and grow it from failures. - [LLM-as-a-Judge](#/l/evals/llm-as-a-judge): Use a strong model with a clear rubric to grade open-ended outputs — then calibrate it. - [Error Analysis](#/l/evals/error-analysis): Read real traces, categorize failures, count them, and fix the biggest category first. - [Eval Tooling & Agent Metrics](#/l/evals/eval-tooling-and-agent-metrics): Promptfoo, DeepEval, Ragas, Inspect, Braintrust, LangSmith, Langfuse, Phoenix — plus what to measure for agents. ### EVAL 02: Fine-Tuning - [Prompt vs RAG vs Fine-Tune](#/l/evals/prompt-vs-rag-vs-fine-tune): Prompt → RAG → fine-tune, in that order. Fine-tuning teaches behavior; RAG provides knowledge. - [Types of Fine-Tuning](#/l/evals/types-of-fine-tuning): Full, PEFT (LoRA/QLoRA), SFT, preference tuning (DPO/RLHF), RFT and continued pre-training. - [LoRA & QLoRA](#/l/evals/lora-and-qlora): Train tiny adapter matrices instead of billions of weights — cheap, fast and swappable. - [The Fine-Tuning Workflow](#/l/evals/the-fine-tuning-workflow): Eval set first, clean data, split, train, compare with the baseline, deploy and monitor. ### EVAL 03: Optimize & Serve - [Quantization](#/l/evals/quantization): Store weights in fewer bits — FP16 → INT8 → INT4 — to cut memory and speed up inference. - [Distillation](#/l/evals/distillation): A large teacher model labels data; a small student learns to mimic it. - [Serving Optimizations](#/l/evals/serving-optimizations): Continuous batching, FlashAttention, PagedAttention, speculative decoding, pruning and parallelism. - [Running Open Models](#/l/evals/running-open-models): Local (Ollama, LM Studio, llama.cpp), serving engines (vLLM, SGLang, TGI) and managed platforms. ## AI System Design & LLMOps Design AI systems that are fast, reliable, cheap and scalable — then deploy, observe and operate them. ### AISD 01: Architecture Building Blocks - [Reference Architecture for AI Apps](#/l/aisd/reference-architecture-for-ai-apps): Gateway, orchestrator, semantic cache, retrieval, LLM gateway, queues, tools and observability. - [Model Routing & Cascades](#/l/aisd/model-routing-and-cascades): Send each request to the most suitable model — cheap for easy tasks, powerful for hard ones. - [Fallbacks & Graceful Degradation](#/l/aisd/fallbacks-and-graceful-degradation): When a provider fails, switch automatically — and degrade gracefully if everything fails. - [LLM Gateway](#/l/aisd/llm-gateway): A central proxy between apps and all LLM providers: routing, keys, budgets, caching, logging. - [Multitenancy for AI](#/l/aisd/multitenancy-for-ai): Serve many customers safely: isolation, per-tenant limits, budgets, models and keys. ### AISD 02: Performance & Cost Levers - [TTFT & Latency Metrics](#/l/aisd/ttft-and-latency-metrics): Time to first token, time per output token, tokens/sec and end-to-end latency. - [Throughput vs Latency](#/l/aisd/throughput-vs-latency): Fast single requests versus many requests per second — batching trades one for the other. - [Semantic Caching](#/l/aisd/semantic-caching): Cache responses by meaning: similar questions return the stored answer at zero LLM cost. - [Prefix Caching by Design](#/l/aisd/prefix-caching-by-design): Keep system prompts, tools and static docs identical and first, so cached prefixes are reused. - [Token Budgets & Context Management](#/l/aisd/token-budgets-and-context-management): Limit tokens per request, per component, per run and per tenant — and manage conversations at system level. - [Provider Rate Limits & Provisioned Throughput](#/l/aisd/provider-rate-limits-and-provisioned-throughput): RPM/TPM limits per org, model and tier — throttle, queue, back off, spread, or reserve capacity. ### AISD 03: Async, Scale & Cost - [Batch Inference](#/l/aisd/batch-inference): Submit many requests as a job; results arrive later at about a 50% discount. - [Async Pipelines & Queue-Based Agents](#/l/aisd/async-pipelines-and-queue-based-agents): Decouple long AI work from requests: 202 + job ID, workers, notifications. - [Idempotent Tools](#/l/aisd/idempotent-tools): Agents and queues retry — every side-effecting tool needs an idempotency key or an “already done?” check. - [Cost per Request & the Optimization Playbook](#/l/aisd/cost-per-request-and-the-optimization-playbook): Know the full cost of a request, then apply the 10 cost levers. - [RAG vs Fine-Tuning vs Long Context](#/l/aisd/rag-vs-fine-tuning-vs-long-context): A decision guide: facts → RAG, small static corpus → long context, behavior → fine-tune. - [AI Feature SLOs, A/B Tests & Voice Architectures](#/l/aisd/ai-feature-slos-a-b-tests-and-voice-architectures): Guardrail layers, feedback loops, A/B testing, SLOs, data residency, edge inference and voice pipelines. ### AISD 04: Deployment & LLMOps - [Docker Compose for AI Stacks](#/l/aisd/docker-compose-for-ai-stacks): Run the API, worker, pgvector and Redis locally with one file. - [Kubernetes for AI Workloads](#/l/aisd/kubernetes-for-ai-workloads): Core objects plus GPU node pools, device plugins, KServe, KubeRay and LLM serving stacks. - [GPU Instances & Serverless for AI](#/l/aisd/gpu-instances-and-serverless-for-ai): Size GPUs by VRAM; use serverless for light, event-driven AI glue. - [Autoscaling AI Workloads](#/l/aisd/autoscaling-ai-workloads): Scale on queue depth, pending tokens and GPU utilization — not CPU. - [Eval Gates in CI](#/l/aisd/eval-gates-in-ci): Run evals in CI and block merges or deploys when quality drops. - [Environment Configs & Feature Flags](#/l/aisd/environment-configs-and-feature-flags): Separate dev/staging/prod settings, keep secrets in a vault, and toggle AI features at runtime. - [Prompt & Model Versioning](#/l/aisd/prompt-and-model-versioning): Version prompts like code, pin exact model versions, and keep a registry. - [Canary, Shadow & Rollbacks](#/l/aisd/canary-shadow-and-rollbacks): Expose changes to a small slice first, test silently with shadow traffic, and roll back in minutes. - [The LLMOps Lifecycle](#/l/aisd/the-llmops-lifecycle): Design → build → offline evals → CI gate → canary → monitor → collect failures → improve. ### AISD 05: Observability & Operations - [LLM Tracing with OpenTelemetry](#/l/aisd/llm-tracing-with-opentelemetry): One trace per request, spans for retrieval, rerank, LLM calls, tools and guardrails. - [AI Dashboards & Alerts](#/l/aisd/ai-dashboards-and-alerts): Traffic, latency, errors, cost, quality, agents and cache dashboards — with alerts that matter. - [Drift, Feedback & the Data Flywheel](#/l/aisd/drift-feedback-and-the-data-flywheel): Query drift, model drift and feedback loops that keep AI quality improving. - [Incident Response for AI](#/l/aisd/incident-response-for-ai): Kill switches, fallback modes and runbooks for outages, injection, leaks and cost runaways. ### AISD 06: Practice Design Questions - [Design: Support Chatbot for 10M Users](#/l/aisd/design-support-chatbot-for-10m-users): RAG over 50k docs, routing, caching, handoff and cost control at scale. - [Design: Multi-Tenant Chat-with-Docs SaaS](#/l/aisd/design-multi-tenant-chat-with-docs-saas): Per-tenant ingestion, isolation, ACLs, budgets and customization. - [Design: LLM Gateway for 5,000 Engineers](#/l/aisd/design-llm-gateway-for-5-000-engineers): Unified API, keys, budgets, routing, caching, redaction and observability for a whole company. - [Design: Invoice Processing Pipeline (1M docs/month)](#/l/aisd/design-invoice-processing-pipeline-1m-docs-month): High-volume extraction with OCR, structured outputs, validation, HITL and batch economics. - [Design: AI Voice Agent for a Call Center](#/l/aisd/design-ai-voice-agent-for-a-call-center): Low-latency STT → LLM → TTS, barge-in, tools, handoff and compliance. - [Design: Coding Agent That Opens PRs](#/l/aisd/design-coding-agent-that-opens-prs): Sandboxed execution, repo context, verification, permissions and review. ## AI Security & Responsible AI Natural language becomes code: injection, jailbreaks, OWASP LLM Top 10, guardrails, agent authorization, red teaming and compliance. ### SEC 01: Threats - [AI Threat Landscape & the Lethal Trifecta](#/l/security/ai-threat-landscape-and-the-lethal-trifecta): Anything the model reads can try to control it — break the dangerous combination of capabilities. - [Prompt Injection](#/l/security/prompt-injection): Users craft input to override the system’s instructions. - [Indirect Prompt Injection](#/l/security/indirect-prompt-injection): Malicious instructions hidden in content the model reads — pages, PDFs, emails, tool results. - [Jailbreaks](#/l/security/jailbreaks): Tricks that bypass a model’s safety training — role-play, encodings, many-shot, multi-turn escalation. - [OWASP Top 10 for LLM Applications](#/l/security/owasp-top-10-for-llm-applications): The ten most critical LLM risks (2025) — a checklist for every review. - [Data Poisoning](#/l/security/data-poisoning): Attackers insert malicious data into training sets, fine-tuning data or the RAG knowledge base. ### SEC 02: Defenses - [Input Guardrails](#/l/security/input-guardrails): Checks before the LLM: topics, injection/jailbreak detection, PII, length, language, file scanning. - [Output Validation](#/l/security/output-validation): Checks after the LLM: schemas, allow-lists, groundedness, secrets, toxicity, escaping and URL filtering. - [PII Redaction](#/l/security/pii-redaction): Detect and mask personal data before it reaches LLMs, logs or third parties. - [Data Leakage Prevention](#/l/security/data-leakage-prevention): Stop cross-user data exposure, memorization, prompt leakage, log leaks, vendor retention and tool exfiltration. - [Content Moderation](#/l/security/content-moderation): Filter harmful content in inputs and outputs, with policies per audience. ### SEC 03: Agent & Tool Security - [Least-Privilege Tools](#/l/security/least-privilege-tools): Give agents only the minimum permissions they need — nothing more. - [Tool Sandboxing](#/l/security/tool-sandboxing): Run agent-generated code and commands in isolated environments. - [Secrets Management for AI](#/l/security/secrets-management-for-ai): Never put keys in code, prompts or context — tools fetch credentials server-side. - [Agent Authorization](#/l/security/agent-authorization): Agents act on behalf of users with the user’s permissions (or fewer) — never a super-user’s. - [Human Approval for High-Impact Actions](#/l/security/human-approval-for-high-impact-actions): Require confirmation for irreversible or high-impact actions — without causing approval fatigue. - [RAG Access Control](#/l/security/rag-access-control): Users must only retrieve documents they are allowed to see — enforced at query time. - [MCP Server Trust](#/l/security/mcp-server-trust): Malicious servers, tool poisoning, rug pulls, shadowing and over-broad scopes — and how to defend. ### SEC 04: Operate & Govern - [Audit Logs](#/l/security/audit-logs): Immutable records of who (user + agent) did what, when, with which tool, arguments and result. - [Abuse Rate Limiting & Denial-of-Wallet](#/l/security/abuse-rate-limiting-and-denial-of-wallet): Per-user/IP/key limits on requests and tokens, bot detection, spend anomalies and budgets. - [Red Teaming](#/l/security/red-teaming): Attack your own AI system — manually and automatically — before attackers do. - [Responsible AI & Compliance](#/l/security/responsible-ai-and-compliance): Fairness, explainability, transparency, and regulations like the EU AI Act, GDPR, DPDP and ISO/IEC 42001. ## AI Solution Architect Turn business problems into safe, cost-effective, maintainable AI solutions — framing, platforms, NFRs, patterns, ADRs, FinOps, governance and adoption. ### ARC 01: Framing the Problem - [AI Engineer vs AI Solution Architect](#/l/architect/ai-engineer-vs-ai-solution-architect): Engineers make it work well; architects decide whether, how, at what cost and with what risk. - [Problem Framing & Use-Case Selection](#/l/architect/problem-framing-and-use-case-selection): Start from the business problem, question whether AI is needed, and prioritize by value × feasibility × risk. - [Build vs Buy vs Partner](#/l/architect/build-vs-buy-vs-partner): SaaS copilots, building on AI platforms, or building from scratch/self-hosting. - [Model Selection Framework](#/l/architect/model-selection-framework): Shortlist, run your own eval set, compare quality vs cost vs latency, then pick a primary and a fallback. ### ARC 02: Designing the Solution - [Cloud AI Platforms Compared](#/l/architect/cloud-ai-platforms-compared): Azure, AWS, GCP and others — know at least one deeply. - [Non-Functional Requirements for AI](#/l/architect/non-functional-requirements-for-ai): Performance, availability, scalability, cost, quality, security/compliance and maintainability targets. - [Architecture Patterns Catalog](#/l/architect/architecture-patterns-catalog): Prompt chains, RAG, agentic RAG, tool agents, multi-agent, document pipelines, copilots, text-to-SQL, voice and event-driven AI. - [C4 Diagrams & ADRs](#/l/architect/c4-diagrams-and-adrs): C4 context/container/component diagrams, sequence and data-flow diagrams, and Architecture Decision Records. ### ARC 03: Business, Governance & Adoption - [Cost Modeling & FinOps for AI](#/l/architect/cost-modeling-and-finops-for-ai): Model users × requests × tokens × price, compare API vs PTU vs self-hosting, and show ROI. - [Governance & Responsible AI Programs](#/l/architect/governance-and-responsible-ai-programs): AI policy, risk tiers, model inventory, approval boards, oversight, bias testing and vendor risk. - [Data Strategy for AI](#/l/architect/data-strategy-for-ai): Quality, ownership, connectors, permission syncing, lakehouses, contracts and lineage. - [Integration & Enterprise Architecture](#/l/architect/integration-and-enterprise-architecture): Identity, API management, event buses, iPaaS, ERP/CRM, legacy systems and network security. - [Change Management & Adoption](#/l/architect/change-management-and-adoption): Pilot → measure → scale. Most AI projects fail on adoption and data, not models. - [Communication & Staying Current](#/l/architect/communication-and-staying-current): Explain trade-offs to executives, run reviews, manage risk — and keep learning as the field changes monthly. ## Roadmap phases - Phase 0 — Prerequisites (2–4 weeks): Programming (Python first, TypeScript second), Git & GitHub, Linux & Command Line, Math Intuition, Machine Learning Basics, Data Formats - Phase 1 — Backend Engineering Foundations (3–4 weeks): HTTP & REST, API Design, Authentication — JWT & OAuth, PostgreSQL, Indexes, Transactions, Redis Caching, Rate Limiting, Message Queues, Webhooks, Idempotency, Retries & Exponential Backoff, Timeouts, WebSockets & SSE, Docker, CI/CD, Logging, Metrics & Alerts, Load Balancing, Other Backend Essentials - Phase 2 — LLM Fundamentals & Core Concepts (≈ 2 weeks): What is an LLM?, Tokenization, Transformers, Self-Attention, Inference, Context Window, KV Cache, Temperature & Top-p, System Prompts, Few-shot Prompting, Structured Outputs, Function Calling, Reasoning Models, Chain-of-Thought, Hallucinations, Prompt Caching, Token Pricing, Multimodal Input, Streaming, Fine-tune vs Prompt, LoRA, Quantization, Distillation, Other LLM Concepts - Phase 3 — Prompt Engineering (≈ 1 week): What is Prompt Engineering?, Core Principles, Prompt Template Example, Techniques, Prompt Anti-Patterns, Prompt Management - Phase 4 — Embeddings, Vector DBs & RAG (4 weeks): Embeddings, Cosine Similarity, What is RAG?, Document Parsing, Chunking, Vector Database, pgvector, HNSW Index, Metadata Filters, BM25 (Keyword Search), Hybrid Search, Reranking, Query Rewriting, HyDE, Contextual Retrieval, Parent-Child Chunks, Citations, GraphRAG, Agentic RAG, Other RAG Patterns, Retrieval Evaluation Metrics - Phase 5 — AI Agents (≈ 2 weeks): What is an AI Agent?, Tool Calling, The Agent Loop, ReAct, Planning, Reflection, Short-term Memory, Long-term Memory, Multi-Agent Handoffs, Orchestrator-Worker, State & Checkpoints, Human-in-the-Loop, Stop Conditions, Error Recovery, Agent Frameworks, Computer Use & Browser Agents, Coding Agents, Agent Evals - Phase 6 — MCP & Agent Protocols (≈ 1 week): MCP (Model Context Protocol), MCP Building Blocks, MCP Servers, MCP Clients, MCP Best Practices, A2A Protocol, Other Protocols & Standards - Phase 7 — Context Engineering & Harness Engineering (≈ 1–2 weeks): What is “Context”?, Context Engineering, Building Blocks of Context, Write · Select · Compress · Isolate, Just-in-Time Context, Context Compaction, Context Management Checklist, Harness Engineering, Durable Orchestration - Phase 8 — Evals (Evaluation) (2 weeks): Why Evals?, Types of Evals, Building an Eval Set, What to Measure, LLM-as-a-Judge Tips, Error Analysis, Tools, Example: Promptfoo Config - Phase 9 — Fine-Tuning & Model Optimization (2–3 weeks): When to Fine-Tune, Types of Fine-Tuning, The Fine-Tuning Workflow, Model Optimization for Serving, Running Open Models - Phase 10 — AI System Design (≈ 2 weeks): Reference Architecture, Model Routing, Fallbacks, Semantic Caching, Prefix Caching, Token Budgets, Streaming Responses, TTFT & Latency Metrics, Throughput vs Latency, LLM Gateway, Provider Rate Limits, Batch Inference, Async Pipelines, Multitenancy, RAG vs Fine-Tuning vs Long Context, Context Management (System Level), Queue-Based Agents, Idempotent Tools, Observability (AI-specific), Cost per Request, Cost Optimization Playbook, Other System Design Topics, Practice System-Design Questions - Phase 11 — AI Security (≈ 1–2 weeks): Threat Landscape, Prompt Injection, Indirect Prompt Injection, Jailbreaks, OWASP Top 10 for LLM Apps, Input Guardrails, Output Validation, PII Redaction, Data Leakage, Least-Privilege Tools, Tool Sandboxing, Secrets Management, Agent Authorization, Human Approval, RAG Access Control, MCP Server Trust, Data Poisoning, Content Moderation, Audit Logs, Abuse Rate Limiting, Red Teaming, Responsible AI & Compliance - Phase 12 — Deployment & LLMOps (≈ 1–2 weeks): Docker, Docker Compose, Kubernetes Basics, GitHub Actions, Eval Gates in CI, Environment Configs, Infrastructure as Code, Serverless Functions, GPU Instances, Autoscaling, Load Balancing, Canary Releases, Feature Flags, Prompt Versioning, Model Versioning, Rollbacks, LLMOps Lifecycle Summary - Phase 13 — Observability & Operations (≈ 1 week): Three Pillars + AI, LLM Tracing, Key Dashboards, Alerts, Drift & Feedback, Incident Response for AI - Phase 14 — AI Solution Architect Track (ongoing): AI Engineer vs AI Solution Architect, Problem Framing & Use-Case Selection, Build vs Buy vs Partner, Model Selection Framework, Cloud AI Platforms, Non-Functional Requirements, Architecture Patterns Catalog, Architecture Documentation, Cost Modeling & FinOps, Governance & Responsible AI, Data Strategy, Integration & Enterprise Architecture, Change Management & Adoption, Communication Skills, Staying Current - Phase 15 — Hands-On Projects (ongoing): CLI chatbot with streaming & cost counter, Structured extractor (invoices/resumes → JSON), “Chat with your PDFs” (FastAPI + pgvector + citations), Hybrid search + reranker + eval suite, MCP server for your company’s API, Research agent (orchestrator + workers), Support agent with human approval + durable workflow, LLM gateway (routing, fallback, cache, budgets), Red-team & harden your RAG bot, Fine-tune a small model (LoRA), Production capstone (multi-tenant RAG + agent SaaS)