# AI Engineering
AI engineering is the discipline of building applications on top of readily available foundation models ([[Large Language Models (LLMs)]], diffusion models, etc.) rather than training models from scratch. It emerged as a distinct field when the model-as-a-service approach lowered the barrier: you no longer need a PhD in machine learning to build AI-powered software.
AI engineering differs from traditional [[Machine Learning (ML)]] engineering in focus. ML engineering is about building and training models. AI engineering is about using existing models effectively: [[Prompt Engineering]], [[Retrieval-Augmented Generation (RAG)]], [[Context Engineering]], fine-tuning, and agent design. The skill set shifted from mathematics and data science to software engineering, systems design, and [[Context Engineering]].
The AI engineering stack typically includes:
- **Model selection and [[Model routing]]**: choosing the right model for each task
- **[[Context Engineering]]**: assembling the right information for the model
- **[[AI Retrieval Patterns]]**: RAG, [[Semantic chunking]], [[Knowledge Graph (KG)|knowledge graphs]]
- **Agent frameworks**: [[AI Agent Harness|harnesses]], [[Agentic loops]], [[AI Agent Orchestration]]
- **Evaluation**: measuring output quality, detecting [[AI Hallucination|hallucinations]], tracking costs
- **Deployment**: latency optimization, [[Token Budget]] management, [[AI Gateway|gateways]]
- **Safety**: [[AI Guardrails]], [[AI Alignment]], [[Responsible AI]]
[[Agentic Engineering]] is a subset of AI engineering focused specifically on building with coding agents. [[Vibe Coding]] and [[Vibe Engineering]] describe the spectrum of discipline applied when using these tools.
Chip Huyen's [[AI Engineering (book)|AI Engineering]] (O'Reilly, 2024) is the definitive reference, covering the full stack from model selection through deployment.
## References
- Huyen, C. (2024). *AI Engineering*. O'Reilly Media
## Related
- [[Agentic Engineering]]
- [[Context Engineering]]
- [[Large Language Models (LLMs)]]
- [[Machine Learning (ML)]]
- [[AI Agents]]
- [[AI Agent Harness]]
- [[Prompt Engineering]]
- [[Retrieval-Augmented Generation (RAG)]]
- [[AI Retrieval Patterns]]
- [[Model routing]]
- [[AI Guardrails]]
- [[AI Observability]]
- [[Vibe Coding]]
- [[Vibe Engineering]]
- [[AI Engineering (book)]]