Pick the Model That Fits
Standard quoted exactly
Justify the selection of a type of machine learning model to accomplish a task.
Example from the standards. The XOR problem is best solved by rule-based logic (and is not solvable with a linear classifier), but ambiguous problems like question-answering using text are better solved with data on more complex models like LLMs.
Student-friendly learning targets
- I can explain XOR in plain language and show why one straight line cannot separate its points.
- I can justify rule-based logic vs. a linear classifier vs. a more complex data-driven model for a given task.
- I can match an Idaho job (irrigation, yield, smoke photos, messy text questions) to a model family and defend the pick.
Essential questions
- When is a two-line IF statement smarter than a 'learning' model?
- What does it mean that a linear classifier cannot solve XOR?
- Why do messy language questions want lots of data and a complex model instead of a tidy rule?
Objectives
- Plot the four XOR points and attempt (then fail) a single straight separating line.
- Write the XOR rule: output is 1 only when the two inputs disagree.
- Justify model choice for at least three tasks: XOR-like logic, numeric yield, and text question-answering.
- State one reason not to use an LLM for a job a rule or a linear model already does well.
Key vocabulary
- XOR (exclusive or)
- A tiny logic job: the answer is yes only when the two inputs are different. (off,off) no, (off,on) yes, (on,off) yes, (on,on) no.
- Linear classifier
- A model that separates two classes with one straight line (or a flat plane in more dimensions). If you cannot draw that line, this model cannot do the job.
- Rule-based logic
- A program of IF/THEN rules a person writes. XOR is one line: IF a disagrees with b THEN on ELSE off.
- LLM
- A large language model: a data-hungry text model good at messy language, not the default for a two-switch logic problem.
- Justification
- A reason tied to the task's shape (linear vs. not, numeric vs. language, tiny vs. ambiguous), not to what is trendy.
Teacher background
Teach XOR on paper, not as mysticism. Draw a square: (0,0) and (1,1) are class 0; (0,1) and (1,0) are class 1. Any one straight line leaves a point on the wrong side. That is all 'linear classifier cannot solve XOR' means. A rule solves it perfectly. Contrast with potato yield from rainfall and temperature (a linear or simple regression may be enough) and with 'Will this variety make sense on my field given these notes?' which is ambiguous text and a fair LLM or similar job. Students justify selection; they do not implement a neural net. AIM.4–AIM.6 revisit families and limits; this lesson is the choice argument using the standards example. Spreadsheet scatter of four points is enough. Offline: pencil graph.
Materials and prep
Materials
- Printed XOR graph (axes 0–1, four points unlabeled at first).
- String or a ruler to try one separating line.
- Task cards: XOR irrigation interlock (pump ON only if exactly one of two sensors says dry — or a two-switch light), potato yield from rain+GDD, satellite smoke image, messy grower Q&A text, red-flag rule from wind and RH.
- Model-family cards: rule-based, linear classifier / logistic / linear regression, decision tree, neural net, LLM.
- Justification template: task shape → model → because → failure mode if we pick wrong.
Before class
- Practice the four-point demo so the failed line is visible from the back row.
- Write one Idaho XOR analog: a canal gate opens only when upstream is high XOR downstream is high (exactly one) — or keep the two-switch light if that is clearer. Do not force a bad analog.
- Print AIM.4/AIM.5/AIM.6 cross-links for yourself so you do not steal their family-deep dives; today is selection plus XOR.
Instructional sequence
Two switches, one light
5 min- Describe a light that is ON only when the two classroom lights disagree (exactly one on). Students fill a four-row truth table.
- Ask: can you state that in one IF? Collect a rule. Ask: could a single straight cutoff on 'number of switches on' work? (No: 0 and 2 are both OFF, 1 is ON — not a linear cutoff on a 2D diagonal either.)
- Name XOR.
One line vs. a rule vs. a language model
12 min- Plot the four XOR points. Invite a student to separate yes from no with one ruler line. Let it fail. Say: a linear classifier draws one line; XOR needs a bent or two-line boundary.
- Write the rule: IF a != b THEN 1 ELSE 0. Circle: best solved by rule-based logic.
- Contrast yield ~ rain + growing-degree days: a line (regression) is a reasonable first pick.
- Contrast messy question-answering ('What should I plant after this frost, given these notes?'): rules explode; an LLM trained on lots of text is the standards pick — still with a human check.
- Warning: do not use an LLM to XOR two bits. Fit the tool to the job.
Match three tasks as a class
10 min- Task 1: red-flag warning if wind > 15 mph AND RH < 15%. Class justifies rules (and a weather forecast as input), not an LLM.
- Task 2: predict county potato yield from rain and GDD. Justify a linear/regression model; say what would make you upgrade.
- Task 3: answer free-text grower questions. Justify a data-heavy language model; name the hallucination risk.
Justification cards
8 min- Pairs draw two remaining task cards and complete the template for each.
- They must include one rejected model and why (e.g., linear classifier rejected for XOR; LLM rejected for the AND red-flag rule).
- Offline: same cards, no software.
Real-world examples
- XOR-like interlock: a pump should run only when float A and float B disagree (one high, one low) — a two-line rule, not a neural net on a PLC.
- Linear: Magic Valley yield vs. April rain; a line is inspectable by a grower.
- Neural net: smoke-plume pixels on a GOES snapshot — rules on a few thresholds miss the texture.
- LLM: answering mixed English/Spanish extension questions from years of public FAQs — ambiguous language, needs data and a human agronomist in the loop.
Hands-on activity
Ruler test and a pitch
10 min- Every student tries the ruler on the XOR plot and writes 'linear classifier fails here because…' in one sentence.
- They pitch one Idaho task and a justified model in 20 seconds to a neighbor.
- Collect one wrong-pick horror: LLM for XOR; linear model for satellite fire.
Discussion questions
- If a vendor says their linear model 'does XOR with enough data,' what would you draw on the whiteboard?
- Why might a grower prefer a worse-scoring linear yield model they can inspect over a black-box LLM?
- Where do combinations belong (rules to refuse unsafe actions, ML to rank options)?
- Is 'more complex' always 'more correct' for question answering that is actually a lookup of a river gauge?
Differentiation
Support
- XOR plot pre-drawn with points; student only tries the line and copies the IF rule.
- Two-choice justifications (rule vs. linear) before adding LLM.
Challenge
- Explain in writing why stacking two linear classifiers (or a hidden layer) can solve XOR, and why we still might ship the IF rule on a pump.
- Justify a hybrid: rules for safety interlocks plus an LLM for the help desk that explains them.
Multilingual learners
- XOR truth table with ON/OFF and SI/NO; the inequality a != b is the same.
- Sentence stems: 'I pick ___ because the task is ___. I reject ___ because ___.'
IEP / 504
- Physical ruler and large graph; oral justification accepted.
- Skip the optional two-layer hint; the standard is selection, not architecture.
Assessment
Formative
- Truth table in the warm-up and the failed ruler line.
- Class justifications for the three guided tasks.
Summative
- Two completed templates plus the sentence 'linear classifier fails XOR because one straight line cannot separate the diagonal points.'
- Credit the reasoning, not jargon. 'Use AI' with no family named does not meet the standard.
Success criteria
- Student can show XOR on paper and state the rule.
- Student justifies at least one rule pick and one data-heavy pick.
- Student rejects at least one mismatched model with a task-shaped reason.
Responsible use, ethics, and privacy
Responsible use
Choosing an LLM for a safety interlock is irresponsible even if it 'usually' gets XOR right. Fit, then add a human for high-stakes text.
Ethics
Complex models can hide who they fail. A justified pick includes who is harmed if the model is the wrong shape (a linear hiring screen, an LLM medical answer).
Privacy
No student Q&A logs into a public LLM for this lesson. Text-QA is discussed, not live-prompted with personal farm or family facts.
Reflection
- Where did you almost pick the fanciest model, and what pulled you back?
- How would you teach XOR to a ninth-grader in 30 seconds?
- Which Idaho job should never be an LLM, and why?
Homework
On the printed four-point graph, draw a failed linear attempt and write the XOR rule. Then justify a model for one of: (a) frost yes/no from tonight's temp, (b) identifying a leaf disease from a photo, (c) answering a messy text question about planting dates. One paragraph each for pick and reject.
Closing
XOR is a two-switch riddle a ruler cannot solve and a rule can. Messy language is the opposite riddle. Pick the model that fits the shape of the job. Tomorrow we critique the giant photo pile many models actually ate.
Extensions and cross-curricular links
Go further
- 90-minute block: add decision-tree 20-questions (crop diagnosis) as a fourth family; still no training required — paper trees.
- Python extension: try sklearn logistic regression on the four XOR points and watch it fail; fit a tiny two-layer net or just print the rule. Notebook is extra, not the gate.
- Connect to AIM.4 (procedural vs. rule vs. data vs. combo) without duplicating that four-way sort — here the headline is XOR vs. LLM.
- Printed tracing of four points for a sub plan.
- Mathematics
- Linear separability is a geometry idea; XOR is the classic not-linearly-separable set.
- Computer science
- Boolean logic (AND, OR, XOR, NOT) is still how hardware and safety interlocks work.
- Agriculture engineering
- Pumps and gates want rules; yield wants regression; advisory text wants language models with humans.