William & Mary · CSCI 455/555 · Spring 2026
module 06 / 12 · ~50 min
module 06 · hallucinations.lecture

Hallucinations

Code hallucinations occur when LLMs generate syntactically valid code that looks plausible but invokes non-existent APIs, uses wrong parameters, or implements incorrect logic — a uniquely dangerous form of AI error.

format split-pane composer
scratch persistent JS repl
keys esc · ←→ · ⌘↩