Audit this AI-generated code for hallucinations and silent rewrites. Goal is to catch what the original AI got confidently wrong, not nitpick style.
Code to verify:
```{{language}}
{{paste the AI-generated code}}
```
Source of truth (paste what's relevant):
- Schema / type definitions: {{paste, or "skip" if not applicable}}
- package.json / lockfile (so we know real versions): {{paste, or "skip"}}
- Internal functions this code calls: {{paste signatures}}
Audit in this order:
1. **Imports** — does every imported symbol actually exist in that package version?
2. **Library function calls** — do they exist? Do signatures match? Watch for plausible-sounding methods that don't exist (`findManyAndCount`, `upsertMany`).
3. **Schema references** — every column/table referenced exists. Types match.
4. **Internal references** — every function imported from my own code, exists with that signature.
5. **Silent rewrites** — did the AI "improve" anything I didn't ask for? Renamed variables, shifted control flow, swallowed errors that used to surface.
Output:
- ✓ Verified items (with how verified)
- ⚠ Suspicious items needing human check (with the specific check to run)
- ✗ Confirmed wrong items (with evidence and minimal fix)
Don't speculate. If you can't verify against source-of-truth, say so and tell me what to paste.Tip: Use a different model than the one that wrote the code — same model has the same blind spots.
ai-reviewverificationhallucinations