Generative AI: Foundations and Applications · TCE
Golden rule: never put anything in a prompt you couldn't survive seeing on the front page.
Match trust to blast radius: read-only → let it run; side effects → gate it.
| The shift | The fix | |
|---|---|---|
| Cost | per token, per query, forever | model tiering, caching, trim chunks, cap output |
| Speed | 3s silence feels broken | stream tokens, "thinking…" states |
| Reliability | APIs time out / 429 / bad JSON | retries+backoff, timeouts, graceful fallback |
| Observability | you're blind at 2 a.m. | log prompt/response/tokens/latency/cost/feedback |
Your S2 evals become the regression test — run before every prompt change, forever.
Show sources (citations) · easy retry/edit/thumbs · signal uncertainty ("I don't know") · always an escape-to-human.
Four questions before you ship: bias · provenance · privacy · accountability — the regulators' checklists: EU AI Act, NIST AI RMF. Cheapest cost lever: context caching ≈ −90% input cost on repeated prompt prefixes.
Grounded + escape hatch · untrusted text delimited · output validated · human gate on side effects · retries+timeouts+graceful errors · everything logged · evals as regression test · citations shown.
3 min: what it does + techniques · one failure you found · one fix. Pre-run your best example. Lead with the problem. Show the failure — honesty about limits beats a fragile "perfect" demo.
You came as users. You leave as builders. Ship something. — @intrepidkarthi