Week 1 Building and Evaluating AI Systems
Choosing and Documenting an AI System
Advanced data science begins before model fitting. A defensible system starts with a real decision, an inspectable baseline, a reproducible evidence chain, and a boundary around what people must still decide.
Core question: When should we use a predictive model, a foundation model, or no AI at all?
By the end
- Distinguish prediction, generation, retrieval, and tool-using systems.
- Choose a non-AI or simple baseline before adding complexity.
- Trace data, configuration, code, output, and decision as one reproducible chain.
- Apply disclosure, verification, privacy, and human-accountability rules.
Course progression
Build one evidence chain
This week uses the course-wide sequence: frame the use, establish a baseline, build or compare, evaluate failure, document boundaries, and decide.
This contract becomes concrete in Week 2, where the learning loop is made visible before any larger system is trusted.
Essential concepts
Understand the parts before combining them
The core lane focuses on transferable judgment. Optional formal or engineering depth belongs in the companion notebook's stretch lane.
Task before tool
A tool category is not a problem definition. State what changes for whom, what evidence is observable, and which mistakes matter before choosing a model.
Baseline as a claim boundary
A baseline shows whether complexity adds value. It can be a rule, lookup table, human workflow, mean prediction, or small supervised model.
Reproducibility as a chain
A result depends on data version, split, preprocessing, code, dependencies, seed, configuration, and hardware. A seed alone is not reproducibility.
Mathematical intuition
One relationship worth keeping
The expression is a decision scaffold, not a universal monetary equation. Each term must be justified for the intended use and compared with a non-AI alternative.
Stretch: what the notation leaves out
A technically impressive model can have negative practical value when its incremental benefit is small or its error and operating costs are high.
Interactive explorer
Change assumptions and inspect the decision
Adjust the need for generation, data stability, and action risk. Which system pattern is the smallest defensible choice?
Higher action risk should reduce autonomy. Stable rules favor no-AI or deterministic software; genuine language generation may justify a foundation model only with evidence and boundaries.
Evidence workflow
Move from a claim to a decision
Use this order in the chapter, notebook, and project record. Skipping an earlier step weakens every later claim.
- 1. Write intended use, users, population, action, and explicit non-use.
- 2. Create a no-AI or simple predictive baseline.
- 3. Register data source, license, privacy result, version, and split.
- 4. Record environment, seed, configuration, output, and rejected AI suggestions.
- 5. Choose use, revise, refer, abstain, or do not build.
Individual system critique and repair note
Prepare the evidence habits used in both PBL projects; no team checkpoint is due yet.
Failure analysis
Deliberately look for the claim's boundary
A failure case is useful when the setup, expected behavior, observation, severity, and response are recorded.
Plausible but invalid analysis
Failure: An assistant recommends scaling before the train/test split and leaks test information.
Evidence: A pipeline audit shows test-derived preprocessing statistics.
Response: Split first, fit preprocessing on training data, and rerun the baseline.
Metric without consequence
Failure: A high accuracy hides failure on the rare class that triggers support.
Evidence: Confusion counts and class-specific recall contradict the headline.
Response: Choose metrics from error costs and add referral rules.
Unreproducible success
Failure: One notebook output cannot be recreated on a clean machine.
Evidence: The data version, dependency lock, or configuration is missing.
Response: Treat the claim as unverified until the chain can be replayed.
Use and non-use
Keep authority proportional to evidence
Intended use
Use AI to propose, summarize, predict, or generate when its incremental value is tested.
Do not use
Do not use AI when a stable rule, lookup, or human conversation is safer and sufficient.
Human responsibility
A named person remains responsible for data approval, release, consequential decisions, and escalation.
Small Python demonstrations
Predict, run, and interpret
Each button calls one fixed, allowlisted computation. Use the notebook for longer experiments and saved evidence.
Choose the smallest system
stability, needs_language, action_risk = 8, 2, 3
choice = "deterministic workflow" if stability >= 7 and needs_language < 4 else "model"
if action_risk >= 7: choice += " + mandatory human approval"
print(choice)Run this fixed example to compare your prediction with the result.
Hash an evidence artifact
import hashlib
evidence = b"data=v1|split=42|metric=macro_f1|score=0.71"
print(hashlib.sha256(evidence).hexdigest()[:16])Run this fixed example to compare your prediction with the result.
Compare a baseline claim
baseline, candidate = 0.64, 0.69
print("absolute gain:", round(candidate - baseline, 2))
print("relative error reduction:", round((candidate-baseline)/(1-baseline), 3))Run this fixed example to compare your prediction with the result.
Check your understanding
Ten questions with standard answers
Answer before opening each panel. A good answer connects the concept to evidence, failure, and a bounded decision.
1. When should we use a predictive model, a foundation model, or no AI at all?
Standard answer: Choose the least complex system that improves a defined decision over a defensible baseline, with reproducible evidence and an explicit human boundary.
2. What is the role of task before tool in this chapter?
Standard answer: A tool category is not a problem definition. State what changes for whom, what evidence is observable, and which mistakes matter before choosing a model.
3. Why does baseline as a claim boundary require evidence rather than intuition?
Standard answer: A baseline shows whether complexity adds value. It can be a rule, lookup table, human workflow, mean prediction, or small supervised model.
4. How should a practitioner use reproducibility as a chain?
Standard answer: A result depends on data version, split, preprocessing, code, dependencies, seed, configuration, and hardware. A seed alone is not reproducibility.
5. What does the chapter's main formula clarify—and what does it not prove?
Standard answer: A technically impressive model can have negative practical value when its incremental benefit is small or its error and operating costs are high.
6. What should change in the explorer as its risk or complexity controls increase?
Standard answer: Higher action risk should reduce autonomy. Stable rules favor no-AI or deterministic software; genuine language generation may justify a foundation model only with evidence and boundaries.
7. How should the system respond to: Plausible but invalid analysis?
Standard answer: Split first, fit preprocessing on training data, and rerun the baseline.
8. What evidence reveals the failure called Metric without consequence?
Standard answer: Confusion counts and class-specific recall contradict the headline.
9. When should the system not be used or allowed to proceed?
Standard answer: Do not use AI when a stable rule, lookup, or human conversation is safer and sufficient.
10. How does this week prepare the next stage of the course?
Standard answer: This contract becomes concrete in Week 2, where the learning loop is made visible before any larger system is trusted.
Terminology
Glossary
- Intended use
- The specific users, population, task, and conditions for which a system is designed.
- Non-use
- A context or decision for which the system must not be used.
- Baseline
- A simple comparison that defines the minimum evidence a more complex system must beat.
- Provenance
- Traceable origin and transformation history for data, models, and outputs.
- Reproducibility
- Ability to recreate a result from recorded inputs, code, configuration, and environment.
- Leakage
- Information entering training that would not be available at genuine prediction time.
- AI-use ledger
- A record of AI assistance, verification, corrections, and responsibility.
- Abstention
- A designed decision not to produce a prediction or action when evidence is insufficient.
- Human boundary
- The point at which a person must review, approve, or take responsibility.
- Incremental value
- Improvement over the best practical alternative after errors and costs are considered.
Continue learning
Key references
These primary papers, standards, or official technical documents anchor the chapter. Product names and current legal timelines should be rechecked when used in a real project.