Can the OpenAI integration consume a document as part of a prompt?

I am building an application with the OpenAI API. Is the following possible?:

  • User uploads a document(s) (.doc, .pdf, .txt., etc.)
  • User submits a query.
  • OpenAI uses the information in that document(s) as part of the source info to come up with the response.

Yes, this can be done with one of the many “Chat wifh X” systems, in this case Chat with PDF or similar, you can find examples on the plugin store and open source on huggingface and even completely independent setups with a quick search, or you could code it up yourself.

1 Like

There are also some that are pre-coded that you can find on github.

Querying big documents will get pretty expensive pretty fast though right? I was having a long conversation with GPT-4 last night where it was only that conversation in the context (memory/chat history) and I burned thru $1.5 before knew it. With lots of people asking lots of questions you’ll spend $100s before you know it.

1 Like

If it’s for a business then the cost reduction in terms of not needing a person to review such content will offset the AI costs by an order of magnitude or more, so it all comes down to the use case, also the cost of inferencing is only going to drop and tend to zero, so cost, while important to keep an eye on in the early stages should not be a reason to halt or slow down development.

1 Like