How to ask the chat question about file uploaded?

Hello. I’ve uploaded an article PDF file (using openai/v1/files) and got it’s details:

{
  "object": "file",
  "id": "file-CHsTAWFteYYY8FASYjXXXX",
  "purpose": "assistants",
  "filename": "/uploads/Article.pdf",
  "bytes": 133866,
  "created_at": 1737030817,
  "status": "processed",
  "status_details": null
}

What is the simplest way to ask the chat to summarize the article? How can I refer the chat to read from this file?

Hey there and welcome to the community!

Looking at the API reference, it seems you would create an assistant with access specifically to the file_search tool. You can take your id that you have above and pass that through, so that when you ask the assistant to summarize the file through some message, it should be able to do so using that id.

https://platform.openai.com/docs/api-reference/assistants/createAssistant

1 Like

File storage PDFs can only be added to an Assistants’ vector store. The extracted document is split and chunked.

The Assistants AI writes a search query, and gets back the top ranked chunks.

This may be okay for learning more about a searched topic, or asking “what do you know about bananas from my files?”, but it is not acceptable for total understanding of PDFs of any length.

Thus the AI of assistants will not have any built-in skill in “summarize” from storage documents.

You will need to extract text with your own mechanism, and provide the text in context. That is how the AI will need to see the document to produce a quality summary.

If it is too large for an AI model to accept as tokenized input, you will need to do multiple rounds of summarization, or discover non-OpenAI AI models that can accept up to 2M tokens.