Chapter 1: Introduction to Building AI Applications
+-------------------------------------------------------------------------------+
| THE MODERN AI APP STACK |
+-------------------------------------------------------------------------------+
| Application Layer | UI, Chat interfaces, Copilots, API Gateway |
| Orchestration Layer | RAG pipelines, Agent frameworks (LangGraph, ReAct) |
| Context Layer | Vector DBs, Hybrid Search, Enterprise Knowledge Base |
| Foundation Model Layer| Proprietary APIs (GPT-4o, Claude) & Open Weights |
| Hardware & Serving | vLLM, TensorRT-LLM, GPUs (H100, A100), Cloud Run |
+-------------------------------------------------------------------------------+
Key Concept: What is an AI Engineer?
Chip Huyen defines the AI Engineer as the bridge between raw foundation model capabilities and practical enterprise utility.
Traditional Software Engineers write deterministic logic (if-else). Traditional ML Engineers curate labeled features and train PyTorch architectures. AI Engineers compose pre-trained foundation models into resilient, multi-step systems using prompts, retrievers, tools, and evaluations.
The Four Stages of AI Adoption in Organizations
- Stage 1: Consumer Exploration: Individual employees use web interfaces (ChatGPT, Claude.ai, Perplexity) for ad-hoc productivity.
- Stage 2: Wrapper Applications: Simple API calls wrapping foundation models with system prompts and lightweight UI.
- Stage 3: Enterprise Integration (RAG & Tooling): Connecting models to internal data lakes, CRM systems, databases, and permission models.
- Stage 4: Custom Flywheels: Fine-tuning specialized internal models on proprietary transaction logs, user interactions, and curated domain data.
The "Jagged Frontier" of AI Capabilities
A crucial insight from Chapter 1 is that foundation model capability is not smooth:
- An LLM can write complex quantum physics simulations in Python, but struggle to count the number of 'r's in "strawberry".
- Systems succeed when engineers build deterministic scaffolding (code interpreters, regex parsers, schema validators) around the model's jagged blind spots.