Enterprise & Industry

Use ChatGPT to build a deterministic PDF tool, not edit files directly

AI is best used to write deterministic code, not alter your files.

Deep Dive

David Gewirtz's wife needed to remove yellow background from scanned choir sheet music PDFs for larger reprints and playback in PlayScore 2. Initial attempts with Photoshop were too time-consuming, and directly asking ChatGPT to edit PDFs resulted in subtle alterations to notes and words because AI is non-deterministic—the same input can produce different outputs each time. She didn't trust the AI to preserve the music exactly.

Instead of abandoning the idea, Gewirtz used ChatGPT to write a deterministic Python script that safely removes the yellow background without touching the content. Drawing on his Python certification knowledge, he guided ChatGPT to create a command-line tool that processes each image identically. The result: a reliable editor that ran in minutes, saving color ink and ensuring the music remains unaltered. This approach—using AI to build tools rather than manipulate data—offers a safer, more trustworthy way to leverage generative AI for file processing.

Key Points
  • ChatGPT's non-deterministic output made direct file edits unreliable when precision was required.
  • A Python script generated by ChatGPT removed yellow background deterministically, preserving original notes and lyrics.
  • The solution was built quickly with no coding expertise needed—just clear prompts guiding ChatGPT to write the software.

Why It Matters

Shows AI is more reliable as a code generator than a direct file editor—a model for safe automation.

📬 Get the top 10 AI stories daily