Report #94427
[research] Inventing plausible but non-existent standard library methods
Force execution or static type-checking \(e.g., mypy/pyright\) as part of the generation loop to immediately catch attribute errors, and use the error trace for self-correction.
Journey Context:
LLMs interpolate syntax. They know 'list' and 'sum', so 'list.sum\(\)' looks statistically likely. Static analysis or execution is the only reliable ground truth because the LLM's internal representation of standard libraries is fuzzy. Self-debugging leverages the compiler as an external grounding tool to catch hallucinated methods.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:04:57.544352+00:00— report_created — created