06-763 · L22

Lecture 22: Course overview and how this course was built

Week 12, Course wrap-up

Systems and Toolchains for AI Engineers

Systems and Toolchains for AI Engineers
06-763 · L22

The whole course, where we are

The data lowlands L1 to L7: toolchain, databases, pipelines, streams, features The machine-learning highlands L8 to L16: the ML workflow, deep learning, scientific ML, uncertainty, design, generative models The language coast L17 to L19: language models, context, agents optional, AIChE week Same mistake, different unit: split by patient in MIT-BIH, by bearing in CWRU (L12 splits by engine) Both looked strong where they were built and weaker at another hospital: validate on the population you deploy to Temperature drives both signals, so both models put temperature in first and judge what is left The alloy search took its uncertainty from a bootstrap ensemble, one of the methods in L14 fall break Thanksgiving Civil and environmental engineering: Separating temperature from damage on the Z24 bridge Cold weather moved the natural frequencies more than early damage did, so detection had to model temperature first Opens the case study, which links back to the lecturesCivil Mechanical and electrical engineering: Near-perfect bearing fault classifiers on the CWRU benchmark Accuracy near 100% fell sharply once no bearing appeared in both training and test Opens the case study, which links back to the lecturesMechanical Energy systems and policy: Forecasting electricity demand GEFCom2014: lagged temperature features, weather scenarios, and quantile forecasts scored by pinball loss Opens the case study, which links back to the lecturesEnergy Biomedical engineering: Heartbeat classification and the patient split Splitting MIT-BIH by heartbeat instead of by patient inflated the reported sensitivity Opens the case study, which links back to the lecturesBiomedical Biomedical imaging: Chest X-ray models that learned the hospital A pneumonia CNN scored well on the pooled test set and worse at a hospital it had not trained on Opens the case study, which links back to the lecturesImaging Health care analytics: Validating a deployed sepsis alert An external check of a widely used proprietary alert found AUC 0.63 and sensitivity 33% Opens the case study, which links back to the lecturesHealth care Materials science and engineering: Searching 800,000 shape memory alloys with expected improvement Expected improvement on a bootstrap ensemble found low-hysteresis alloys in 36 syntheses Opens the case study, which links back to the lecturesMaterials L1: The AI-engineering landscape and the modern toolchain The system view of ML, why engineering data is different, and the course stack: Python, uv, Git, notebooks1 L2: Reproducible environments, version control, and experiment hygiene uv lockfiles, project layout, Git for code and DVC for data, notebook to module, MLflow run logging2 L3: Relational databases and SQL for engineering time-series PostgreSQL over the Intel Lab sensor data: schemas, indexes, GROUP BY and window functions3 L4: Columnar storage, Parquet, and DuckDB Row vs column stores, Parquet row groups and predicate pushdown, DuckDB for OLAP queries4 L5: Dataframes and batch pipelines The Tennessee Eastman plant in pandas and Polars: lazy plans and pipelines that are safe to rerun5 L6: Streaming concepts and data validation Event time, windows and watermarks for late data; pandera schemas as a gate that fails loudly6 L7: Features for time-series models Lags, rolling windows and ARX regressors in Polars, fit with numpy.linalg.lstsq7 L8: The machine learning workflow I, time series Forecasting reactor pressure at several horizons, time-ordered splits and honest baselines in scikit-learn8 L9: The machine learning workflow II, regression Model families, cross-validation, capacity and learning curves on concrete strength; NARX forecasts9 L10: The machine learning workflow III, classification, tracking and search A plant fault classifier in scikit-learn, Optuna hyperparameter search, runs recorded in MLflow10 L11: Tensors, autodiff, training loops, and GPUs PyTorch tensors and autograd, a training loop by hand, devices and dtypes, four models that looked fine11 L12: Architectures for engineering data: MLP, CNN, and sequence models Matching architecture to structure: CNNs, RNNs and attention; a 1D-CNN for turbofan RUL vs a tabular baseline12 L13: Scientific machine learning: PINNs, neural ODEs and neural DAEs A PINN in JAX and Optax, a neural ODE in Diffrax and Equinox, a neural DAE with SiNDAE and Pyomo13 L14: Uncertainty quantification in machine learning Ensembles, calibration and recalibration, conformal prediction, models with uncertainty built in14 L15: Bayesian optimization A Gaussian-process surrogate and an acquisition function choose the next experiment, in BoTorch15 L16: Generative AI, learning a distribution and sampling from it A Gaussian mixture and flow matching that find every root of a cubic by conditional sampling16 L17: Large language models, what they are and how they are trained A tiny GPT: tokens, a transformer that only looks back, next-token training, sampling with temperature17 L18: Context engineering, tools, search and retrieval What the model gets to see: tools, keyword and semantic search, re-ranking18 L19: LLM agents: tools, loops, harnesses and coding agents The agent loop, the harness around it, coding agents, and how this course was built with one19 L20: Reinforcement learning, learning to act from rewards (optional) An MDP written out as a table and two matrices, value iteration, Q-learning on the tank20 L21: Deployment: serving models, containers, latency and cost (optional) FastAPI, Docker with uv, percentiles and the tail, batching, and five production incidents21 L22: Course overview and how this course was built The course in a few slides, its git history, and how to learn the next field yourself22 Presentations, day 1, Wednesday 11-18 Presentations, day 2, Monday 11-23 project presentations Guest speakers, Monday 11-30 and Wednesday 12-02 guest speakers You are here: L22 looking back N the trail, walked optional sessions side path to a case study in another field related cases, hover for what they share

Twenty-two lectures in twelve weeks. Today we look back over all of them.

Systems and Toolchains for AI Engineers
06-763 · L22

Roadmap

1The course in one picture: the four parts, and the ideas that come back
2Applications across fields: seven cases outside chemical engineering
3The interactive reviews: the knowledge graph and the system figure
4How this course was built: with an artificial intelligence (AI) assistant, guided by us
5Learning a new field quickly: a method, and how to keep learning it yourself

What you learned, where it is used, how to review it, and how to learn the next field.

Systems and Toolchains for AI Engineers
06-763 · L22

The course in one picture

Systems and Toolchains for AI Engineers
06-763 · L22

The course in one picture, four parts

L1 to L2Foundations
  • The system around the model
  • Reproducible environments
L3 to L7Data systems
  • Databases and file formats
  • Pipelines and streams
  • Features for models
L8 to L16Machine learning
  • The workflow: split, fit, score
  • Deep learning and scientific machine learning
  • Uncertainty and design of experiments
  • Generative models
L17 to L19Language models
  • How large language models work
  • Tools and retrieval
  • Agents
  • Optional L20: reinforcement learning

Each part builds on the one before. The colors are the same as in the knowledge graph.

Systems and Toolchains for AI Engineers
06-763 · L22

The course in one picture, the ideas that come back

  • Make results reproducible: lock the software versions and keep the code in Git L1L2
  • Split the data the way the model will be used: never let one unit sit on both sides L8L9L12
  • Measure, do not assume: time it and test it, because rules of thumb can be wrong L11
  • Report the uncertainty: give a range with every prediction L14L15
  • The model is a small part of the system: most of the work is in data, checks and serving L1L19
  • Check results that look right: a high score or a fluent answer can still be wrong L9L17

These ideas work in any field. The tools will change.

Systems and Toolchains for AI Engineers
06-763 · L22

Applications across fields

Systems and Toolchains for AI Engineers
06-763 · L22

Applications across fields, the seven cases ahead

  • A preview: each row is one published case study, and the next seven slides take them one at a time
Biomedical engineeringLabel each heartbeat in electrocardiogram (ECG) recordingsL9L10L12
Medical imagingFind pneumonia in chest X-raysL1L7L12
Health careWarn hospital staff early that a patient may have sepsisL1L10L14
EnergyForecast electricity demand for each hourL7L8L14
Mechanical and electricalDetect a failing bearing from its vibrationL7L10L12
CivilDetect damage in a bridge from how it vibratesL1L6L8
MaterialsChoose which new alloy to make and test nextL9L14L15

Seven fields outside chemical engineering, each using methods from this course.

Systems and Toolchains for AI Engineers
06-763 · L22

Applications across fields, biomedical engineering

Heartbeat classification ↗

Each bar is one heartbeat, colored by patient. Outlined bars are the test set. Split by beat Split by patient Patient A Patient B Patient C Patient D Patient D is new to the model, like a real new patient

Problem: Software labels each heartbeat in an electrocardiogram (ECG) as normal or abnormal.

What happened: A method scored 98.7% on patients it had already seen, but 76.3% on new patients.

Why: Each person's heartbeats look alike, so testing on known patients inflated the score.

Concepts from our course

  • L9 Split by patient: grouped cross-validation
  • L10 Precision and recall for rare classes
  • L12 Neural networks for signals

Course tools that apply here

scikit-learnPyTorch

References

Luz et al., 2016 ↗de Chazal et al., 2004 ↗

Test on new patients, the way the model will be used.

Systems and Toolchains for AI Engineers
06-763 · L22

Applications across fields, medical imaging

Chest X-rays and the hospital they came from ↗

Hospital A 34% labeled pneumonia L L L L L L red outline: pneumonia Hospital B about 1% labeled pneumonia R R R R R R red outline: pneumonia Yellow letter: the metal left/right token, placed differently by each hospital A model can read the hospital from the image, and the hospital predicts pneumonia

Problem: A neural network learned to find pneumonia in chest X-rays from two hospitals, then was tested at a third.

What happened: It did worse at the new hospital. Another network could tell which hospital took an X-ray almost every time.

Why: One hospital had far more pneumonia (34% against about 1%). Clues to the hospital, like a metal marker in the corner, can become a shortcut to the answer.

Concepts from our course

  • L12 Neural networks for images
  • L7 Leakage: an input that gives away the answer
  • L1 Test on data from a new source

Course tools that apply here

PyTorchscikit-learn

References

Zech et al., 2018 ↗

Test on a new source: a new hospital, lab or plant.

Systems and Toolchains for AI Engineers
06-763 · L22

Applications across fields, health care

A sepsis alert already in use ↗

Alert sent Missed Missed Of every three patients who had sepsis, the alert warned about one

Problem: A commercial model, used in hundreds of hospitals, warns staff that a patient may be developing sepsis, a dangerous reaction to infection.

What happened: In an independent test, it missed 2 of every 3 sepsis cases. Only 1 in 8 flagged patients had sepsis.

Why: Sepsis is rare (7% of hospital stays), so false alarms outnumber real cases. No independent test had been published before.

Concepts from our course

  • L10 Recall, precision and the alert threshold
  • L14 Calibration: does a 30% risk mean 30%?
  • L1 Good results on the developer's data are not proof

Course tools that apply here

scikit-learn metricscalibration plots

References

Wong et al., 2021 ↗

Measure a model on your own data before you trust it.

Systems and Toolchains for AI Engineers
06-763 · L22

Applications across fields, energy

Forecasting electricity demand ↗

Hour of the day Demand Line: the most likely demand Shaded: the range to plan for SCHEMATIC

Problem: Grid operators must predict electricity demand to decide which power plants to run.

What happened: In the Global Energy Forecasting Competition 2014, teams predicted a range of demand for every hour of the next month, and were scored on the whole range.

Why: Underestimating demand means too little power, so planners need to know how high demand could go.

Concepts from our course

  • L7 Lagged features: past temperature and demand
  • L8 Forecast horizons and simple baselines
  • L14 Prediction intervals

Course tools that apply here

pandasPolarsscikit-learn

References

Hong et al., 2016 ↗Hyndman and Fan, 2010 ↗North American Electric Reliability Corporation, 2025 ↗

When the extremes matter, forecast the range of possible outcomes.

Systems and Toolchains for AI Engineers
06-763 · L22

Applications across fields, mechanical and electrical engineering

Bearing faults on a public dataset ↗

100% Tested on the bearings it trained on 63% Tested on bearings it never saw Score of one network, tested two ways (50% is a coin flip)

Problem: Spot damaged motor bearings from their vibration, using a popular public dataset.

What happened: Recent papers report scores over 94%. One network scored 100% on bearings it had seen, and 63% on new ones (50% is a coin flip).

Why: The usual splits put the same bearing in training and testing, so models can learn the bearing instead of the fault.

Concepts from our course

  • L7 Features from vibration signals
  • L12 Split by bearing; compare with simple models
  • L10 Accuracy can hide missed faults

Course tools that apply here

scikit-learnPyTorch

References

Vieira et al., 2026 ↗The dataset: Bearing Data Center ↗

When a score looks near perfect, check that the test data is really new.

Systems and Toolchains for AI Engineers
06-763 · L22

Applications across fields, civil engineering

Damage or a cold night? The Z24 bridge ↗

Temperature, from −10 °C to 35 °C Natural frequency Gray: healthy bridge, much stiffer below freezing Blue: model and its confidence interval Red: after damage, below the band SCHEMATIC

Problem: Spot damage in a bridge from how it vibrates.

What happened: The Z24 bridge was monitored for a year, then damaged on purpose. Temperature changed its vibration more than the damage did.

Why: Freezing made the bridge much stiffer. So the team predicted how fast the healthy bridge should vibrate at each temperature. After the damage, it vibrated slower than predicted.

Concepts from our course

  • L1 Seasons and drift change the data
  • L6 Checks on incoming sensor data
  • L8 Model normal behavior, flag what is left over

Course tools that apply here

panderascikit-learn

References

Peeters and De Roeck, 2001 ↗Gowdridge et al., 2022 ↗KU Leuven Z24 bridge page ↗

Model what the environment does, then look for what it cannot explain.

Systems and Toolchains for AI Engineers
06-763 · L22

Applications across fields, materials science

Searching for a new alloy ↗

797,504 possible compositions 36 made in the lab, 4 per round 14 better than all earlier alloys

Problem: Find the best new metal alloy among about 800,000 options, each made and tested in a lab.

What happened: A model picked 4 alloys per round. After 9 rounds, 14 of the 36 new alloys beat the team's best earlier one.

Why: The model predicted how good each alloy would be and how sure it was, and each round picked a mix of promising and uncertain options.

Concepts from our course

  • L14 Models that report their uncertainty
  • L15 Bayesian optimization picks the next experiment
  • L9 Regression on composition

Course tools that apply here

scikit-learnBoTorch

References

Xue et al., 2016 ↗

When experiments are expensive, let the model choose the next one.

Systems and Toolchains for AI Engineers
06-763 · L22

The interactive reviews

Systems and Toolchains for AI Engineers
06-763 · L22

The interactive reviews, the knowledge graph

The knowledge graph by lecture
By lecture: each circle is a lecture; a line means one lecture's notes link to the other
The knowledge graph with Lecture 10 open
Click a lecture: its takeaways, learning objectives and applications open on the right
The knowledge graph by topic
By topic: each theme of the course, with its concepts around it
The topic view with every failure mode lit
One click lights every failure mode in the course
  • Every lecture, topic and concept in one picture
  • Click anything to see what it is and where it is taught
  • Runs in your browser, also on a phone

Open it ↗

Review the whole course in minutes, and find the lecture to go back to.

Systems and Toolchains for AI Engineers
06-763 · L22

The interactive reviews, the system figure

Lecture 1's system figure, live
Lecture 1's figure: each box is sized by the code it needs
The system figure with Data verification open
Click a box: the lectures, the tools and the case studies for that part
  • Lecture 1's figure, now interactive
  • The model, in red, is 3.7% of the area
  • Every other box is a part of the course

Open it ↗

The model is the small red box. Most of this course, and most of the work, is around it.

Systems and Toolchains for AI Engineers
06-763 · L22

The interactive reviews, how they are built

The course notesText files, one per lecture
↓
A Python scriptTurns the notes into a list of lectures, links and concepts
↓
A web pageReact and d3-force, in your browser, no server needed
The knowledge graph on a phone

The map is rebuilt from the notes on every change, so it always matches the course.

Systems and Toolchains for AI Engineers
06-763 · L22

How this course was built

Systems and Toolchains for AI Engineers
06-763 · L22

How this course was built, the process

InstructorsDesigned the course and its orderChose every dataset and exampleWrote a spec for every lectureSet the standards and the rulesPlanned the extra materialsEdited every draft, directly or via ClaudeReviewed every change, sent work backMerged every change you saw the specClaude CodeResearches the sourcesDrafts additional notes,slides, figures and extras questions ChecksRun on every change:build, links, figuresand quiz quotesa check fails: fix it MergeOnly after aninstructorapprovesinstructor asks for changes The course you usedLecture notes and slides, plus extra materials for a better class:a practice game, a course map, a clicker, case studies,narrated slides and interactive figures

For your own projects: an AI assistant drafts fast, but the design, the standards and the final review stay with you.

Systems and Toolchains for AI Engineers
06-763 · L22

How this course was built, the history

Every change was built, tested and reviewed before it reached you.

For your own projects: automatic checks that build and test every change before it goes live, for example GitHub Actions.

Systems and Toolchains for AI Engineers
06-763 · L22

How this course was built, what we added along the way

Practice and review In class Reading and help Rules Aug Sep Oct Nov Jul First class Rules file Jul 20 Practice game Aug 7 Course map Aug 8 Clicker Aug 25 Interactive figures Sep 27 Narrated slides Oct 12 Ask button Oct 28 Case studies Nov 1 Knowledge graph Nov 5
  • The extra materials kept coming all semester, added as the class needed them
  • For your own projects: ship a first version early, then improve it with feedback
Systems and Toolchains for AI Engineers
06-763 · L22

How this course was built, a week ahead, as it felt

July 20THE PLAN26 lecturesA1 to A11 + miniproject2 mini-project daysstay a week aheadJohnVictorClaude☀Twelve assignments!What could go wrong?AugustJohnVictorClaudeL+7a comfortable weekA week ahead, as planned.L3 went up 4 days earlyOctoberJohnVictorClaudeL+1A6, A8, A9on holdA day or two ahead.Content first; assignments waitNovember 4JohnVictorClaudeL1912:34 pm"Release Lecture 19"Published the day of.7 of 17 lectures: same day

For your own projects: building with AI at high quality is more work, not less. Aim for very good, ship it, then keep improving.

Systems and Toolchains for AI Engineers
06-763 · L22

How this course was built, the rules file

Conventions file: a project's rules, read by every person and AI that works on it. Ours is CLAUDE.md.

1 Something goes wrong 2 Find the cause 3 Write a rule, with the reason 4 Automate the check the same mistake does not come back
  • A deploy reported success, but the site still showed the old version → every deploy now checks the live site
  • Slides had text cut off at the bottom → a check now renders every deck and fails if anything overflows

For your own projects: keep a rules file, and turn each rule into an automatic check where you can.

Systems and Toolchains for AI Engineers
06-763 · L22

Learning a new field quickly

Systems and Toolchains for AI Engineers
06-763 · L22

Learning a new field quickly, the method

Before you start

1Write down what you need to know, and what a good answer looks like
2Start from original sources: papers, documentation, data descriptions

While you work

3Confirm each fact at its source before you build on it
4Predict the result, then run it: a surprise shows what you got wrong
5Make every number and figure with code you keep

When something goes wrong

6Write down a rule, with the reason
7Automate the check, so it runs on every change

For your own projects: an AI assistant makes each step faster. It does not let you skip any of them.

Systems and Toolchains for AI Engineers
06-763 · L22

Generating is not learning

Systems and Toolchains for AI Engineers
06-763 · L22

Generating is not learning, test yourself

Testing effect: you remember more by trying to recall something than by reading it again.

  • Students read two short texts. They read one again, and wrote down what they remembered of the other
  • After 5 minutes, the text they read again was remembered better
  • After 2 days and after 1 week, the text they recalled was remembered better

Roediger and Karpicke, 2006

Reading an AI's explanation feels like learning. Recalling it yourself is what lasts.

Systems and Toolchains for AI Engineers
06-763 · L22

Generating is not learning, an AI tutor study

no AI +48% +127% Group 1: chat assistant it gives answers Group 2: AI tutor it gives hints, not answers Practice problems, with the AI Change in grade compared with students without AI
Step 1: practice, with the AI. Both groups do much better than students without AI
no AI +48% -17% +127% about the same Group 1: chat assistant it gives answers Group 2: AI tutor it gives hints, not answers Practice problems, with the AI Exam, without the AI Change in grade compared with students without AI
Step 2: the exam, without the AI. The answers group does worse; the hints group the same
  • Nearly 1,000 high school students practiced math in three groups: no AI, a chat assistant, or an AI tutor
  • Then everyone took the same exam without AI

Bastani et al., 2025

With answers on demand, exam grades fell 17%. With hints only, they did not fall, but did not rise either.

Systems and Toolchains for AI Engineers
06-763 · L22

Generating is not learning, ways to study

7 Fix a bug in open-source code, or tackle an open problem 6 Teach it to someone 5 Explain it from memory, in writing 4 Change one assumption, predict what moves 3 Break working code on purpose, predict the error 2 Work one example by hand 1 Predict the result before you look 0 Read about it more effort, more learning

With an AI assistant

  • Ask it to quiz you, and to grade your answer
  • Explain first, then ask it for the gaps
  • Ask why, not only what
  • Solve the problem yourself

Higher levels take more effort and teach more. Use the assistant to move up, not to skip levels.

Systems and Toolchains for AI Engineers
06-763 · L22

Limitations and trade-offs, AI assistants

✓Good at

  • Drafting from a clear plan
  • Code you can run and test
  • Finding sources, which you then read
  • Repetitive work: figures, formatting, checks

!Watch out for

  • Confident answers that are wrong
  • Numbers and quotes with no real source
  • More text than anyone can read and check
  • Doing the practice for you
You plan→The assistant drafts→You check: run, test, read the source→You decide

Use it where you can check the result, and check what it gives you.

Systems and Toolchains for AI Engineers
06-763 · L22

Recap

1The course: four parts, and a few ideas that work in any field
2Applications: the same methods in medicine, energy, machines, bridges and materials
3Review: the knowledge graph and the system figure, on any device
4How it was built: an AI assistant, with the course designed, edited and checked by us
5Learning: use the assistant to test you, not to do the work for you

You can now learn the next field yourself, with the same method.

Systems and Toolchains for AI Engineers
06-763 · L22

Before the presentations

1No assignment for this session
2Presentations: Wednesday 11-18 and Monday 11-23; the final project page has what to bring
3Review with the course map before you present
Systems and Toolchains for AI Engineers

The course 8. Applications 20. The interactive reviews 15, I open them live myself. How it was built 15. Learning a new field 15. Limits and close 5.

Two minutes. The fog from Lecture 18's map has lifted. L19 on the coast, the optional loop of L20 and L21 on the AIChE dates, and we are at L22. Ahead: two days of presentations, Thanksgiving, and a week of guest speakers at the top. Hover any stop for the lecture; the side paths are the case studies from other fields. Scotty walks the trail from L1 to the summit once when the slide opens; he is not a question.

8 min

Arrows: what each part needs from the one before it.

20 min. One template slide per case: problem, what happened, why, what from our course applies.

Inputs and outputs, before and after the fix. Before: the input is the measured frequency, and the output is damage or no damage, from a fixed limit. Temperature moves the frequency more than damage does, so the limit misses the damage or raises alarms on warm days. After: the input is the temperature, and the output is the frequency the healthy bridge should have at that temperature. Damage is flagged when the measured frequency falls below that prediction (the red dots). The model is trained on the healthy bridge only, so damage is never one of its inputs or outputs.

15 min. I open them live.

15 min. Each slide ends with a lesson for their own projects.

133 pull requests to November 4. Most were lectures; the big green dot in August is the practice game.

The boulders roll while the slide is up. Captions are the real numbers from the previous slide; the characters are cartoons.

15 min. The way the course was built, as a method you can use.

An assistant can write the material for you. It cannot learn it for you.

The tutor group rated their exam performance higher than the no-AI group did; their scores were the same. The tutor had the teachers' solutions in its prompt.