The designed path runs on a computer with a web browser, Google Colab, and a permitted Google account. Nothing needs to be installed locally, but provider access, account verification, network access, and free-tier quotas must be checked before class. For students who cannot use the live API there is a built-in offline path: every notebook has MOCK = False in Cell 1 — set it to True and every cell runs on canned responses (prefixed [MOCK]; Lab 4 uses a hashed bag-of-words embedding so search still works).
MOCK = True offline path.[MOCK] comparison responses.Every lab is a Google Colab notebook — a Python environment that lives in your browser and executes on Google’s cloud. When you click “run,” the work happens on Google’s computers and the answer comes back to your screen. So the only thing your laptop does is display a web page. A phone-grade CPU is plenty.
Each student uses their own free Gemini API key. Rough API calls per lab:
| Lab | Typical calls | Notes |
|---|---|---|
| S1 first calls | ~15 | 5 prompts + comparison + stretch |
| S2 evaluation | ~50 | heaviest — eval loops + A/B (retry handles limits) |
| S3 vision | ~25 | images auto-resized to save quota |
| S4 RAG | ~45 | chunk-embedding capped to 60 chunks |
| S5 tools | ~15 | |
| S6 security | ~20 |
A full day of labs (3 sessions) is roughly 90–110 calls per student before retries and reruns. That may fit a current free tier, but it is not a guarantee: limits vary by project, model, account age, region, and provider policy. Check each teaching project’s live limits before class and avoid running every stretch goal in a large room.
If a student hits a limit or cannot access the API: stop rerunning the live cells. Set MOCK = True in Cell 1 and re-run — every cell then works on canned [MOCK] responses — or pair the student with a working machine. Do not ask students to create extra accounts, share keys, or bypass provider controls.
Session 5 shows Ollama (running an AI model on your own laptop, offline). This is an instructor demonstration only. Students are not asked to install it during the lab — their Session 5 lab uses the same free cloud API as every other session. “Try Ollama at home” is an optional stretch for the curious (it wants ~8 GB RAM); skipping it costs you nothing in the course.
ask() helper (Cell 2) retries with backoff, so the occasional rate-limit (429) or a blocked/empty response is handled instead of crashing — Labs 1 through 6, no exceptions. Retries are bounded; once a quota is truly exhausted, switch to MOCK = True.MODEL variable per notebook: if a cheaper/newer free model appears, it’s a one-line change.Free-tier prompts may be used by the provider to improve their products. So: don’t paste anything private (real ID numbers, passwords, confidential documents). Use your own class notes and sample data — which is what the labs do anyway.
Bottom line: if you can open a website, you can use the designed Colab path. If the live provider is unavailable, MOCK = True in Cell 1 preserves the programming, evaluation, RAG, and security learning without requiring a key — at reduced fidelity, and every mock answer says so with its [MOCK] prefix.