The concept presentation stands on its own. Prepared numerical figures and recorded model choices explain each case. The notebook labels below only locate optional practice and supporting records.
Recorded studies retain their own inputs, assumptions and model scope. Optional new calculations may differ from those records. The full source guide preserves provenance and calculation details.
Notebook step: L2
Compare possible settings, then check voltage and line current. The agent can organize these trials and report the checked options.
Monica Lam. CS224V Agentic AI, Lecture 1: Introduction. Stanford University. Fall 2026.
Notebook step: L6
The operator sets the service priority. That priority changes the study the agent requests.
Monica Lam. CS224V Agentic AI, Lecture 1: Introduction. Stanford University. Fall 2026.
Notebook step: L9
The agent requests a study. The tool calculates. The operator reviews the result.
Monica Lam. CS224V Agentic AI, Lecture 1: Introduction. Stanford University, Fall 2026, p.53.
Monica Lam. CS224V Agentic AI, Lecture 1: Introduction. Stanford University. Fall 2026.
Notebook step: L8–L9
A good fit alone does not prove that the readings are true. The agent can organize checks and flag missing evidence.
Monica Lam. CS224V Agentic AI, Lecture 1: Introduction. Stanford University. Fall 2026.
Notebook step: L2
Use solar generation while keeping voltage and line current within the allowed range. An agent can organize the trials and return checked options.
Classroom Labs notebook. Classroom_Labs.ipynb, L2; cell classroom-007; src/continuous_control.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L2
One setting controls solar power output. The other provides voltage support. The tool checks voltage, line current and the solar unit’s capacity.
Classroom Labs notebook. Classroom_Labs.ipynb, L2; cell classroom-007; src/continuous_control.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L2
The tool calculates the effect of each proposal. Compare their scores only after voltage, current and capacity checks pass.
Classroom Labs notebook. Classroom_Labs.ipynb, L2; cell classroom-007; src/continuous_control.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L2
Left: voltages should stay in the allowed band. Right: current should stay below 100% of the allowance.
Classroom Labs notebook. Classroom_Labs.ipynb, L2; cell classroom-007; src/continuous_control.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L2
MPC uses 73.62% of the current allowance; SAC uses 51.68%. MPC has the lower overall score because current is only one part of the goal.
Classroom Labs notebook. Classroom_Labs.ipynb, L2; cell classroom-007; src/continuous_control.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L2
Reduce the allowance from 80% to 75% of nominal current. Which proposal might fail? Which would you choose if both pass? What must the agent ask the tool to check again?
Classroom Labs notebook. Classroom_Labs.ipynb, L2; cell classroom-007; src/continuous_control.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L2
MPC has the lower score. SAC uses less current and less solar output. These results cover the medium-voltage model. A wider grid needs a wider study.
Classroom Labs notebook. Classroom_Labs.ipynb, L2; cell classroom-007; src/continuous_control.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L2
Here SAC also uses less solar output. The operator’s goal values solar generation as well as operating limits.
Classroom Labs notebook. Classroom_Labs.ipynb, L2; cell classroom-007; src/continuous_control.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L5
A study of the medium-voltage network cannot confirm a whole-grid claim. The agent should request the missing study or return HOLD.
Classroom Labs notebook. Classroom_Labs.ipynb, L5; cell classroom-016; MV-only default model. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L10B
Llama requests a check of the saved SAC proposal. The numerical tool reports too much current and rejects it.
Workshop recorded model replies and numerical study records. Voltage P3_current_reserve: Llama 3.1:8b planner, recovery and review calls 1–3. Public teaching archive. 27 September 2026.
Notebook step: L10B
Llama requests a check of the existing MPC fallback. The returned electrical checks pass for this recorded case.
Workshop recorded model replies and numerical study records. Voltage P3_current_reserve: Llama 3.1:8b planner, recovery and review calls 1–3. Public teaching archive. 27 September 2026.
Notebook step: L10B
The agent returns the checked proposal and its conditions. The operator still reviews it before any authorized action.
Workshop recorded model replies and numerical study records. Voltage P3_current_reserve: Llama 3.1:8b planner, recovery and review calls 1–3. Public teaching archive. 27 September 2026.
Notebook step: L6
A fault removes a supply path. Available capacity limits what can be restored. The operator sets priorities; the agent can request and check restoration options.
Classroom Labs notebook. Classroom_Labs.ipynb, L6; cell classroom-018; src/standard_formulations.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L6
Choose the goal: critical loads first, or the most total power. The agent can request a study, read the trade-off and ask for a new study when limits change.
Classroom Labs notebook. Classroom_Labs.ipynb, L6; cell classroom-018; src/standard_formulations.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L6
Critical-first gives more weight to essential service. Most-total-power aims to restore the largest amount of power.
Classroom Labs notebook. Classroom_Labs.ipynb, L6; cell classroom-018; src/standard_formulations.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L6
Critical-first: 130 kW total, including 90 kW for critical loads. Most-total-power: 140 kW total, including 30 kW for critical loads.
Classroom Labs notebook. Classroom_Labs.ipynb, L6; cell classroom-018; src/standard_formulations.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L6
Keep the faulted branch out of service. Check supply paths and capacity. Voltage, protection and field switching need separate studies.
Classroom Labs notebook. Classroom_Labs.ipynb, L6; cell classroom-018; src/standard_formulations.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L6
Increase its capacity from 40 kW to 180 kW. Keep the fault and loads the same. Would the two service goals still give different results? What should the agent recalculate before reporting the new plan?
Classroom Labs notebook. Classroom_Labs.ipynb, L6; cell classroom-018; src/standard_formulations.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L6
At 40 kW, critical-first serves 90 kW of critical load instead of 30 kW. At 180 kW, both goals serve 250 kW total, including all 90 kW of critical load.
Classroom Labs notebook. Classroom_Labs.ipynb, L6; cell classroom-018; src/standard_formulations.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L7
Now reduce the allowed backup capacity from 40 kW to 20 kW. The old result no longer supports the request. The agent must request a new study.
Classroom Labs notebook. Classroom_Labs.ipynb, L7; cell classroom-021; request/evidence binding. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L6
The operator sets priorities. The solver selects loads. The agent can request the solve and explain the returned service trade-off.
Classroom Labs notebook. Classroom_Labs.ipynb, L6; cell classroom-018; src/standard_formulations.py. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L10B
In this separate larger-feeder study, Llama requests another plan. The tool reports more service and passing electrical checks.
Workshop recorded model replies and numerical study records. Feeder-catalog restoration: Llama 3.1:8b refinement and ranking calls 14–16. Public teaching archive. 27 September 2026.
Notebook step: L10B
The next trial carries too much current. It cannot replace the previous passing option.
Workshop recorded model replies and numerical study records. Feeder-catalog restoration: Llama 3.1:8b refinement and ranking calls 14–16. Public teaching archive. 27 September 2026.
Notebook step: L10B
Llama puts two passing plans in the wrong cost order. Python keeps the lower-cost plan and checks it again.
Workshop recorded model replies and numerical study records. Feeder-catalog restoration: Llama 3.1:8b refinement and ranking calls 14–16. Public teaching archive. 27 September 2026.
Notebook step: L8
Wrong readings can still look consistent with the model. The agent can request checks, but action still needs a trusted basis.
Classroom Labs notebook. Classroom_Labs.ipynb, L8; cell classroom-023; four-bus DC fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L9
The agent can request the checks and keep missing evidence visible. The operator reviews trust, model coverage and the proposed correction.
Classroom Labs notebook. Classroom_Labs.ipynb, L9; cell classroom-026; fixed trusted-recovery fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L8
Mismatch J measures how well the model fits the readings. The simulation lets us measure how wrong the estimate is (state error).
Classroom Labs notebook. Classroom_Labs.ipynb, L8; cell classroom-023; four-bus DC fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L8
One wrong reading may conflict with the other readings. Coordinated changes may still look consistent with the model.
Classroom Labs notebook. Classroom_Labs.ipynb, L8; cell classroom-023; four-bus DC fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L8
Left: mismatch and its alarm threshold. Right: error against the simulation’s known truth. A quiet alarm can appear alongside a growing error.
Classroom Labs notebook. Classroom_Labs.ipynb, L8; cell classroom-023; four-bus DC fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L8
At scale 1, one biased reading gives mismatch J=277.50 and an alarm. A coordinated change gives J=3.92, no alarm, and 0.02678 rad of state error.
Classroom Labs notebook. Classroom_Labs.ipynb, L8; cell classroom-023; four-bus DC fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L8
Reduce the change to one tenth of the reference size. Will the alarm always detect the error? What else would the operator need before trusting the readings?
Classroom Labs notebook. Classroom_Labs.ipynb, L8; cell classroom-023; four-bus DC fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L8
Neither example triggers this alarm at one tenth of the reference size. Both estimates still contain error. No alarm alone does not establish data trust.
Classroom Labs notebook. Classroom_Labs.ipynb, L8; cell classroom-023; four-bus DC fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L9
Without the required trusted readings, the response is HOLD. With readings assumed trustworthy, the tool can calculate a proposal for review.
Classroom Labs notebook. Classroom_Labs.ipynb, L9; cell classroom-026; fixed trusted-recovery fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L9
The solver finds the smallest allowed adjustment that meets the checked branch limits. Predicted flow: 0.17000 p.u. Offline check: 0.17046 p.u. Limit: 0.18000 p.u.
Classroom Labs notebook. Classroom_Labs.ipynb, L9; cell classroom-026; fixed trusted-recovery fixture. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Notebook step: L10B
Llama requests the supplied recovery tool. Python calculates a correction using the assumed trusted readings.
Workshop recorded model replies and numerical study records. Standard four-bus cyber study: Llama 3.1:8b tool selection and REVIEW calls 7–8. Public teaching archive. 21 September 2026.
Notebook step: L10B
The model checks pass; human review is still pending. Data trust and operating permission still need review.
Workshop recorded model replies and numerical study records. Standard four-bus cyber study: Llama 3.1:8b tool selection and REVIEW calls 7–8. Public teaching archive. 21 September 2026.
Notebook step: L12
The proposal ID and model scope must match the checked study. A different proposal or wider scope needs a new review.
Classroom Labs notebook. Classroom_Labs.ipynb, L12; cell classroom-033; simulated readback only. Public notebook and Python source. 24 October 2026; stable notebook cell IDs checked.
Code manifest records each canonical notebook SHA-256, stable cell ID and inclusive source-line range. This concept edition contains no executable slide excerpts. Numerical code and archived records remain in the companion repository.
Classroom numerical cells perform fresh calculations when run. Displaying archived model replies does not call an LLM. Editing an earlier classroom parameter does not automatically change an independent archived study or fixed recovery fixture. The notebook and slide notes explain those boundaries.