Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

What an AI engineer does

After this lesson: I can describe what an AI engineer builds, checks and runs.

45 min lessonNo commands

Someone has to make it work

An AI engineer builds useful features on top of a language model, then proves they work. Without that proof, a clever feature can give people wrong answers.

Say a support team wants a feature that answers staff questions from the company handbook. Somebody has to build it, prove its answers are right and keep it running after launch. In many teams that person is called an AI engineer.

By the end of this lesson

Note

I can describe what an AI engineer builds, checks and runs.

Key words

WordWhat it means
Modela program trained to produce answers from examples
Featureone thing a product does for its users
Evaluationchecking answers against known cases
Eval setfixed questions with the answers you expect
Guardraila check that blocks an unsafe input or output
Monitoringwatching the numbers from a live system

The cells students fill in are left blank in this preview.

The job is build, check and run

An AI engineer rarely trains a new model. They take a model that already exists and build a feature with it. That means a prompt, some code, and often a search over the company's own documents.

Then they check it with an eval set. Last, they run it: they watch cost, speed and quality with monitoring, and fix what drifts.

A map of the skills

The job joins skills from several areas. You need enough Python to read and change code. You need to call a model from a server safely. You need to write test cases and read numbers.

Most of all, you need to explain a trade-off: what you gained, what it cost, and how you know. The table shows where each skill is taught.

Where each skill is taught

SkillWhat you do with itWhere to learn it
Python and the terminalRead, change and run codeBasics, Software engineering
Calling a model safelyKeep keys on the server, check answersCoding with AI
Testing and measuringWrite eval sets, work out accuracyMachine learning engineering
Data and logsRead a week of numbersData, DevOps
Going deeperRetrieval, agents, evals in depthThe AI lessons on the Resources page

The cells students fill in are left blank in this preview.

Try it: your own skills map

Code: python
# Rate yourself from 1 (new to it) to 5 (confident).
ratings = {
    "Python": 3,
    "Calling a model from code": 2,
    "Writing an eval set": 1,
    "Reading logs and numbers": 2,
    "Explaining a trade-off": 4,
}

TARGET = 3

for skill in ratings:
    if ratings[skill] < TARGET:
        print("Work on next:", skill)
    else:
        print("Ready:", skill)

# Change the ratings to match you, then press Run.

Most of the work is checking

A model can give a different answer to the same question on another day. So a feature is never proved by one good demo.

An AI engineer keeps an eval set: questions with the answers they expect. After every change, they run the whole set and count the right answers. The program below does that over a recorded sample.

Try it: score a recorded sample

Code: python
# A recorded sample: five questions, the answer we expect,
# and what a support feature answered in testing.
expected = ["14 days", "Friday", "Form B2", "No", "2 weeks"]
answered = ["14 days", "Monday", "Form B2", "No", "I am not sure"]

right = 0
for position in range(len(expected)):
    if expected[position] == answered[position]:
        right = right + 1
    else:
        print("Wrong on question", position + 1)

print("Right:", right, "out of", len(expected))

# Make the second answer "Friday", then press Run again.

A common mistake

Warning

Many people think an AI engineer mostly trains new models. Training a large model from nothing is research work done by very few teams. Most AI engineers build features on existing models, so they spend their time on code, eval sets and monitoring.

Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.