How to work through this subject
An order that works, not a checklist. Nothing here is tracked — the steps sequence this subject’s own topics and add none.
- State the problem and the decision the system supports, before naming a single component.
- Design the Python service and its API, with authentication and authorization decided up front.
- Model the data in PostgreSQL and write down where workflow state lives.
- Add the conventional ML component and justify it against a rules-based alternative.
- Add an LLM component only where you can show evidence it helps, and record that evidence.
- Build the evaluation datasets before optimising anything.
- Add the human review point and the audit log around every consequential action.
- Package it with Docker, put it behind CI, and add the observability you would need at 3 AM.
- Write the threat model, then attack the system yourself and record what survived.
- Finish by rehearsing the eleven final-gate questions, pointing at a real artifact for each answer.
What to watch for
- Every component here was learned in an earlier stage. If one feels unfamiliar, the gap is in that stage, not this one.
- Use an LLM component only where it is justified. 'We used AI' is not an architecture decision.
- Workflow state is the part people leave in memory and lose on the first restart. Decide where it lives on day one.
- Human review is part of the architecture, not a disclaimer. Say which actions require it and why.
- The threat model is written before the attacks, so the attacks can prove or disprove it.
- This stage is defended, not delivered. An artifact you cannot explain does not count.
Curriculum topics
- Python service
- The application itself, structured and tested as engineering work rather than as a script.
- PostgreSQL
- The relational store holding workflow and domain state.
- API
- The interface through which the system is used and integrated.
- authentication/authorization concept
- Who may use the system, and what each of them may do.
- conventional ML component
- A classical model where one is the right tool — often cheaper, faster and more explainable than an LLM.
- LLM/AI component only where useful
- An LLM included only where evidence shows it beats the alternative. 'We used AI' is not a design decision.
- evaluation datasets
- The held-out sets that make every quality claim about this system checkable.
- workflow state
- Where a multi-step task's progress lives, and what happens to it if the process dies.
- human review
- The point at which a person inspects or approves, and what they are shown.
- audit logs
- The record of every consequential action the system took, required for review and incident response.
- Docker
- Packaging an application with its dependencies into an image that runs the same everywhere.
- CI
- Automated checks on every change: tests, data checks, model checks, build.
- observability
- Logs, metrics and traces sufficient to answer what the system is doing right now.
- threat model
- The written analysis of assets, trust boundaries, attacker goals and mitigations, plus the risk left over.
Resources for this subject
- REFERENCEHidden Technical Debt in Machine Learning Systems Sculley et al., Google
The paper showing that model code is a small fraction of a real ML system. Directly informs the capstone's architecture and trade-off documentation.Open
Need another explanation?3 more references
- REFERENCEapplied-ml Eugene Yan
Curated industry write-ups of real deployed systems. Use them as reference architectures when justifying your capstone's design.Open Open - OPTIONALWriting on applied ML systems Eugene Yan
Essays on design and evaluation decisions, useful for building the interview narrative the stage requires.Open - OPTIONALMachine Learning Systems Harvard (mlsysbook.ai)
Free textbook on end-to-end ML systems engineering. Useful for the architecture-document and system-design portions of the final gate.Open
A reviewer should be able to answer these
Answer from memory, out loud, before moving on. These are not tracked and do not affect the gate — they tell you whether you actually understand this subject.
- Why is there an ML component, and what would break if you replaced it with rules?
- Why is there an LLM component, and what evidence shows it helps?
- Where does workflow state live, and what happens if the process dies mid-task?
- What does a human reviewer see, and at which point in the flow?
- What does one successful task cost, end to end?
- What happens when the model provider is unavailable?
- What does your threat model claim, and which of its claims did your own attacks test?
- Which single component would you remove if you had to ship a week early, and what would that cost?