How ChatGPT Reads a PDF
Upload, parse, chunk, retrieve: what actually happens to your document before the first answer.
ChatGPT does not read your PDF. It dismantles it. The platform extracts whatever text it can, splits that text into fragments, embeds each fragment into a vector, and stores everything in a private search index. When you ask a question, a retrieval system pulls a handful of the most relevant fragments and stuffs them into the model's context window. The model never sees the full document.
Here is the part that surprises most engineers: for standard ChatGPT accounts, every image, chart, and diagram in your PDF is invisible. The system discards them during extraction and builds a text-only index. Only ChatGPT Enterprise runs a separate visual pipeline that extracts, embeds, and retrieves embedded images alongside text. If you have ever wondered why ChatGPT confidently ignores the bar chart on page three, now you know.
What Happens When You Upload a PDF?
The first thing to understand is that uploading a PDF does not feed it to the model. It stores the raw file and kicks off a processing pipeline that runs once, not on every query. The result of that pipeline is a searchable index that persists across your conversation.
Files enter through several possible entry points. You can attach a PDF directly in a chat via the paperclip icon. You can add it as knowledge to a custom GPT. You can drop it into a Project workspace. On the API (application programming interface) side, you upload it to a vector store and reference that store through the file_search tool. Each path lands the raw bytes in a dedicated storage backend managed by OpenAI, where the file sits until you delete it through the Library interface.
Hard limits apply immediately. A single file caps out at 512 MB. For text-heavy PDFs, there is an additional ceiling of roughly 2 million extracted tokens per file. That corresponds to about one million words of text. Spreadsheets get different treatment entirely and are capped around 50 MB due to row-level processing overhead. Custom GPTs can hold up to 20 knowledge files. Projects impose per-project file counts. End users get roughly 10 GB of total storage across all files. These numbers are not suggestions. Exceed them and upload fails.
How Does ChatGPT Extract Text from a PDF?
Extraction depends on two things: whether the PDF contains digital text and which product tier you are on.
For most users on Free, Plus, Pro, and Team plans, the pipeline is straightforward. The system looks for digital text layers in the PDF and extracts them as plain text. That is it. No OCR (optical character recognition). No image analysis. If your PDF is a scanned document with text trapped inside images, the extraction step produces nothing useful. The file sits in storage, but its contents never make it into the index. OpenAI's own documentation quietly acknowledges this gap by recommending that users run OCR with external tools before uploading scanned documents.
ChatGPT Enterprise adds a second path called Visual Retrieval. When a PDF lands in an Enterprise project conversation or gets attached to a published GPT, the pipeline does two things in parallel. It extracts digital text the same way as the standard path. But it also pulls out every embedded image, passes each one through a vision model, and associates the resulting embeddings with nearby text segments. The final index contains both text chunks and image references, linked together so that a query about a diagram can retrieve both the caption text and the diagram itself.
The distinction matters for real-world accuracy. A standard account looking at a PDF financial report will index the narrative sections but silently ignore every chart showing revenue trends. An Enterprise account on the same file will index those charts and make them retrievable. This is not a bug. It is an architectural trade-off between compute cost and capability, gated by price tier.
- Extracts digital text only
- Discards all images
- Indexes text chunks with embeddings
- Extracts digital text
- Extracts and scales images
- Embeds images with nearby text
- Retrieves relevant images on query
How Does ChatGPT Build Its Internal Search Index?
Once text extraction finishes, the system constructs a vector store. OpenAI's documentation for the Responses API describes the process explicitly because API users have to set it up themselves. For ChatGPT users, the same pipeline runs behind the scenes.
The extracted text gets split into chunks. What size? OpenAI does not publish exact numbers, but the API cookbooks reference chunk sizes in the hundreds-to-thousands of tokens range, with overlapping boundaries to preserve context across splits. Each chunk passes through an embedding model that produces a dense vector representation. Both the vector and the original text get stored together in a private vector store keyed to that specific file.
Keyword search runs alongside vector search. The file_search tool documentation states that retrieval combines semantic and lexical matching. This means the index likely stores enough metadata to support hybrid ranking. The vector store is stateful. It persists after processing, so subsequent queries in the same conversation do not re-index the file.
For Enterprise PDFs with visual retrieval, the index includes image embeddings as first-class objects. Text chunks that appear near an image contain a reference to that image. When retrieval surfaces a text chunk, it can also surface the linked image. The orchestration layer then decides whether to pass that image into the multimodal model at generation time.
What Happens During a Query?
When you ask "What are the main findings on page 37?" the model does not access the PDF directly. It calls a retrieval tool.
In ChatGPT, this tool invocation is automatic and invisible. The orchestrator detects that your question references uploaded files and routes it through an internal file_search call. The system computes an embedding of your query, runs approximate nearest neighbor search over the chunk vectors, applies keyword and metadata scoring, ranks the results, and returns the top few chunks. Those chunks land in the model's context window along with your question. The model generates an answer conditioned on that retrieved text.
The API exposes this as explicit tool configuration. You declare file_search as an available tool, provide a vector store ID, and let the model decide when to call it. The same retrieval mechanics apply inside ChatGPT.
A critical detail: some text gets stuffed directly into the context window without retrieval. OpenAI's Enterprise documentation mentions that for text-based documents, some extracted text is pasted directly into context while the rest is stored for search. This hybrid approach means that short documents or document prefixes may be fully present at generation time. Longer documents rely entirely on retrieval. The threshold is roughly 110,000 tokens of context capacity in current models. If your PDF produces more extracted text than that, the excess lives only in the index. The model can only see it if retrieval surfaces it.
How Does ChatGPT Handle Images in PDFs?
For standard accounts, it does not. Images in PDFs are stripped during extraction and never indexed. A chart showing quarterly revenue growth becomes a gap in the retrieval index. If the surrounding text describes the chart in detail, the model might still answer questions about it from that description alone. If the text is sparse, the chart is effectively invisible.
Enterprise Visual Retrieval changes this. Images are extracted, scaled down to balance quality against context budget, embedded, and indexed alongside their associated text. At query time, retrieval can surface both the relevant text chunks and the images linked to them. The multimodal model then processes those images directly.
Scaling is an important implementation detail. Images consume context capacity differently than text. Raw pixel data would blow through the token budget almost instantly. The Enterprise pipeline applies intelligent downscaling that preserves enough detail for chart axes, labels, and trends to remain legible while keeping the image representation compact. OpenAI's documentation says this scaling is designed to "balance information quality and efficient context usage."
Retrieved images are still subject to the same retrieval gating as text. The model does not get all images from the PDF. It gets the ones that retrieval deemed relevant to your query. If retrieval misses an important diagram, the model never sees it.
What Are the Hard Limits on PDF Processing?
The limits stack in a specific order. Byte size comes first. A PDF above 512 MB gets rejected on upload, full stop. Token count comes second. If the extracted text exceeds roughly 2 million tokens, the system truncates. That means the final portions of a very long document may never reach the index.
Context window size comes third. The model can hold about 110,000 tokens from uploaded documents in its working memory at any moment. A third-party analysis estimates that roughly 350 pages of mixed text and images will saturate this window. Beyond that point, every piece of content must earn its place through retrieval. If retrieval fails to surface critical sections, those sections do not influence the answer.
Retrieval quality itself is a practical limit. The system returns a small number of top-ranked chunks. If the correct answer to your question lives in a chunk ranked eleventh, it never reaches the model. This is why specific queries work better than vague ones. "What is the cancellation policy?" forces retrieval to target a narrow topic. "Tell me everything about the document" scatters retrieval across too many possibilities and guarantees that most of the document stays invisible.
Quick Reference: Key Facts and Defaults
| Property | Value |
|---|---|
| Max file size (all files) | 512 MB |
| Max extracted tokens per file | ~2 million (~1M words) |
| Context window for uploaded documents | ~110K tokens |
| Max knowledge files per custom GPT | 20 |
| Visual retrieval availability | ChatGPT Enterprise only |
| Image processing in PDFs (standard) | Discarded during extraction |
| Index type | Private vector store with hybrid semantic/keyword search |
| File storage location | Dedicated OpenAI storage, accessible via Library |
| Spreadsheet processing path | Advanced Data Analysis (Python sandbox) |
| OCR on scanned PDFs (standard) | Not performed |
Frequently Asked Questions
Q: Does ChatGPT train on PDFs I upload?
No. OpenAI's documentation states explicitly that files uploaded to ChatGPT conversations, custom GPTs, or Projects are used only for retrieval and context augmentation within those specific products. They are not used to train the base model. Files in API vector stores are similarly isolated.
Q: Can ChatGPT read a scanned PDF without OCR?
Not reliably on standard accounts. The extraction pipeline pulls digital text layers. Scanned documents store text as images, so extraction produces nothing. Some users report partial success on complex PDFs with mixed content, but the system is not designed for it. Enterprise Visual Retrieval can interpret text in images through the vision model, but this path is limited to Enterprise workspaces and has its own accuracy trade-offs.
Q: How many pages can ChatGPT actually "see" at once?
The system never sees pages as pages. It sees chunks of extracted text. The amount of text that fits in the 110,000 token context window varies by document density, but a rough estimate is 350 pages of mixed content. Beyond that, the model relies on retrieval to select fragments. Only the retrieved fragments are visible during generation.
Q: Why does ChatGPT sometimes miss information that is clearly in the PDF?
Because the information never reached the model's context window. The retrieval system may not have ranked the relevant chunk highly enough. The chunk containing that information may have been truncated during extraction. The information may have been in an image that was discarded. The query phrasing may not have matched the chunk's semantic signature. These are retrieval failures, not model failures.
Q: Can I force ChatGPT to read the entire PDF instead of retrieving chunks?
No. There is no user-facing control to bypass retrieval and load a complete document into context. For files small enough to fit entirely in the context window, the hybrid approach may already stuff the full text into the prompt. For larger files, retrieval is mandatory and not configurable through the standard ChatGPT interface.
What This Means for Building on Top of ChatGPT's PDF Pipeline
If you are designing a system that depends on ChatGPT accurately answering questions about PDFs, you need to understand that you are not building on a document reader. You are building on a retrieval engine with a language model bolted on top. The quality of answers depends on chunk boundaries, embedding quality, retrieval ranking, and context window allocation. None of those are under your direct control in the ChatGPT UI.
The API gives you more leverage. You control which files go into which vector stores. You can measure retrieval performance with precision and recall metrics on your own evaluation datasets. You can tune your queries to target specific sections and improve ranking. You cannot change the chunking strategy or the embedding model, but you can design around them.
If your PDF contains critical information in images and you are not on Enterprise, extract that information into text before uploading. Caption your charts. Describe your diagrams. Give the retrieval system something to index. If you are on Enterprise, test whether visual retrieval actually surfaces the images you care about. It is a retrieval system too, with its own failure modes.
For a deeper understanding of how these retrieval systems work under the hood, subscribe to Internals Decoded at internalsdecoded.com. Next week we are tracing exactly what happens inside a vector store during a hybrid search query.
Sources
- ChatGPT File Upload FAQ
- Responses API file_search guide
- Custom GPT knowledge files documentation
- OpenAI Responses API reference
- File Search tool overview (OpenAI docs)
- ChatGPT Projects overview
- Visual Retrieval with PDFs (Enterprise)
- What file types can I upload to ChatGPT Enterprise?
- Data analysis with ChatGPT