AITraining2U

Programs

Resources

Case Studies

Quick Links

Enquire Now
AI Engineering

The AI Engineering Fundamentals Nobody Gets to Skip

Nobody stalls on a production AI project because they misunderstood attention heads. They stall because of an environment mismatch, a leaked API key, or code that only exists on one laptop.

By Marcus Chia 2026-08-04 10 min read
Developer writing Python code for an AI system

I have watched a lot of capable people get stuck moving from "I built something in a notebook" to "it runs in production." Almost none of them got stuck on the AI part.

They got stuck because the code only existed on one laptop. Because the API key was committed to the repo. Because it worked locally and died in the container with a dependency error. Because there was no way to roll back when the prompt change made things worse.

These are software engineering problems. They are boring. They are also exactly why most AI pilots do not reach production.

Python — the parts that matter for AI work

You do not need to be a Python expert. You need a specific, fairly narrow subset:

  • Data structures and comprehensions — you will spend most of your time reshaping JSON responses. Dicts, lists, and comprehensions are the daily tools.
  • Async and concurrency — this one is not optional. LLM calls take seconds. Making twenty of them sequentially takes a minute; making them concurrently with asyncio.gather takes seconds. The difference between a usable and unusable system is often just this.
  • Type hints and Pydantic — models return unstructured text and you need structured data. Pydantic models give you validation, useful errors, and a schema you can hand to the model for structured output. This single library removes an enormous category of bug.
  • Error handling and retries — APIs rate-limit, time out, and return malformed JSON. Exponential backoff with jitter is table stakes, not an optimisation.
  • Virtual environmentsuv or venv. "Works on my machine" is nearly always a dependency-isolation failure.

REST APIs — you are an API consumer first

Nearly all AI engineering is calling somebody's HTTP API and handling what comes back. What you need to actually understand:

  • Status codes as control flow — 429 means back off and retry; 400 means your request is wrong and retrying will not help; 500 means retry with backoff. Treating all errors identically produces systems that hammer a rate-limited endpoint until they are banned.
  • Authentication and key handling — keys go in environment variables or a secrets manager. Never in code, never in a notebook you will share, never in the repo. Rotate them.
  • Streaming responses — server-sent events. The difference between a UI that feels instant and one that appears frozen for eight seconds.
  • Timeouts — always set them explicitly. A hung request with no timeout will eventually take down a worker pool.
  • Idempotency — if a request times out, did it actually run? For anything that costs money or changes state, this question needs a real answer.

Git — the discipline that makes prompts reviewable

Git matters more in AI work than in conventional software, for a reason that is not obvious at first: prompts are code.

A prompt change alters system behaviour as surely as a logic change. If prompts live in a Google Doc, or hardcoded inline with no history, then you cannot answer "what changed on Tuesday when quality dropped?" — and you cannot roll back.

Keep prompts in version control as files. Review prompt changes in pull requests. Tag versions and record which version produced which output in your traces. This is the connective tissue between Git and observability, and it is what lets you correlate a behaviour change to a specific commit.

Beyond that: branching, meaningful commit messages, pull requests, and the ability to revert. Nothing exotic.

Cloud basics — enough to deploy and not overspend

  • Containers — Docker. Package the app with its dependencies so the environment is identical everywhere. This eliminates the largest single category of deployment failure.
  • Secrets management — cloud-native secret stores, not environment files checked into the repo.
  • Networking fundamentals — enough to reason about why a service cannot reach a database, and about egress when your compliance team asks where prompt data travels.
  • Cost model — AI workloads have a genuinely unusual cost profile: usage-based, spiky, and easy to accidentally 10x with a retry loop. Set budget alerts before your first production deploy.
  • Data residency — for Malaysian teams under PDPA, and especially in financial services under BNM RMiT expectations, knowing which region processes your data is a compliance requirement rather than an architectural preference.

What you can safely skip

Worth saying explicitly, because people burn months here: you do not need to be able to derive backpropagation, implement a transformer from scratch, or train a model. Those are ML research skills. AI engineering is systems engineering applied to probabilistic components.

Understand tokenisation, context windows, temperature, and why models hallucinate — conceptually. Skip the mathematics unless you are doing research.

A realistic learning path

  1. Weeks 1–2 — Python: async, Pydantic, error handling. Build a script calling an LLM API with retries and structured output.
  2. Weeks 3–4 — Wrap it in FastAPI. Add streaming. Containerise it with Docker.
  3. Weeks 5–6 — Git discipline: prompts as versioned files, PR review, tagged releases. Deploy the container somewhere real.
  4. Weeks 7–8 — Add evaluation and tracing. Now you have a system rather than a script.

Eight weeks of unglamorous work puts you ahead of a substantial share of people currently calling themselves AI engineers — because the fundamentals are what most people skipped on the way to the interesting part.

Our AI Engineering programme covers this foundation and the production stack built on top of it — HRD Corp SBL-KHAS claimable for eligible Malaysian employers.

Frequently Asked Questions

No. AI engineering is systems engineering applied to probabilistic components — you are consuming models through APIs, not training them. Understand tokenisation, context windows, temperature and why models hallucinate at a conceptual level. You do not need to derive backpropagation or implement a transformer. Those are ML research skills and pursuing them delays the work that actually gets systems into production.

Async and concurrency first — LLM calls take seconds, and making twenty sequentially versus concurrently is often the difference between a usable and unusable system. Then Pydantic for validating unstructured model output into structured data, error handling with exponential backoff and jitter for rate limits and timeouts, comprehensions for reshaping JSON, and virtual environment discipline. That subset covers the vast majority of daily work.

Because prompts are code. A prompt change alters system behaviour as surely as a logic change does, but teams routinely keep prompts in Google Docs or hardcoded inline with no history. When quality drops on Tuesday you cannot answer what changed, and you cannot roll back. Keep prompts as versioned files, review changes in pull requests, tag versions, and record which prompt version produced which output in your traces.

Roughly eight weeks of focused part-time work for someone with some programming background: two weeks on Python (async, Pydantic, error handling), two weeks wrapping it in FastAPI with streaming and Docker, two weeks on Git discipline and a real deployment, and two weeks adding evaluation and tracing. That sequence produces a working system rather than a notebook, which is the actual gap most people are stuck in.

Yes. AITraining2U's AI Engineering programme is registered with HRD Corp and claimable under the SBL-KHAS scheme for eligible Malaysian employers. It covers the fundamentals layer alongside the production stack — retrieval, evaluation, observability, guardrails and deployment — and can be delivered as a closed in-house cohort using your own systems and data.

Build AI systems that hold up in production

Evaluation, observability and guardrails are what separate a demo from a system your business can depend on. AITraining2U runs hands-on, HRD Corp SBL-KHAS claimable AI training for Malaysian organisations — tool-agnostic and mapped to your actual stack.