Skip to main content

Day 1 · Block 2

E02 - Prompt anatomy in runnable Python

  • Familiarize yourself with LangChain https://docs.langchain.com/ and OpenRouter https://docs.openrouter.ai/ by browsing their docs and examples.
  • What all can you do with LangChain?
  • What are some of the most powerful models on OpenRouter? What are the "best value" models? What do they say about privacy and data usage?
  • Run `python exercises/02/prompt_lab.py`.
  • Inspect `TODO-STUDENT` prompt instruction and modify strictness once.
  • Re-run and compare extraction output quality.
  • Verify the resulting list excludes fictional places.

Inputs

  • exercises/02/prompt_lab.py
  • Noisy country paragraph
  • One TODO-STUDENT prompt variant

Checklist

  • Make one explicit design decision.
  • Include one verification check.
  • State one limitation or risk.

Common failure modes

  • Output format drifts from strict list.
  • Typos fixed inconsistently or fictional places included.

Extension task (optional)

Optional multi-agent blackjack demo (Dealer, Gambler, Referee) using explicit standard rules: card values, initial deal, hit/stand, bust, dealer hits to 17+, blackjack precedence, and push on equal totals.