AI AI Engineering

AI Engineering: Putting It All Together

What you will learn

How to set up your own AI development environment, choose the right model, and build a daily workflow for crafting and improving prompts.

Your setup

You already have everything you need:

  • This Code Tutor runs on your machine at localhost:8000 — connected to your OpenCode Go deepseek-v4-flash key in .env
  • The AI Tutor panel on every lesson page is a real API-powered assistant using the same patterns this course teaches
  • You can use it right now to ask any question about AI engineering

Choosing a model

If you need... Pick... Notes
Speed + good quality DeepSeek V4 Flash, GPT-4o Mini, Claude Haiku Fast, cheap, good for most tasks
Maximum reasoning GPT-4o, Claude Sonnet, DeepSeek R1 Slower but better at complex tasks
Long documents (>100K tokens) Gemini 1.5 Pro, Claude Sonnet Huge context windows
Code generation Claude Sonnet, GPT-4o, DeepSeek Coder Best at code
Deterministic output Any model, temperature=0 Use for structured data extraction

Daily workflow

  1. Write the prompt — use the anatomy from Lesson 2: role, task, context, format
  2. Test with 3–5 examples — does it work for the simplest cases?
  3. Find edge cases — what breaks it? Add those to your test set
  4. Iterate — change one thing at a time, run your test set, compare
  5. Lock in — when it's good enough, commit the prompt to version control
  6. Monitor — track latency, error rate, user feedback in production

Practical checklist before deploying

[ ] API key in .env (not in source code)
[ ] .env is in .gitignore
[ ] Rate-limit handling with retry
[ ] Fallback model configured
[ ] Logging (tokens, latency, errors — NOT raw PII)
[ ] Test set with at least 10 examples
[ ] System prompt has guardrails against hallucination
[ ] Output validation (check response format before showing to user)
[ ] Monitoring dashboard or alerts
[ ] Human-in-the-loop for high-stakes decisions
[ ] Data retention / deletion policy
[ ] This course taught you how to evaluate and iterate

The AI tutor on this site

The tutor panel next to every lesson is itself an AI system. You can practice what you've learned:

  • Try crafting specific prompts — compare how the tutor responds to vague vs precise questions
  • Notice when the tutor hallucinates or misses context — that's the "lost in the middle" effect
  • The tutor has a 15-question limit (configurable in .env as TUTOR_QUESTION_LIMIT) — that's rate limiting in action
  • Fallback: if the API key is missing or the provider is down, the tutor returns a clear error — handled with try/except

Where to go next

Quick check below!