Back to Browse

CTD - Python 200 - Lesson5 AI Intro.

14 views
May 6, 2026
47:16

1) Session Outcomes (what learners can do by the end) By the end of this session, learners should be able to: Explain what NLP is and name a few common NLP tasks. Explain what an LLM is (autocomplete / next-token prediction) and the idea of self-supervised learning. Describe the high-level components of a transformer-based LLM pipeline: tokenization → embeddings → attention/transformer blocks → next-token prediction. Make a basic client.chat.completions.create(...) call and extract output from response.choices[0].message.content. Describe key API parameters: model, messages, temperature, top_p, n, and token limits (max_tokens / max_completion_tokens). Explain why the chat API is stateless and how chatbots simulate memory by resending conversation history. Apply core prompt-engineering rules: clarity/specificity, iteration, examples (zero/one/few-shot), delimiters, and requesting structured output. 2) Agenda (60–75 minutes) A. Warm-up (5 min) Ask: “What’s the difference between ChatGPT in the browser vs an API call?” Key idea: API calls are programmable and repeatable; you control parameters and inputs. B. Lesson 01 — Intro to NLP & LLMs (15–20 min) What is NLP + examples of tasks LLMs as “autocomplete at scale” How LLMs learn (self-supervised next-token prediction) + fine-tuning/RLHF concept High-level architecture: tokenization, embeddings, attention, transformer blocks Mini demo idea: embedding visualization (PCA) C. Lesson 02 — Chat Completions API: the basics (15–20 min) What is a “completion” Minimal API call How to read the response object Parameters & cost control D. Lesson 03 — From completions to chatbots (15–20 min) Statelessness and why “it forgets” Message history pattern (append user + assistant messages) Add guardrails: max exchanges, token limits, exit words E. Lesson 04 — Prompt engineering foundations (15–20 min) Golden rules + templates “vague prompt → vague answer” vs “specific prompt → useful output” Delimiters and structured formats (JSON / labeled lines) F. Wrap-up + quick checks (5 min) 3–5 rapid questions + next steps

Download

0 formats

No download links available.

CTD - Python 200 - Lesson5 AI Intro. | NatokHD