Generative AI Course

Week 1: LLM Foundations

Master tokens, transformers, prompting, and structured outputs so you can build reliable text generation systems.

Duration: 5 Sessions
Labs: 5
Project: PromptOps Assistant
Week Plan
DAY 1

LLM Concepts and Model Families

90 mins lecture30 mins quiz

Core Ideas

Model Selection Flow
Task Type
Quality Target
Budget Limit
Pick Model
DAY 2

Tokenization and Context Windows

75 mins lecture45 mins hands-on

What You Learn

python
# Simple token budget planner
SYSTEM = 400
USER = 1200
RETRIEVAL = 2200
RESPONSE_BUDGET = 1000
TOTAL = SYSTEM + USER + RETRIEVAL + RESPONSE_BUDGET
print(f"Token budget: {TOTAL}")
DAY 3

Prompt Engineering Patterns

60 mins lecture60 mins workshop

Patterns

PatternBest ForWatch Out
Few-shotFormat consistencyToken overhead
Chain of thought styleComplex reasoning tasksLatency increase
XML/JSON templateStructured outputStrict parser failures
DAY 4

Output Control and Guardrails

80 mins lecture40 mins lab

Safety and Reliability

Use deterministic settings for business-critical tasks and rely on post-generation validators for contract enforcement.
DAY 5

Lab Sprint and Review

120 mins lab30 mins review

Hands-On Labs

Week 1 Outcomes

  • Understand the LLM landscape and model tradeoffs
  • Design prompt pipelines with consistent output shape
  • Ship a robust first generative AI utility
GUIDED PATH

Beginner Walkthrough: Learn by Doing

Layman friendlyNo prior GenAI required

What each concept means in simple language

Exact daily execution plan (2 to 3 hours/day)

  1. Day 1: Read the model family overview, then create one-page notes comparing 3 models on cost, speed, and quality.
  2. Day 2: Run token counting on 10 prompts. Rewrite long prompts into concise prompts while preserving meaning.
  3. Day 3: Write 5 prompt templates: summarization, extraction, rewrite, classification, and QA.
  4. Day 4: Add schema validation. Force model output into JSON and retry when output is invalid.
  5. Day 5: Build and demo PromptOps assistant that takes raw text and returns summary + key points + action items.

Assignment to complete Week 1

Build a small web or CLI app called PromptOps Assistant. Input: long meeting notes. Output: structured JSON with fields summary, decisions, risks, next_steps. Add one validation rule: if JSON is invalid, auto-retry with correction prompt.

Submission checklist

How you know you passed Week 1

AreaPass CriteriaWeight
Concept clarityYou can explain tokens, context, and temperature without notes20%
Prompt qualityYour templates produce consistent results on repeated runs25%
ReliabilityJSON output is valid in at least 9/10 tests30%
DeliveryReadable code, README, and test evidence included25%
If you are new to coding, start with a simple CLI script first. You can always convert it to a web app in Week 4.