← Back to the course home

⏮️ Before & trade-offs

Every tool replaced something worse — and is itself the wrong tool somewhere. For each big idea: what life was like before, honest merits ✅ / demerits ❌, and where to use it 👍 vs not 👎.

🧠 Machine learning (vs rulebooks) — lessons 01–02

⏮️ Before ML took over (pre-2012 for vision, pre-2020 for language)

Software was rulebooks: expert systems, thousands of hand-written if-thens, brittle grammar engines. Spam filters listed bad words; translators stored phrase tables. Anything fuzzy — images, speech, natural language — stayed embarrassingly bad, because some rules simply cannot be written.

✅ Merits

  • handles what rulebooks never could: fuzz, ambiguity, perception
  • improves with data instead of with more if-statements
  • one method spans images, speech, text, code

❌ Demerits

  • rules are grown → hard to inspect or fully explain
  • inherits its data's gaps and biases
  • fails weirdly (stickers fool it), not gracefully
  • training costs compute; behavior isn't guaranteed

👍 Use when

  • patterns beyond writable rules: language, vision, recommendation
  • 'roughly right, usually' is acceptable and checkable

👎 Think twice when

  • exact auditable logic: payroll, tax, safety interlocks — write code!
  • tiny data, huge stakes, no tolerance for surprises
  • a regex would do — the boring tool is allowed to win 😄

🗒️ Fine-tuning & LoRA vs RAG vs prompting — lessons 07, 08, 10

⏮️ Before this decision tree existed (~2022)

If you wanted a model to know or behave differently, the only lever was full retraining — museum-budget territory. Today there are three ladders, and picking wrong burns months: prompting (free, per-request), RAG (fresh facts on the desk), fine-tuning/LoRA (bake in style).

✅ Merits

  • prompting: instant, free, reversible — always try FIRST
  • RAG: fresh + auditable facts, update = re-index tonight
  • LoRA: real style/format/domain-voice gains on one GPU

❌ Demerits

  • prompting can't add knowledge or unbreakable habits
  • RAG lives and dies by retrieval quality (garbage in…)
  • tuning: costs, drifts stale, and CANNOT reliably add facts
  • teams routinely fine-tune when a better prompt would have done

👍 Use when

  • order of operations: prompt → RAG for facts → tune for style
  • tune when format/tone must be deep and consistent (and prompts maxed out)

👎 Think twice when

  • 'let's fine-tune so it knows our docs' — that's RAG's job, always
  • before you've even written a decent system prompt

📖 RAG — lesson 10

⏮️ Before RAG (pre-2023 for most teams)

Company knowledge lived behind keyword search (exact-word-or-nothing), hand-curated FAQ bots that answered 12 questions, and 'ask Priya, she knows where the doc is'. Models answered company questions closed-book — i.e., they made things up (lesson 09).

✅ Merits

  • grounded answers with citations — hallucination's best antidote
  • knowledge updates nightly (re-index), no retraining
  • semantic: finds meaning, not just matching words
  • per-question cost is pennies

❌ Demerits

  • a real pipeline to build and monitor (chunking, top-k, rerank)
  • retrieval misses → confident closed-book nonsense returns
  • struggles with cross-document reasoning ('compare all 50 contracts')

👍 Use when

  • chat-with-your-docs, support bots, policy Q&A — the classic wins
  • answers must cite sources (compliance loves RAG)

👎 Think twice when

  • the whole corpus fits comfortably on the desk — just paste it
  • questions need global aggregation, not lookup → databases/BI
  • your documents are wrong — RAG faithfully cites garbage 😅

📋 Agents & tool use — lesson 11

⏮️ Before agents (~2023)

Automation meant brittle scripts and RPA bots that clicked pixel coordinates and shattered when a button moved. Chatbots could only TALK — every actual action returned to a human. The glue between 'model suggests' and 'something happens' was always a person.

✅ Merits

  • turns advice into outcomes: looks things up, files, fixes, retries
  • handles fuzzy multi-step goals scripts never could
  • recovers from surprises by re-planning (scripts just crash)

❌ Demerits

  • errors compound step by step — confidently wrong, with momentum
  • harder to test: same goal, different paths each run
  • token costs multiply (every think-act-look loop bills)
  • real permissions = real blast radius — guardrails are NOT optional

👍 Use when

  • multi-step work with verifiable outcomes (tests pass, ticket filed)
  • read-heavy research/triage where a human signs the final act

👎 Think twice when

  • one deterministic step — a plain API call is faster and safer
  • irreversible actions without human gates (payments, deletes, sends)
  • you can't yet MEASURE task success — build evals first

📺 Diffusion image generation — lesson 12

⏮️ Before diffusion (~2021)

Custom visuals meant stock-photo hunting, commissioning designers for every variant, or GANs — impressive but unstable to train and hard to steer with text. 'A cat astronaut in watercolor' was a commission, not a sentence.

✅ Merits

  • any describable image in seconds; iterate by editing the sentence
  • steerable: style, composition, edits (inpainting), consistent characters
  • the same recipe scales to video and audio

❌ Demerits

  • text inside images is letter-SHAPES (L03's revenge) — often gibberish
  • global constraints wobble: fingers, symmetry, object counts
  • training-data provenance and copyright remain contested
  • photoreal fakes demand disclosure norms — use them

👍 Use when

  • concepts, moods, storyboards, illustrations, product mockups
  • volume + iteration beat pixel-perfect fidelity

👎 Think twice when

  • brand-exact detail (logos, UI text) — designers still win
  • factual/technical figures (use real charts! — dataviz, not vibes)
  • anything passing off generated people/events as real

🔓 Open-weights vs closed API models

⏮️ Before the choice existed (~2023)

Frontier AI = a handful of closed APIs, take it or leave it. Then LLaMA-family leaks and releases created a genuine second lane: download the weights, run them yourself, tune them freely (LoRA, L07). Now every team faces the build-vs-rent question AWS taught you (EC2 course!) — for brains.

✅ Merits

  • closed API: frontier quality, zero ops, pay-per-token
  • open weights: data stays home, cost-per-token can plummet at scale, tune anything, no vendor veto

❌ Demerits

  • closed: data leaves, prices/models change under you, rate limits
  • open: you run the GPUs (ops!), usually behind frontier quality, security patches are your job

👍 Use when

  • closed: start here — validate the product before owning infra
  • open: privacy mandates, huge steady volume, deep customization

👎 Think twice when

  • open 'to save money' at small scale — GPU ops eats the savings
  • closed for regulated data without a proper agreement in place

🔌 MCP vs bespoke tool integrations — lesson 13

⏮️ Before MCP (pre-2025)

Every AI app hand-wired every tool: one GitHub integration for the IDE, ANOTHER for the chatbot, a third for the agent — N apps × M tools = N×M adapters, none reusable. Capabilities were private wiring, not shareable parts.

✅ Merits

  • write a server once → works in every MCP host (N+M)
  • growing ecosystem of ready-made servers to plug in
  • standard discovery: models find tools at connect time
  • swap AI apps without rewiring your integrations

❌ Demerits

  • young standard — server quality varies wildly
  • each server = installed software with YOUR permissions
  • tool results can carry prompt injection — audit sources
  • local config friction (paths, env, versions) is real

👍 Use when

  • agents/apps needing several tools, today and tomorrow
  • your capability should work from many AI apps
  • teams sharing internal tools across assistants

👎 Think twice when

  • one hardcoded tool in one app — plain function calling is simpler
  • untrusted third-party servers on sensitive machines
  • a plain REST call from YOUR code does the job — no model needed