How to achieve ChatGPT-level PDF parsing with APIs?

ChatGPT takes pdf and parses it just fine. How to accomplish at least that level of accuracy using the APIs?

@sanjeevthakur - You could use the Assistants API with its file search capabilities, or code a tool that performs Retrieval-Augmented Generation (RAG) each time you need context. The latter approach is often better because it gives you more control over retrieval and chunking strategies. Hope this helps - Cheers!

Welcome @sanjeevthakur

The general idea is to make sure that the model gets all the info that is present on a page in a pdf. Simply extracting text + supplying and image of the page suffices.

Here’s a tutorial from the OpenAI Cookbook that deals exactly with parsing PDFs for RAG.

1 Like