AI Systems & Architecture Curriculum

Comprehensive curriculum targeting Staff Android Engineers transitioning to AI Platform Architecture and Edge-to-Cloud AI Engineering.

flowchart TD subgraph ClientTier["Client / Edge Layer (Kotlin / Android)"] UI["Jetpack Compose UI"] SLM["On-Device SLM (LiteRT / Gemma 2B)"] ROUTER{"Hybrid Edge-Cloud Router"} ROOM[("Room Cache / Vector Store")] end subgraph EdgeGateway["Distributed Gateway & Caching (FastAPI / Cloud Run)"] GW["API Gateway / Auth"] SCACHE[("Semantic Cache (Redis / pgvector)")] end subgraph ReasoningTier["Agentic Orchestration & Tools"] ORCH["LangGraph State Engine"] TOOLS["Tool Execution Service"] end subgraph StorageInference["Persistence & Frontier Models"] PGVEC[("PostgreSQL + pgvector")] FRONTIER["Frontier LLM (Claude / Gemini)"] end UI --> ROUTER ROUTER -->|Low Latency / Offline| SLM ROUTER -->|Complex Query| GW GW --> SCACHE SCACHE -->|Cache Hit > 0.95| GW SCACHE -->|Cache Miss| ORCH ORCH --> PGVEC ORCH --> FRONTIER FRONTIER --> TOOLS TOOLS --> FRONTIER FRONTIER --> GW GW --> UI

Track 1: Foundation & Inference Mechanics

01. LLM API Protocols & Token Mechanics

Tokenization, context window budget sizing, temperature, top-p/top-k sampling, and asynchronous SSE response streams.

Android Analogy: Frame-budget limits in Compose; streaming SSE tokens like reactive Flow<String> payloads.
View Module →

02. Prompt & Context Engineering

Deterministic prompt templates, role separation (System/User/Assistant), few-shot conditioning, and chain-of-thought prompting.

Android Analogy: API contract specifications and Retrofit request body builders.
View Module →

03. Structured Outputs & Schema Enforcement

Validating LLM outputs with Pydantic, JSON schemas, constrained grammar decoding, and self-correction loops.

Android Analogy: Strict type serialization matching Kotlin Serialization or Moshi schemas.
View Module →

04. Embeddings & Vector Search Foundations

High-dimensional semantic vectors, cosine similarity, Euclidean distance, chunking strategies, and token overlap.

Android Analogy: Room FTS4/SQLite indexing, but operating on geometric coordinate space.
View Module →

Track 2: Retrieval & Relational Vectors

05. Production RAG Architecture

End-to-end ingestion, bi-encoder retrieval vs. cross-encoder reranking, and dynamic prompt envelope assembly.

Android Analogy: Offline-First Repository Pattern coordinating local Room caches and remote APIs.
View Module →

06. Vector Databases: PostgreSQL + pgvector

Schema setup, HNSW vs. IVFFlat indexing trade-offs, distance operators, and hybrid metadata pre-filtering.

Android Analogy: Room custom type converters and native SQLite query planner optimization.
View Module →

Track 3: Agentic Workflows & Serving Systems

07. Function Calling & Tool Execution

JSON schema tool declarations, multi-turn tool loops, sandboxed execution, and parallel tool dispatching.

Android Analogy: Android Intent resolution and deep-link command dispatching.
View Module →

08. Agentic Workflows & State Machines (LangGraph)

Cyclic agent graphs, state checkpointing, human-in-the-loop approvals, and conditional state reduction.

Android Analogy: Reactive MVI state reducers and lifecycle-aware WorkManager orchestration.
View Module →

09. Asynchronous AI Serving with FastAPI & Cloud Run

ASGI event loops, SSE streaming protocols, client socket disconnect handling, and Cloud Run scaling.

Android Analogy: Thread concurrency management via Kotlin Coroutines Dispatchers.IO.
View Module →

10. AI Evaluation & System Observability

The RAG triad (Faithfulness, Relevance, Precision), latency anatomy (TTFT vs. ITL), and LLM-as-a-Judge test gates.

Android Analogy: Unit/UI integration suites, Sonar quality gates, and Firebase Crashlytics.
View Module →

Track 4: Edge AI & Systems Architecture

11. Edge AI & On-Device Small Language Models

Running quantized SLMs (Gemma 2B / Llama 3.2) locally via LiteRT & MediaPipe, NPU acceleration, and hybrid edge-cloud routing.

Android Analogy: Offline Room database serving immediate UI state while background sync handles remote data.
View Module →

12. AI System Design, Semantic Caching & Cost Architecture

Semantic caching with vector distance thresholds, prompt KV-cache reuse, token bucket rate limiters, and PEFT/LoRA vs. RAG matrices.

Android Analogy: HTTP OkHttp cache interceptors, memory LRU caches, and network throttle policies.
View Module →

Progressive Engineering Glossary

AI Concept System Definition Mobile / Systems Equivalency
Token Sub-word text chunks used by LLMs to compute probabilities (~0.75 words). Byte buffer allocation or payload serialization packets.
Embedding A dense vector representation capturing semantic meaning in N-dimensional space. A deterministic hash code mapping semantic similarity rather than collision avoidance.
RAG Retrieval-Augmented Generation: dynamic grounding of LLM prompts via external search. Local database lookup before executing a remote backend fetch.
Quantization (INT4 / INT8) Compressing model weights from FP32/FP16 floats to 4-bit/8-bit integers to fit in edge RAM. Image bitmap subsampling (inSampleSize) and Proguard dead-code shrinking.
Semantic Cache Caching query-response pairs keyed by vector cosine similarity rather than exact string hashing. OkHttp cache interceptor with fuzzy semantic key evaluation.
Stateful Agent An LLM looped within an iterative graph that mutates state across intermediate turns. A reactive MVI State Machine managing UI and side-effects.

Primary Sources & Standards