AI Engineering
AI Engineering for Developers
A staged roadmap for working developers: model APIs, prompt design, retrieval, evaluation, and shipping AI features responsibly.
This path is for working software developers who can already ship ordinary features and now need to ship features backed by a language model. It takes you from calling a model API for the first time to deploying an AI feature you can test, monitor, and defend. No machine learning background is assumed — you will be consuming models, not training them. The stages build on each other: each adds one layer of engineering discipline that most first AI features are missing. If your Python itself is shaky, start with the Python for AI: Beginner Roadmap instead.
Stage 1: Call model APIs with discipline
Every provider exposes roughly the same shape: send text and parameters, receive generated text, pay per token.
- Learn the core request anatomy — system instructions, user messages, temperature, and maximum output length — and what each knob actually changes. Ground your mental model first with Large Language Models Explained Simply; it explains why outputs vary between identical calls.
- Treat the API like any flaky external dependency: set timeouts, handle rate limits, retry with backoff, and log token usage from day one, because cost surprises arrive fast.
- Use the models hub to compare current model families on capability, context size, and price before you hard-code a choice — and keep the model name in configuration, not code.
- Milestone: a small script or endpoint that calls a model, handles failure gracefully, and reports what each call cost.
Stage 2: Prompt design for applications
Prompts inside an application are not chat messages; they are templates that must work across thousands of unpredictable inputs.
- Study the structural techniques in Prompt Engineering First Principles: role and context, explicit output format, examples of good output, and clear boundaries on what the model should refuse.
- Learn to request structured output your code can parse, and to validate it — models will occasionally break the format no matter how firmly you ask. The Prompt Patterns Cheat Sheet collects reusable templates.
- Version your prompts like code. A prompt change is a behavior change and deserves the same review.
- Milestone: a prompt template that survives adversarial input — empty strings, wrong languages, injection attempts — without derailing your feature.
Stage 3: Retrieval-augmented generation basics
Models know nothing about your private data and nothing after their training cutoff. Retrieval-augmented generation, or RAG, closes that gap: search your own documents first, then hand the relevant passages to the model along with the question.
- Learn the pipeline conceptually: split documents into chunks, convert chunks to embeddings, store them in a vector index, retrieve the closest matches at query time, and include them in the prompt.
- Embeddings are the load-bearing choice. The Embedding Models Cheat Sheet compares current options and explains the trade-offs between dimension size, cost, and retrieval quality.
- Start embarrassingly simple — a few dozen documents, no framework — so you understand every step before adopting tooling.
- Milestone: a question-answering demo over your own documents that cites which chunks it used.
Stage 4: Evaluation and testing
The hardest shift for developers: AI features do not have deterministic right answers, so classic assertions are not enough.
- Build a small evaluation set of realistic inputs with graded expected outputs, and run it on every prompt or model change — the AI equivalent of a regression suite.
- Combine cheap automated checks (format validity, required facts present, banned content absent) with periodic human review of samples.
- Track quality, latency, and cost per request in production; a model upgrade that improves quality but triples cost is a decision, not a win.
- Milestone: you can answer "did last week's prompt change make things better or worse" with data instead of vibes.
Stage 5: Deployment and responsibility
Shipping means owning the failure modes.
- Design fallbacks for uncertain or failed generations: degrade to a simpler experience, show the model's sources, or route to a human — never present unverified output as fact.
- Work through the Responsible AI Checklist before launch: privacy of user data sent to providers, disclosure that users are seeing AI output, and a channel for reporting bad results.
- Verification habits from How to Verify AI Answers apply doubly when your code repeats a model's claims to thousands of users.
- Milestone: an AI feature in production with monitoring, a documented fallback path, and an owner for when it misbehaves — which, eventually, it will.