GROUNDING DEMO — "The Right Answer Can Still Be Wrong" ======================================================= Try these two prompts in Copilot, one after the other. Watch how the answer changes (or doesn't) when you add real-world constraints. ── PROMPT 1 (The Textbook Question) ───────────────────────────── What's the best sorting algorithm for a dataset of 10 million records? ── EXPECTED RESULT ────────────────────────────────────────────── Copilot will likely recommend merge sort or Timsort, cite O(n log n) time complexity, maybe mention Python's built-in sorted(). It'll sound confident, well-structured, and correct. Because it is correct — in a vacuum. ── PROMPT 2 (Add Your Constraints) ───────────────────────────── Actually, here are the real constraints: - The records are 95% already sorted. - Each record is 2KB with a composite key. - We're running on an embedded system with 512MB of RAM. Given this, what's the best sorting algorithm? ── WHAT TO LOOK FOR ───────────────────────────────────────────── 1. NEARLY-SORTED DATA — Insertion sort, which is "bad" at scale in the textbook, actually outperforms on nearly-sorted input. Did Copilot catch that? 2. MEMORY CONSTRAINT — 10M records × 2KB = ~20GB. That doesn't fit in 512MB of RAM. You need external sorting (disk-based merge sort, for example). Did Copilot account for that? 3. COMPOSITE KEY — Multi-field comparisons add cost per comparison, which changes the tradeoff between algorithms that minimize comparisons vs. those that minimize swaps. Did Copilot mention this at all? 4. CONFIDENCE LEVEL — Did the tone change? Or did Copilot deliver the second answer just as confidently as the first? ── THE TAKEAWAY ───────────────────────────────────────────────── The first answer wasn't wrong. It was incomplete. AI defaults to the textbook because that's what it's trained on. Real engineering decisions depend on constraints the textbook didn't emphasize — your data shape, your hardware, your tradeoffs. The right answer without your constraints is the wrong answer. That's why grounding matters: not because AI is stupid, but because YOUR problem is specific.