3 ms·
> Note that this example simply passes a PNG screenshot of the PDF to OpenAI's API — results may be different/more efficient if you send it the actual PDF. Ope
by minimaxir 2y ago
> Note that this example simply passes a PNG screenshot of the PDF to OpenAI's API — results may be different/more efficient if you send it the actual PDF.
OpenAI's API only accepts images: https://platform.openai.com/docs/guides/vision https://platform.openai.com/docs/guides/vision
To my knowledge, all the LLM services that take in PDF input do their own text extraction of the PDF before feeding it to an LLM.
- tyre 2y agoor convert PDF to image and send that. We’ve done it for things that textract completely mangled, but sonnet has no problem. Especially tables built out of text characters from very old systems
- ec109685 2y agoI don’t think it does OCR. It’s able to use the structure of the PDF to guide the parsing.