AI Engineer 101

A practical guide to becoming an AI engineer β€” from Python tooling to production LLM systems.

Why I Wrote This Series

I came to AI engineering from a software engineering background. I knew how to build APIs, write tests, deploy containers β€” but when I started building systems that used LLMs, embeddings, and vector search, I realized the gap between "software engineer who uses AI APIs" and "AI engineer who builds reliable AI systems" was bigger than I expected.

The hard part wasn't calling an API. It was knowing how tokens actually work so I could debug why my prompts were getting truncated. It was understanding embeddings well enough to know why my retrieval was returning irrelevant results. It was learning to evaluate AI outputs when there's no single "correct" answer.

This series documents what I learned building AI-powered systems in my own projects β€” a RAG service over my personal knowledge base, an LLM-powered DevOps agent, and various automation tools. Every code example runs. Every pattern comes from something I actually built and debugged.

No fake product scenarios. No "imagine you're building a chatbot for a Fortune 500 company." This is what AI engineering looks like when you're building it yourself.


How This Fits with Other Series

Series
Focus

AI Engineer 101 (this)

The full picture β€” role, tooling, LLMs, embeddings, prompts, APIs, eval, production

Deep dive into building FastAPI services with Claude

End-to-end retrieval-augmented generation with pgvector

Building a single agent with ReAct, memory, and tool use

Tensors, autograd, neural networks from scratch

Using pre-trained models and fine-tuning

Read this series first if you're transitioning from software engineering to AI engineering. The other series go deeper on specific topics.


What You Will Learn

Part 1: What is an AI Engineer?

  • The AI engineer role β€” how it differs from ML engineer and data scientist

  • The skills map: software engineering + AI fundamentals + system thinking

  • Where AI engineers fit in a team

  • My path from DevOps/backend engineering to AI engineering

Part 2: Python Tooling for AI Engineers

  • Why Python dominates AI engineering (and where it doesn't)

  • Project structure with pyproject.toml, uv, and virtual environments

  • The essential library stack: FastAPI, Pydantic, httpx, sentence-transformers

  • Setting up a reproducible AI development environment

Part 3: How LLMs Work β€” What AI Engineers Need to Know

  • Tokens, context windows, and why they matter for your code

  • The transformer architecture in plain language

  • Temperature, top-p, and sampling β€” what the parameters actually do

  • Local models vs API models β€” when to use which

  • What embeddings actually represent and why they're useful

  • Generating embeddings with sentence-transformers and API providers

  • Vector similarity: cosine, dot product, Euclidean distance

  • Storing and querying vectors with pgvector

Part 5: Prompt Engineering for Production Systems

  • Why prompt engineering is software engineering, not guesswork

  • System prompts, few-shot examples, and structured output

  • Prompt templates with Pydantic validation

  • Defensive prompting: handling edge cases and adversarial input

Part 6: Building AI-Powered APIs with FastAPI

  • Designing REST endpoints for LLM-backed services

  • Streaming responses with Server-Sent Events

  • Async patterns for concurrent LLM calls

  • Rate limiting, retry logic, and cost control

Part 7: Evaluating and Testing AI Systems

  • Why traditional testing doesn't work for AI outputs

  • Building evaluation datasets from your own usage

  • Automated evaluation with LLM-as-judge

  • Regression testing when you change models or prompts

Part 8: AI Engineering in Production

  • Observability for LLM systems: latency, token usage, cost tracking

  • Guardrails and content filtering

  • Caching strategies for embedding and LLM responses

  • When to use a framework vs building from scratch


Prerequisites

  • Python 3.11+ (we use 3.12 features throughout)

  • Familiarity with FastAPI and async/await

  • A GitHub Models API key or OpenAI/Anthropic API key

  • Basic understanding of REST APIs and JSON

If you've read Python 101 and REST API 101, you're ready.


Stack

Layer
Technology

Language

Python 3.12

API Framework

FastAPI

Data Validation

Pydantic v2

HTTP Client

httpx

Embeddings

sentence-transformers / GitHub Models API

Vector Store

PostgreSQL 16 + pgvector

LLM Providers

GitHub Models API, OpenAI, Anthropic

Testing

pytest + pytest-asyncio

Package Management

uv


Series Structure

Phase 1 β€” Foundations

Part
Title

What is an AI Engineer?

Python Tooling for AI Engineers

Phase 2 β€” Core AI Concepts

Part
Title

How LLMs Work β€” What AI Engineers Need to Know

Embeddings and Vector Search

Phase 3 β€” Building AI Systems

Part
Title

Prompt Engineering for Production Systems

Building AI-Powered APIs with FastAPI

Phase 4 β€” Production Readiness

Part
Title

Evaluating and Testing AI Systems

AI Engineering in Production

Last updated