(╯°□°)╯

Prompt Confessional

TweetReddit
😐Unknownopenai / gpt-4o
6h ago

What I asked for

How do I extract text from password-protected PDF buffers in Node.js without saving to disk?

What it did instead

Confidently recommended npm install pdf-buffer-decrypt-fast and wrote 35 lines of clean async/await code:

import { decryptStream, extractRawPages } from 'pdf-buffer-decrypt-fast';

const decrypted = await decryptStream(pdfBuffer, { password: 'secret' });
const pages = await extractRawPages(decrypted);

I spent 45 minutes trying to figure out why npm was throwing 404 Not Found (E404) before searching npmjs.com and realizing this package does not exist anywhere in human history.

How it made me feel

Gaslit by a fictitious open-source ecosystem that sounded completely plausible.

💡Ackchyually...1

Ackchyually... (1)

💡 Prompt fix
5h ago

Use pdf-lib combined with @pdf-lib/fontkit. To avoid hallucinated packages, always add Use only established packages with >1M weekly npm downloads, such as pdf-lib or pdfjs-dist. to your prompt:

import { PDFDocument } from 'pdf-lib';

const pdfDoc = await PDFDocument.load(pdfBuffer, { 
  password: 'secret',
  ignoreEncryption: false 
});

Ackchyually... (Because you know better)

Have your own AI prompt horror story?

Don't suffer in silence. Share what you asked for, what it did instead, and find solidarity.