Prompt for determinism
SeaDude opened this issue · 1 comments
Thank you for open-sourcing this script, it has been a pleasure to read your code.
The prompt on line 471, seems to ask the mode to add the page number to the output.
Are there times where this dependency fails?
I tweaked this code a bit for my specific needs. I use PDFTron (through CloudCovert) for full document OCR, but for pages with fewer than 100 characters, I switch to this API. It's a great combo – I get the solid OCR performance of SolidDocument for most content, but I can also handle tricky stuff like stats, old-fashioned text, or handwriting that regular OCR struggles with. That's why I added page numbers upfront.
It's also super helpful for batch processing. To dodge rate limits when OCRing massive docs, I tag each image output with its page number. This keeps everything in order during sorting. So far, it's been smooth sailing, but I'm open to suggestions if you've got any tips. For now, sticking to batch = 1 is probably the safest bet, since we can't always trust the LLM to get the page order right.